Pushdown Automata
Chapter 12
Recognizing Context-Free Languages
Two notions of recognition:
(1) Say yes or no, just like with FSMs
(2) Say yes or no, AND
if yes, describe the structure
a + b * c
Just Recognizing
We need a device similar to an FSM except that it needs more power.
The insight: Precisely what it needs is a stack, which gives it an unlimited amount of memory with a restricted structure.
Example: Bal (the balanced parentheses language)
(((()))
Definition of a Pushdown Automaton
M = (K, , , , s, A), where:
K is a finite set of states
is the input alphabet
is the stack alphabet
s K is the initial state
A K is the set of accepting states, and
is the transition relation. It is a finite subset of
(K ( {}) *) (K *)
state input or string of statestring of
symbols symbols
to pop to push
from top on top
of stackof stack
Definition of a Pushdown Automaton
A configuration of M is an element of K * *.
The initial configuration of M is (s, w, ).
Manipulating the Stack
c will be written as cab
a
b
If c1c2…cn is pushed onto the stack:
c1
c2
cn
c
a
b
c1c2…cncab
Yields
Let c be any element of {},
Let 1, 2 and be any elements of *, and
Let w be any element of *.
Then:
(q1, cw, 1) |-M (q2, w, 2) iff ((q1, c, 1), (q2, 2)) .
Let |-M* be the reflexive, transitive closure of |-M.
C1 yields configuration C2 iff C1 |-M* C2
Computations
A computation by M is a finite sequence of configurations C0, C1, …, Cn for some n 0 such that:
● C0 is an initial configuration,
● Cn is of the form (q, , ), for some state q KM and
some string in *, and
● C0 |-M C1 |-M C2 |-M … |-M Cn.
Nondeterminism
If M is in some configuration (q1, s, ) it is possible that:
● contains exactly one transition that matches.
● contains more than one transition that matches.
● contains no transition that matches.
Accepting
A computation C of M is an accepting computation iff:
● C = (s, w, ) |-M* (q, , ), and
● q A.
M accepts a string w iff at least one of its computations accepts.
Other paths may:
● Read all the input and halt in a nonaccepting state,
● Read all the input and halt in an accepting state with the stack not
empty,
● Loop forever and never finish reading the input, or
● Reach a dead end where no more input can be read.
The language accepted by M, denoted L(M), is the set of all strings accepted by M.
Rejecting
A computation C of M is a rejecting computation iff:
● C = (s, w, ) |-M* (q, w, ),
● C is not an accepting computation, and
● M has no moves that it can make from (q, , ).
M rejects a string w iff all of its computations reject.
So note that it is poss ...
The document provides an overview of topics and concepts to be covered on a midterm exam for an automata theory course, including: formal proofs; finite automata such as NFAs, DFAs, and epsilon-NFAs; regular expressions; pumping lemmas; and converting between representations. It gives details on the exam format and provides study guides and checklists for understanding and working with different automata models and representations.
Formal Languages and Automata Theory unit 4Srimatre K
The document discusses various topics related to context-free grammars including:
1. Normal forms like Chomsky normal form and Greibach normal form that put constraints on the structure of productions in a context-free grammar.
2. The pumping lemma for context-free languages and how it can be used to prove that a language is not context-free.
3. Closure properties of context-free languages like their closure under union, concatenation and Kleene star but not under intersection and complement.
4. Decision properties of context-free languages and how questions of emptiness, membership and finiteness can be solved.
5. An introduction to Turing machines as accepting devices for recursively enumerable
This document provides an introduction to pushdown automata and Turing machines. It defines pushdown automata as finite state machines that employ a stack. Pushdown automata are more capable than finite state machines but less capable than Turing machines. Turing machines have an infinite tape and can perform read/write operations to simulate any computer algorithm. The document outlines the components and workings of pushdown automata and Turing machines, provides examples of each, and compares their computational abilities.
Finite-state machines are finite collections of states with transition rules that take you from one state to another. They can be represented as graphs with nodes as states and directed arcs indicating transitions. Deterministic finite automata (DFAs) are finite-state machines where transitions are defined by reading input characters left to right. Nondeterministic finite automata (NFAs) allow transitions from a state to multiple states on a given input. While NFAs are more expressive, any NFA can be converted to an equivalent DFA using the subset construction algorithm.
Introduction to the theory of computationprasadmvreddy
This document provides an introduction and overview of topics in the theory of computation including automata, computability, and complexity. It discusses the following key points in 3 sentences:
Automata theory, computability theory, and complexity theory examine the fundamental capabilities and limitations of computers. Different models of computation are introduced including finite automata, context-free grammars, and Turing machines. The document then provides definitions and examples of regular languages and context-free grammars, the basics of finite automata and regular expressions, properties of regular languages, and limitations of finite state machines.
The document provides a final review for a course on automata theory and formal languages. It covers several key topics:
- The Chomsky hierarchy of formal languages including regular, context-free, and recursively enumerable languages.
- Different types of automata and grammars used to recognize each class of languages, including finite automata, pushdown automata, and Turing machines.
- Properties of regular and context-free languages, such as closure properties and decidability.
- Techniques for analyzing languages and proving properties, like the pumping lemma.
- Applications of automata theory in various computer science domains such as programming languages, algorithms, and artificial intelligence.
The document provides an introduction to automata theory and finite automata. It discusses key concepts such as alphabets, strings, languages, deterministic finite automata (DFAs), nondeterministic finite automata (NFAs), epsilon-NFAs, and the process of converting an NFA to a DFA using subset construction. The summary is:
[1] Automata theory studies abstract computing devices called automata and finite automata are a useful model for hardware and software. [2] Finite automata can be deterministic (DFAs) or nondeterministic (NFAs) and accept regular languages. [3] NFAs allow ambiguous transitions while DFAs have a single unambiguous transition for each state
The document discusses the decidability of several language problems involving formal language models like DFAs, NFAs, CFGs, and TMs. It presents Turing machines (algorithms) that can decide whether a string is accepted by a DFA/NFA, whether a string is generated by a CFG, whether two DFAs are equivalent, whether a DFA/CFG accepts/generates any string, and more. These TMs work by simulating the computations of the formal systems and checking for acceptance in a finite number of steps.
The document provides an overview of topics and concepts to be covered on a midterm exam for an automata theory course, including: formal proofs; finite automata such as NFAs, DFAs, and epsilon-NFAs; regular expressions; pumping lemmas; and converting between representations. It gives details on the exam format and provides study guides and checklists for understanding and working with different automata models and representations.
Formal Languages and Automata Theory unit 4Srimatre K
The document discusses various topics related to context-free grammars including:
1. Normal forms like Chomsky normal form and Greibach normal form that put constraints on the structure of productions in a context-free grammar.
2. The pumping lemma for context-free languages and how it can be used to prove that a language is not context-free.
3. Closure properties of context-free languages like their closure under union, concatenation and Kleene star but not under intersection and complement.
4. Decision properties of context-free languages and how questions of emptiness, membership and finiteness can be solved.
5. An introduction to Turing machines as accepting devices for recursively enumerable
This document provides an introduction to pushdown automata and Turing machines. It defines pushdown automata as finite state machines that employ a stack. Pushdown automata are more capable than finite state machines but less capable than Turing machines. Turing machines have an infinite tape and can perform read/write operations to simulate any computer algorithm. The document outlines the components and workings of pushdown automata and Turing machines, provides examples of each, and compares their computational abilities.
Finite-state machines are finite collections of states with transition rules that take you from one state to another. They can be represented as graphs with nodes as states and directed arcs indicating transitions. Deterministic finite automata (DFAs) are finite-state machines where transitions are defined by reading input characters left to right. Nondeterministic finite automata (NFAs) allow transitions from a state to multiple states on a given input. While NFAs are more expressive, any NFA can be converted to an equivalent DFA using the subset construction algorithm.
Introduction to the theory of computationprasadmvreddy
This document provides an introduction and overview of topics in the theory of computation including automata, computability, and complexity. It discusses the following key points in 3 sentences:
Automata theory, computability theory, and complexity theory examine the fundamental capabilities and limitations of computers. Different models of computation are introduced including finite automata, context-free grammars, and Turing machines. The document then provides definitions and examples of regular languages and context-free grammars, the basics of finite automata and regular expressions, properties of regular languages, and limitations of finite state machines.
The document provides a final review for a course on automata theory and formal languages. It covers several key topics:
- The Chomsky hierarchy of formal languages including regular, context-free, and recursively enumerable languages.
- Different types of automata and grammars used to recognize each class of languages, including finite automata, pushdown automata, and Turing machines.
- Properties of regular and context-free languages, such as closure properties and decidability.
- Techniques for analyzing languages and proving properties, like the pumping lemma.
- Applications of automata theory in various computer science domains such as programming languages, algorithms, and artificial intelligence.
The document provides an introduction to automata theory and finite automata. It discusses key concepts such as alphabets, strings, languages, deterministic finite automata (DFAs), nondeterministic finite automata (NFAs), epsilon-NFAs, and the process of converting an NFA to a DFA using subset construction. The summary is:
[1] Automata theory studies abstract computing devices called automata and finite automata are a useful model for hardware and software. [2] Finite automata can be deterministic (DFAs) or nondeterministic (NFAs) and accept regular languages. [3] NFAs allow ambiguous transitions while DFAs have a single unambiguous transition for each state
The document discusses the decidability of several language problems involving formal language models like DFAs, NFAs, CFGs, and TMs. It presents Turing machines (algorithms) that can decide whether a string is accepted by a DFA/NFA, whether a string is generated by a CFG, whether two DFAs are equivalent, whether a DFA/CFG accepts/generates any string, and more. These TMs work by simulating the computations of the formal systems and checking for acceptance in a finite number of steps.
This document contains information about a computer science examination from May 2017, including sections and questions. Section A contains 10 two-mark questions about topics like finite automata, regular expressions, pumping lemma, context-free grammars, pushdown automata, Turing machines, and Post correspondence problem. Section B has 5 five-mark questions. Section C contains 3 fifteen-mark questions. Section D has 1 ten-mark question. The document provides details about the exam format, sections, question types and marks for each question.
This document contains information about a computer science examination from May 2017, including sections and questions. Section A contains 10 two-mark questions about topics like finite automata, regular expressions, pumping lemma, context-free grammars, pushdown automata, Turing machines, and Post correspondence problem. Section B has 5 five-mark questions. Section C contains 3 fifteen-mark questions. Section D has 1 ten-mark question. The document provides details about the exam format, sections, question types and marks for each question.
This document contains information about a computer science examination from May 2017, including sections and questions. Section A contains 10 two-mark questions about topics like finite automata, regular expressions, pumping lemma, context-free grammars, pushdown automata, Turing machines, and Post correspondence problem. Section B has 5 five-mark questions. Section C contains 3 fifteen-mark questions. Section D has 1 ten-mark question. The document provides details about the exam format, sections, question types and marks for each question.
The document defines key concepts in theory of computation including symbols, alphabets, strings, languages, finite state machines, and regular languages. It explains that a finite state machine is defined using 5 tuples and has limited memory. Deterministic finite automata and nondeterministic finite automata are described as being different based on their transition functions. Regular languages are those recognized by a finite state machine and cannot require storing strings. Operations on regular languages like union, intersection, and Kleene closure are also covered.
This document discusses theory of computation and finite automata. It begins by defining theory of computation as dealing with the logic of computation using abstract machines called automata. It then defines basic terminology like symbols, alphabets, strings, and languages. Next, it introduces finite automata as the simplest machines that recognize patterns using a finite set of states. Deterministic finite automata and nondeterministic finite automata are described as the two types of finite automata, differing in their transition functions. Transition diagrams and tables are also presented as ways to represent finite automata.
The document provides an introduction to theory of computation and automata. It defines key concepts such as symbols, alphabets, strings, languages, finite automata, deterministic finite automata (DFA), non-deterministic finite automata (NFA). It explains these concepts using examples and discusses their representation using transition diagrams, transition tables, and examples of DFAs recognizing specific languages.
This document discusses the limits of deterministic finite automata (DFAs) and nondeterministic finite automata (NDFAs). It shows that some languages, such as the language of palindromes, cannot be recognized by a DFA. While NDFAs are more powerful than DFAs, any NDFA can be converted to an equivalent DFA. The document provides an example of converting an NDFA to a DFA by constructing a new DFA with powerset states based on the NDFA's transition function. In conclusion, finite automata are not powerful enough to recognize languages like arithmetic expressions; more powerful machines will be discussed in later chapters.
The document discusses context-free languages and pushdown automata. It defines context-free grammars and languages, and provides examples of grammars and the strings they generate. It also defines pushdown automata formally as a 6-tuple with states, input alphabet, stack alphabet, transition function, start state, and accept states. Pushdown automata are similar to finite automata but have an additional stack which allows them to recognize some non-regular languages.
1. The document contains questions from various computer science subjects including formal languages and automata, regular expressions and languages, pushdown automata, and context-free languages and Turing machines.
2. It includes definitions, examples, differences between models like DFAs and NFAs, properties of languages, and questions asking to construct automata or grammars for specific languages.
3. Several questions ask students to prove statements about language classes, pumping lemmas, ambiguity in grammars, and the equivalence of computational models like PDAs and Turing machines.
This document provides solutions to practice problems for a final exam in computer science. It defines various terms related to sets, languages, automata, and complexity classes. It also provides proofs that the language ATM is undecidable but Turing-recognizable, and classifies several example languages as regular, context-free, or Turing-decidable.
This document discusses properties of regular languages and techniques for determining whether a language is regular or not. It covers topics like closure properties of regular languages under operations like union, intersection, and reversal. It also explains how to use the pumping lemma and non-constructive proofs like contradiction to show that a language is not regular. Examples are provided to illustrate how to apply these techniques to analyze languages and prove regularity or non-regularity.
A pushdown automaton (PDA) is a type of automaton that extends a non-deterministic finite automaton (NFA) with a stack. A PDA uses its stack to "remember" an infinite amount of information, allowing it to recognize context-free languages that cannot be recognized by finite state machines. Formally, a PDA is defined as a 7-tuple that specifies its set of states, input alphabet, stack alphabet, initial/starting state, starting stack symbol, set of accepting states, and transition function which defines how the PDA changes states and manipulates symbols on the stack.
This document provides an overview of finite automata, including deterministic finite automata (DFAs) and non-deterministic finite automata (NFAs). It defines what a finite automaton is, describes the components of a DFA and NFA, and how they process input strings. It also discusses the relationship between DFAs and NFAs, showing that any language recognizable by an NFA is also recognizable by a DFA through subset construction. Examples are provided to illustrate DFA and NFA design.
This document provides an overview of finite automata and regular languages. It defines deterministic finite automata (DFAs) and non-deterministic finite automata (NFAs) as state machines that can recognize regular languages. A DFA has a single active state at any time and deterministic transitions, while an NFA can have multiple active states and non-deterministic transitions. The document shows that NFAs and DFAs are equivalent in their expressive power by describing how to convert any NFA to an equivalent DFA using subset construction.
Here are the steps to solve the assignments:
1. Draw NFA and DFA over L = {0, 1} where machine should only accept at least two 1s
NFA:
A
1
B
0,1
1
C
DFA:
A
1
B
1
C
2. Draw DFA for following state transition table of NFA:
A {A} {A, B}
B {C} {C}
C Փ Փ
0 1
DFA:
A
0,1
B
1
C
The key steps are to identify the states of the N
Automata theory - describes to derives string from Context free grammar - derivation and parse tree
normal forms - Chomsky normal form and Griebah normal form
This document discusses finite automata, including deterministic finite automata (DFAs) and non-deterministic finite automata (NFAs). It defines them formally using 5-tuples and explains how they work on input strings to determine whether to accept or reject them. Specifically, it contrasts that DFAs have deterministic transitions to a single state, while NFAs can have non-deterministic transitions to multiple states. However, both models have equivalent computational power to recognize formal languages.
Your employer is pleased with your desire to further your educatio.docxwoodruffeloisa
Your employer is pleased with your desire to further your education and would like you to inform other employees about the process of online education; however, she still has questions about applying. Using proper memo format, and Figure 6-1 of the textbook, explain the process of applying for a degree at CSU. Use word processing software, such as Microsoft Word, to create your memo.
Your response should be at least 200 words in length. You are required to use at least your textbook as source material for your response. All sources used, including the textbook, must be referenced; paraphrased and quoted material must have accompanying citations.
Pfeiffer, W., & Adkins, K. (2012, 109-110).
Technical communication fundamentals
. Upper Saddle River, NJ: Prentice Hall.
.
Your finished project, including both elements of the paper, should .docxwoodruffeloisa
Your finished project, including both elements of the paper, should be approximately 12 to 14 double-spaced pages, not including the cover or reference pages but including the abstract, submitted as one document. Make sure you present an introduction and a conclusion tying together both aspects of the paper. Follow the guidelines in either Course Content or in the conference. You must post your selection in this conference. The paper is due at the end of week 8 and must be submitted in your Assignments folder. Review the late policy above. The paper will not be accepted late.
.
More Related Content
Similar to Pushdown AutomataChapter 12Recognizing Context-F.docx
This document contains information about a computer science examination from May 2017, including sections and questions. Section A contains 10 two-mark questions about topics like finite automata, regular expressions, pumping lemma, context-free grammars, pushdown automata, Turing machines, and Post correspondence problem. Section B has 5 five-mark questions. Section C contains 3 fifteen-mark questions. Section D has 1 ten-mark question. The document provides details about the exam format, sections, question types and marks for each question.
This document contains information about a computer science examination from May 2017, including sections and questions. Section A contains 10 two-mark questions about topics like finite automata, regular expressions, pumping lemma, context-free grammars, pushdown automata, Turing machines, and Post correspondence problem. Section B has 5 five-mark questions. Section C contains 3 fifteen-mark questions. Section D has 1 ten-mark question. The document provides details about the exam format, sections, question types and marks for each question.
This document contains information about a computer science examination from May 2017, including sections and questions. Section A contains 10 two-mark questions about topics like finite automata, regular expressions, pumping lemma, context-free grammars, pushdown automata, Turing machines, and Post correspondence problem. Section B has 5 five-mark questions. Section C contains 3 fifteen-mark questions. Section D has 1 ten-mark question. The document provides details about the exam format, sections, question types and marks for each question.
The document defines key concepts in theory of computation including symbols, alphabets, strings, languages, finite state machines, and regular languages. It explains that a finite state machine is defined using 5 tuples and has limited memory. Deterministic finite automata and nondeterministic finite automata are described as being different based on their transition functions. Regular languages are those recognized by a finite state machine and cannot require storing strings. Operations on regular languages like union, intersection, and Kleene closure are also covered.
This document discusses theory of computation and finite automata. It begins by defining theory of computation as dealing with the logic of computation using abstract machines called automata. It then defines basic terminology like symbols, alphabets, strings, and languages. Next, it introduces finite automata as the simplest machines that recognize patterns using a finite set of states. Deterministic finite automata and nondeterministic finite automata are described as the two types of finite automata, differing in their transition functions. Transition diagrams and tables are also presented as ways to represent finite automata.
The document provides an introduction to theory of computation and automata. It defines key concepts such as symbols, alphabets, strings, languages, finite automata, deterministic finite automata (DFA), non-deterministic finite automata (NFA). It explains these concepts using examples and discusses their representation using transition diagrams, transition tables, and examples of DFAs recognizing specific languages.
This document discusses the limits of deterministic finite automata (DFAs) and nondeterministic finite automata (NDFAs). It shows that some languages, such as the language of palindromes, cannot be recognized by a DFA. While NDFAs are more powerful than DFAs, any NDFA can be converted to an equivalent DFA. The document provides an example of converting an NDFA to a DFA by constructing a new DFA with powerset states based on the NDFA's transition function. In conclusion, finite automata are not powerful enough to recognize languages like arithmetic expressions; more powerful machines will be discussed in later chapters.
The document discusses context-free languages and pushdown automata. It defines context-free grammars and languages, and provides examples of grammars and the strings they generate. It also defines pushdown automata formally as a 6-tuple with states, input alphabet, stack alphabet, transition function, start state, and accept states. Pushdown automata are similar to finite automata but have an additional stack which allows them to recognize some non-regular languages.
1. The document contains questions from various computer science subjects including formal languages and automata, regular expressions and languages, pushdown automata, and context-free languages and Turing machines.
2. It includes definitions, examples, differences between models like DFAs and NFAs, properties of languages, and questions asking to construct automata or grammars for specific languages.
3. Several questions ask students to prove statements about language classes, pumping lemmas, ambiguity in grammars, and the equivalence of computational models like PDAs and Turing machines.
This document provides solutions to practice problems for a final exam in computer science. It defines various terms related to sets, languages, automata, and complexity classes. It also provides proofs that the language ATM is undecidable but Turing-recognizable, and classifies several example languages as regular, context-free, or Turing-decidable.
This document discusses properties of regular languages and techniques for determining whether a language is regular or not. It covers topics like closure properties of regular languages under operations like union, intersection, and reversal. It also explains how to use the pumping lemma and non-constructive proofs like contradiction to show that a language is not regular. Examples are provided to illustrate how to apply these techniques to analyze languages and prove regularity or non-regularity.
A pushdown automaton (PDA) is a type of automaton that extends a non-deterministic finite automaton (NFA) with a stack. A PDA uses its stack to "remember" an infinite amount of information, allowing it to recognize context-free languages that cannot be recognized by finite state machines. Formally, a PDA is defined as a 7-tuple that specifies its set of states, input alphabet, stack alphabet, initial/starting state, starting stack symbol, set of accepting states, and transition function which defines how the PDA changes states and manipulates symbols on the stack.
This document provides an overview of finite automata, including deterministic finite automata (DFAs) and non-deterministic finite automata (NFAs). It defines what a finite automaton is, describes the components of a DFA and NFA, and how they process input strings. It also discusses the relationship between DFAs and NFAs, showing that any language recognizable by an NFA is also recognizable by a DFA through subset construction. Examples are provided to illustrate DFA and NFA design.
This document provides an overview of finite automata and regular languages. It defines deterministic finite automata (DFAs) and non-deterministic finite automata (NFAs) as state machines that can recognize regular languages. A DFA has a single active state at any time and deterministic transitions, while an NFA can have multiple active states and non-deterministic transitions. The document shows that NFAs and DFAs are equivalent in their expressive power by describing how to convert any NFA to an equivalent DFA using subset construction.
Here are the steps to solve the assignments:
1. Draw NFA and DFA over L = {0, 1} where machine should only accept at least two 1s
NFA:
A
1
B
0,1
1
C
DFA:
A
1
B
1
C
2. Draw DFA for following state transition table of NFA:
A {A} {A, B}
B {C} {C}
C Փ Փ
0 1
DFA:
A
0,1
B
1
C
The key steps are to identify the states of the N
Automata theory - describes to derives string from Context free grammar - derivation and parse tree
normal forms - Chomsky normal form and Griebah normal form
This document discusses finite automata, including deterministic finite automata (DFAs) and non-deterministic finite automata (NFAs). It defines them formally using 5-tuples and explains how they work on input strings to determine whether to accept or reject them. Specifically, it contrasts that DFAs have deterministic transitions to a single state, while NFAs can have non-deterministic transitions to multiple states. However, both models have equivalent computational power to recognize formal languages.
Similar to Pushdown AutomataChapter 12Recognizing Context-F.docx (20)
Your employer is pleased with your desire to further your educatio.docxwoodruffeloisa
Your employer is pleased with your desire to further your education and would like you to inform other employees about the process of online education; however, she still has questions about applying. Using proper memo format, and Figure 6-1 of the textbook, explain the process of applying for a degree at CSU. Use word processing software, such as Microsoft Word, to create your memo.
Your response should be at least 200 words in length. You are required to use at least your textbook as source material for your response. All sources used, including the textbook, must be referenced; paraphrased and quoted material must have accompanying citations.
Pfeiffer, W., & Adkins, K. (2012, 109-110).
Technical communication fundamentals
. Upper Saddle River, NJ: Prentice Hall.
.
Your finished project, including both elements of the paper, should .docxwoodruffeloisa
Your finished project, including both elements of the paper, should be approximately 12 to 14 double-spaced pages, not including the cover or reference pages but including the abstract, submitted as one document. Make sure you present an introduction and a conclusion tying together both aspects of the paper. Follow the guidelines in either Course Content or in the conference. You must post your selection in this conference. The paper is due at the end of week 8 and must be submitted in your Assignments folder. Review the late policy above. The paper will not be accepted late.
.
Your first task is to find a public budget to analyze. It is suggest.docxwoodruffeloisa
Your first task is to find a public budget to analyze. It is suggested you focus on a city/county department, a small municipality/township, a school district, a special district (such as a forest preserve district, stadium district, or water district), a community college, a small public university, or a single state agency.
Be sure not to choose a budget that is too large to analyze in one written exercise. Most budgets are readily available on the institution’s website or by contacting the budgeting/finance department. Many local libraries will also have these documents.
In your analysis, you should address the following items/questions:
Offer a brief overview of your chosen agency. What are its primary functions and roles in the community?
What are the primary expenditures for your chosen agency?
How do these expenditures determine public policy priorities?
Has the agency’s budget increased or decreased since last year? What does this indicate about the success of the agency and its ability to deliver services?
Is the agency allocating resources wisely?
What recommendations would you offer, in terms of resource allocation, for the agency in the future?
The entire budgetary analysis should be 8 to 10 pages in length and should be submitted in Unit VIII. The Final Project
must incorporate no fewer than five (5) peer-reviewed journal articles to bolster your analysis of the budget. You should be able to apply the theories learned in class to your case. The project must conform to APA format, and all sources must be properly cited and referenced.
.
Your essay should explain the trip from your personal point of view,.docxwoodruffeloisa
The essay should be written from your personal point of view about the trip, explaining your experience and what you learned without just listing historical facts or timelines. It should discuss your impressions of the location, any surprises or disappointments, and any knowledge or wisdom you gained from the trip.
Your dilemma is that you have to make a painful medical decision and.docxwoodruffeloisa
Your dilemma is that you have to make a painful medical decision and
to explain, in writing, who benefits from what you decided, who gets
denied a needed benefit, and why. The document is to be in the form of
an official memorandum that will be kept for the record and could be
potentially read by not only your Peer Review Committee, but also
possibly those involved in charitable fundraising to support hospital
development and others with financial interests in the choice made.
Include in the document the utilitarian ethical philosophy of John
Stuart Mill (The Ethics of Consequences) and ONE OTHER ETHICAL
PHILOSOPHER of your choice and use both of those philosophies to bolster your decision.
We can do John Stuart Mill and Jeremy Bentham for the two utilitarian ethical philosopher. They said: The Principle of Utility from Bentham and Mill expressed in ethical form is this: “We should act in such a way as to maximize the happiness of everyone affected by our actions.” This was a radical idea, because it included no references to religion and had a purely human focus. It was also teleological (learn this new word), because it focused only on the consequences of decisions.
This paper will be at least two double spaced pages but
limited to three pages. Remember both professional written form and
potential audience, as well as tone when writing this sensitive paper.
Your assignment is to make the decision using utilitarian ethics and
then to write it up in the form of a Memorandum for the hospital
records.
The Memorandum should be at least two double-spaced pages with a
maximum of three pages, in memorandum form, ready to become an
official item of record.
Scenario You Decide
One of the great ongoing situations that calls for ethical decision
making is the reality that there is almost always a greater need for
something than there is a supply to meet the need.
For our assignment and scenario, the demand is the life-and-death
situation of the need for transplantable organs and the rather small
and transitory supply. Hard decisions need to be made, and there is
little time to think things through. These are emergency situations.
Transplantable organs become available on short notice--usually
because a donor has died for reasons unrelated to the organ. They need
to be removed and transplanted very quickly because they only remain
fresh for a limited period. Then there is the whole complicated issue
of tissue type matching. There is also an ongoing concern about how
long recipients can wait.
Scenario:
Ok, Lead Surgeon, its time to do what you do the best!
You are the Lead surgeon in a major hospital, and by virtue of your
seniority you are also the key decision maker for transplant cases.
Right now you have three people who are waiting and hoping for a
suitable heart to become available. Your call phone rings suddenly,
and you are notified that a heart has become available- meaning that
you need to make a quick yet sound decision about which patient wil.
your definition of moral reasoning. Then, compare two similarities.docxwoodruffeloisa
your definition of moral reasoning. Then, compare two similarities and two differences in moral reasoning across the two cultures you selected. Finally, describe two culture-specific factors that might lead to these differences and explain how.
and the two cultures that I selected is Muslim and India's
.
Your company is in the process of updating its networks. In preparat.docxwoodruffeloisa
Your company is in the process of updating its networks. In preparation for the upgrade, your CEO has requested that you write a white paper (search term: White paper template) explaining the various telecommunication technologies. Begin by explaining basic telecommunication channel characteristics (minimum 5). Next discuss at least three network types (for example: Local Area Network/LAN). Then differentiate between client/server networks and peer to peer networks. Finally, recommend a network type and identify and describe three types of telecommunications hardware that will be required to set up this network. Conclude by explaining three things the company can do to secure their network.
.
Your company has just announced that a new formal performance evalua.docxwoodruffeloisa
Your company has just announced that a new formal performance evaluation system will be used (effective immediately). One of your supervisor's anniversary date is coming up and the human resources (HR) manager has asked you not only to rate this supervisor but to develop a grading form to use for her and other supervisors.
Assess the leadership, interpersonal skills, and earned values on other areas of concentration you deem necessary to rate the overall performance of any supervisor you have worked with, observed, know of, worked for, been supervised by, or supervised. Include your objective reasoning for eachassigned grade with an explanation of one or more sentences.
For example, on a scale of 1–9 (superior performance), you rate the supervisor as a 4; your explanation might be as follows:
Rarely held department meetings
Poor verbal communication skills
Uses foul language when counseling employees
.
Your CLC team should submit the followingA completed priority.docxwoodruffeloisa
Your CLC team should submit the following:
A completed priority analysis
Determination of which project is to be undertaken first, along with a summary of why the project was chosen, including an explanation of the relationship between the project and the organization’s mission, vision, and objectives
I AM ONLY RESPONSIBLE FOR QUESTION TWO.
Please see attachment for completed project.
.
Your classroom will be made up of diverse children. Research what va.docxwoodruffeloisa
Your classroom will be made up of diverse children. Research what varying cultures are represented in your community and the school/district resources that are available to support families. Also, include additional resources that may not be directly provided by the school or school district.
Write a 500-750-word plan for community culture that will support families in the school/district. Include information about the varying cultures in the community.
Identify how selected resources can provide positive support for families. This assignment can be presented as a brochure or document; be creative.
.
Your business plan must include the following1.Introduction o.docxwoodruffeloisa
Your business plan must include the following:
1.
Introduction of the proposed business;
2.
Description and explanation of the type of business entity that is best for your business;
3.
Description of the specific steps needed to be followed to successfully and legally start the business;
4.
A draft of a valid contract with a vendor, supplier, customer, etc. that illustrates all elements of a contract and takes into consideration some of the topics discussed in the contract chapters;
5.
Possible ethical considerations for your business, including any social responsibility plans or attitudes that your business will embrace;
6.
Description of a possible disagreement that could be encountered among the partners or investors and shareholders; and
7.
Illustration of the various ways the disagreement could be resolved (referring back to the formal documents, such as the articles of incorporation or the partnership agreement).
This paper must be 1,500–2,100 words, double-spaced, Times New Roman font or similar, and include at least 3 citations/sources in current APA format.
.
Your assignment is to write a formal response to this work. By caref.docxwoodruffeloisa
Your assignment is to write a formal response to this work. By carefully describing subject matter, medium, form, and context, you should be able to arrive at a thoughtful well -defended interpretation of the piece. (1) Describe it . Thoroughly. If it is representational, what is the subject matter depicted? If it is non -representational, say so. What does it look like? What is the medium? Have we studied/do you know anything about the process that resulted in the work? What size is it? Is it a 2 -dimensional or 3 -dimensional piece? Which formal elements stand out to you? What are the colors being used? Be as descriptive as possible. (2) Contextualize it . What is the title? What is the name of the artist who created it? Do you know anything about the artist? Is there a statement giving you more information? In which year was it made? Where is it being displayed as you are looking at it? How is it being displayed? Are there other works by the same artist there to give you more context? Can you compare and contrast it to other works you’ve seen elsewhere or studied ? (3) Interpret it. Based on your description, what do you think the artist was trying to say? It may be difficult to separate this interpretation from the descriptive process and it is okay if the two aspects are interwoven. (4) Respond to it. Though I am not interested in merely hearing whether or not you like the piece, I also want you to meaningful respond to the work. As art -critic Peter Scheldahl proposes, a question more valuable to ask yourself can be, “If I were someone who did like this piece, why would I like it?” Who is its intended audience and are you among that audience? Why did you choose this particular piece? What does it make you think about? Why do you think that the artist made the choices that she or he did? Do you agree with all of those choices? Is the artist’s intention clear/well -executed? How do you feel about the way in which the work is being displayed? Would it be more suitably exhibited somewhere else or alongside different work? This part of the paper may contain judgments, but at this point they will be well founded. Never make a proclamation without continuing the sentence with the because… Your response should be a minimum of one and a half double -spaced pages, 12 point font. If you are thorough in your description, you should find that you easily exceed this length.
Name of this Artwork: The Black Ring
.
Your assignment is to write about the ethical theory HedonismYour.docxwoodruffeloisa
This assignment asks students to write a graduate-level critical review summarizing the ethical theory of hedonism and how it relates to ethical and unethical behavior in the criminal justice system, supported with additional research. Students must discuss how hedonism, which focuses on pleasure as the ultimate good, is applied to criminal justice practices and decision making.
Your assignment is to write a short position paper (1 to 2 pages dou.docxwoodruffeloisa
Your assignment is to write a short position paper (1 to 2 pages double spaced, or roughly 250-500 words) answering ONE of the following two questions:
(1) How much appropriation do you think is justifiable in creating new works of art which draw on previously existing source material? As case studies, consider Nina Paley’s use of Annette Hanshaw’s music in
Sita Sings the Blues
and Shepard Fairey’s adaptation of an Associated Press news photograph for his 2008 Barack Obama “Hope” campaign poster. In each case, do you feel the artist was right or wrong in the way they used the material? Were the corporate entities involved right or wrong to claim their copyrights gave them the power to suppress these works?
-OR-
(2) When an artist freely adapts material that is strongly associated with a culture other than his or her own, does that artist have a special responsibility to avoid offending some members of that culture? Would the same standards apply to an artist from within the culture? As a case study, consider Nina Paley’s contemporary retelling of the Ramayana epic in
Sita Sings the Blues
. Some Hindus condemned the film while other Hindus applauded it. When, if ever, should an artist compromise his or her vision in deference to interest groups claiming offense?
Whichever question you choose, you may argue pro or con or somewhere in between, but whatever side you are on, you should avoid emotional rants and baseless charges. Summarize each side’s position, and use specific evidence and sound reasoning to support your case. Your writing will be assessed according to the amount of time and thought you put into the work, the persuasiveness of your reasoning, and the clarity of your writing. You may refer to outside sources if properly cited, but do not copy from websites or other authors; use your own words. As always, grammar, spelling, and style count; be sure to proofread your paper for any mistakes.
.
Your assignment is to report on a cultural experience visit you .docxwoodruffeloisa
Your assignment is to report on a "cultural experience" visit you make during this term. The experience should be done in person. (If this is impossible, contact the instructor to arrange for an alternative assignment.) You may not report on a cultural experience from prior to this class. After the visit, write a 500-800 word report about the visit and what you learned.
You should attend or visit one of the following.
a museum or display of art, culture, or technology
a sculpture garden
a significant or notable architectural site (if there is explanatory material there to help you understand it)
a music concert
a street art festival
a play, poetry reading or other spoken word performance
a dance performance
an important or notable historical site (if there is explanatory material there to help you understand it)
a religious service, ceremony or ritual for a religion very different from yours, if you practice (for instance, if you are Christian, you may not go to another Christian denomination's service)
other displays or performances
may
be acceptable.
Check with your instructor for approval beforehand.
After your
cultural experience visit,
write a report that includes the following information. (Please number the sections of your report to match):
Name and location of the museum, site, or event. If there is on-line information about the site or performance, include a link.
Type of museum, site or event. For example, is it a portrait museum, a poetry slam, an outdoor Shakespeare festival performance? If you attended a performance, name the performer or the piece. Be specific about
what
you attended,
when
, and
where
.
Briefly describe the general setting.
Describe
one or more parts or aspects
of the experience—for example, a particular work of art, cultural artifact, song, dance section, scene in a play, costumes or lighting, one particular actor or vocalist—that you found especially interesting. Explain what impressed you, and why. Your reaction can be positive or negative, as long as you offer an explanation for your reactions.
Identify and use at least two things you've learned in class to that you can connect to your experience. For example, if you visit a museum, you might point out the architectural style, discuss an artist you've learned about in the course, tie in your experience with a class discussion, make use of a concept presented in a class assignment. We've learned how visual arts and musical arts ( hearing are and can be different as you get a differen experence from it), also we have learned that different experiences bring different meaning and different ways of seeing things.
Include photos or links to images on a web page to help convey the information.
How did the experience engage your feelings or emotions, if at all? What does this tell you about human culture
Reflect on the relevance--if any--of your experience to your everyday life.
.
Your assignment is to create a Visual Timeline” of 12 to 15 images..docxwoodruffeloisa
You are assigned to create a visual timeline of 12-15 images that chronologically illustrates the growth of American art from pre-Columbian cultures to modern art of the 1950s. You should select artists such as Jacob Lawrence, Georgia O'Keeffe, Andrew Wyeth, George Bellows, or Elizabeth Catlett that best represent America's artistic heritage. Provide a brief introduction explaining your selection process and labeling each image with the artist, title, dimensions, medium, and date.
Your annotated bibliography will list a minimum of six items. .docxwoodruffeloisa
Your annotated bibliography will list a minimum of
six items
.
Four
of them must be from credible, academic, peer-reviewed sources that you find as you do research for the final essay.
The remaining two
sources must be credible, but they can come from sources other than academic journals if you wish. When you write, use standard MLA typographic and citation format, and then extend each Works Cited entry with a summary of the major arguments in the essay you have read. Each summary must contain
a minimum of 100 words
.
If desired, append a list of “Works Consulted” for sources used that are
not
peer-reviewed.
Basic MLA Style Format for an Annotated Bibliography
Format your page and list of citations in the same way you would a normal Works Cited page, then add your annotation at the end of it.
Title your bibliography “Works Cited” at the top of the page. Center it, but do not put it in bold face type.
Put entries in alphabetical order, not the order in which they have been assigned.
Use hanging indents
, as shown below. That is, the first line of the citation starts at the left margin. Subsequent lines are indented 5 spaces.
As with every other part of an MLA formatted essay, the bibliography is
double spaced
throughout.
The
annotation is a continuation of the citation
. Do not drop down to the next line to start the annotation.
The
right margin is the normal right margin
of your document.
There is a right way and a wrong way to write up these entries.
Don’t “report”
the arguments the author makes or tell readers the order in which those arguments are presented and count all of that reporting and listing as “summary” or annotation. Instead, restate in your own words the claims made by the writer in his/her essay.
Wrong way to do it
: "Marotti introduces his argument in the first section of the essay; then he moves on to talk about Petrarchan conventions. He ends the essay by talking about the political ramifications of Shakespeare's sonnets."
Right way to do it:
"Marotti’s argument here is that the sonnet genre must be understood in three ways: by examining the text itself, by examining the text in relation to others of its kind, and by exploring the social/historical environment in which it was published and circulated . . ."
Sample Annotations
NOTE:
These entries provide models of both format and content. They summarize—rather than “report”—the essay described.
Marotti, Arthur F. ""Love is Not Love": Elizabethan Sonnet Sequences and the Social Order."
ELH
2(1982): 396-428. Marotti’s argument here is that the sonnet genre must be understood in three ways: by examining the text itself, by examining the text in relation to others of its kind, and by exploring the social/historical environment in which it was published and circulated. Using those criteria, he argues that we should understand sonnet sequences as more than just a collected string of Petrarchan love poems. The 16
th
century sequences suddenly fell out o.
Your business plan must include the following1.Introduction of .docxwoodruffeloisa
Your business plan must include the following:
1. Introduction of the proposed business;
2. Description and explanation of the type of business entity that is best for your business;
3. Description of the specific steps needed to be followed to successfully and legally start the business;
4. A draft of a valid contract with a vendor, supplier, customer, etc. that illustrates all elements of a contract and takes into consideration some of the topics discussed in the contract chapters;
5. Possible ethical considerations for your business, including any social responsibility plans or attitudes that your business will embrace;
6. Description of a possible disagreement that could be encountered among the partners or investors and shareholders; and
7. Illustration of the various ways the disagreement could be resolved (referring back to the formal documents, such as the articles of incorporation or the partnership agreement).
This paper must be 1,500–2,100 words, double-spaced, Times New Roman font or similar, and include at least 3 citations/sources in current APA format.
.
you wrote an analysis on a piece of literature. In this task, you wi.docxwoodruffeloisa
you wrote an analysis on a piece of literature. In this task, you will write an analysis (
suggested length of 3–5 pages
) of one work from the disciplines of visual art or music. Choose
one
work from the list below:
Classical Period
Art:
• Exekias,
Achilles and Ajax Playing a Dice Game
(Athenian black-figure amphora), ca. 540−530 BCE
• Praxiteles,
The Aphrodite of Cnidus (Knidos)
c. 350 BCE
• Alexandros of Antioch,
Venus de Milo
, between 130−100 BCE
• Apollodorus of Damascus,
Trajan’s Column
, c. 107 CE
• After Leochares,
Apollo Belvedere
, c. 120 CE
• Agesander, Athenodorus, and Polydorus of Rhodes,
The Laocoön Group
, Late 2nd Century
Renaissance
Art:
• Leonardo da Vinci,
Annunciation
, c. 1472
• Titian,
Bacchus and Ariadne
, c,1520
• Hans Holbein the Younger,
The Ambassadors
, 1533
• Marcus Gheeraerts the Younger,
Queen Elizabeth I (Ditchley Portrait)
, c. 1592
Music:
• Josquin des Prez, Mille Regretz (French Chanson), c. 1521
• Giovanni Pierluigi da Palestrina,
Sicut Cervus
(motet), c. 1581
• Thomas Morley,
Now is the Month of Maying
, 1595
• John Farmer,
Fair Phyllis
(English Madrigal) 1599
NeoClassical (Art) / Classical (Music)
Art:
• Antonio Canova,
Psyche Revived by Cupid’s Kiss
, c. 1777
• Jacques Louis David,
The Death of Socrates
, 1787
• Sir John Soane,
Bank of England
, 1788–1833
• Ingres,
La Grande Odalisque
, 1814
Music:
• W.A. Mozart, Piano Concerto No. 20 in D Minor, K. 466 – “Romanze” (second movement), 1785
• W.A. Mozart, Overture to
The Marriage of Figaro
K. 492, 1786
• Franz Joseph Haydn, Symphony No. 94 in G Major (
Surprise
), 1792
• Ludwig van Beethoven, Symphony No. 5 in C Minor, Op. 67,”Allegro con brio” (first movement), 1804–1808
Romanticism
Art:
• Henry Fuseli,
The Nightmare
, 1781
• John Constable,
The Hay Wain
, 1821
• Eugene Delacroix,
The Death of Sardanapalus
, 1827
• J.M.W. Turner,
Slave Ship
, 1840
Music:
• Franz Schubert,
Erlking
D.328 (Lied), 1815
• Hector Berlioz,
Dream of the Witches’ Sabbath
from
Symphonie fantastique
, 1830
• Clara Schumann,
4 pieces fugitives
, Op.15, 1853
• Bedrich Smetana,
The Moldau from Má Vlast
, 1874
Realism
Art:
• Gustave Courbet,
The Stone Breakers
, 1849
• Rosa Bonheur,
The Horse Fair
, 1852-1855
• James Whistler,
Arrangement in Grey and Black, No.1: Portrait of the Artist's Mother
, 1871
• Édouard Manet,
A Bar at the Folies-Bergère
, 1882
Music:
• Stephen Foster,
Old Folks at Home
,1851
• John Philip Sousa,
The Stars and Stripes Forever
, 1896-97
• Giacomo Puccini,
Madama Butterfly
, 1904
• Julia Ward Howe,
The Battle Hymn of the Republic
, 1862
Use the link near the bottom of this page to access direct links to the works listed above.
Once you have selected and viewed the work, you will create a paragraph of descriptive writing with your personal observati.
You work for a small community hospital that has recently updated it.docxwoodruffeloisa
You have been asked to analyze the efficiency, security, and privacy of your hospital's recently updated electronic health record system and provide a 5-7 page executive summary report to the COO. The report should examine the emergence of health technology and EHRs since HIPAA, analyze current trends in health records and charting as they relate to advances in technology, and assess how modern patient record systems can support operations through privacy, quality care, cost administration, and records access and retention.
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.pptHenry Hollis
The History of NZ 1870-1900.
Making of a Nation.
From the NZ Wars to Liberals,
Richard Seddon, George Grey,
Social Laboratory, New Zealand,
Confiscations, Kotahitanga, Kingitanga, Parliament, Suffrage, Repudiation, Economic Change, Agriculture, Gold Mining, Timber, Flax, Sheep, Dairying,
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumMJDuyan
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 𝟏)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
𝐃𝐢𝐬𝐜𝐮𝐬𝐬 𝐭𝐡𝐞 𝐄𝐏𝐏 𝐂𝐮𝐫𝐫𝐢𝐜𝐮𝐥𝐮𝐦 𝐢𝐧 𝐭𝐡𝐞 𝐏𝐡𝐢𝐥𝐢𝐩𝐩𝐢𝐧𝐞𝐬:
- Understand the goals and objectives of the Edukasyong Pantahanan at Pangkabuhayan (EPP) curriculum, recognizing its importance in fostering practical life skills and values among students. Students will also be able to identify the key components and subjects covered, such as agriculture, home economics, industrial arts, and information and communication technology.
𝐄𝐱𝐩𝐥𝐚𝐢𝐧 𝐭𝐡𝐞 𝐍𝐚𝐭𝐮𝐫𝐞 𝐚𝐧𝐝 𝐒𝐜𝐨𝐩𝐞 𝐨𝐟 𝐚𝐧 𝐄𝐧𝐭𝐫𝐞𝐩𝐫𝐞𝐧𝐞𝐮𝐫:
-Define entrepreneurship, distinguishing it from general business activities by emphasizing its focus on innovation, risk-taking, and value creation. Students will describe the characteristics and traits of successful entrepreneurs, including their roles and responsibilities, and discuss the broader economic and social impacts of entrepreneurial activities on both local and global scales.
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPRAHUL
This Dissertation explores the particular circumstances of Mirzapur, a region located in the
core of India. Mirzapur, with its varied terrains and abundant biodiversity, offers an optimal
environment for investigating the changes in vegetation cover dynamics. Our study utilizes
advanced technologies such as GIS (Geographic Information Systems) and Remote sensing to
analyze the transformations that have taken place over the course of a decade.
The complex relationship between human activities and the environment has been the focus
of extensive research and worry. As the global community grapples with swift urbanization,
population expansion, and economic progress, the effects on natural ecosystems are becoming
more evident. A crucial element of this impact is the alteration of vegetation cover, which plays a
significant role in maintaining the ecological equilibrium of our planet.Land serves as the foundation for all human activities and provides the necessary materials for
these activities. As the most crucial natural resource, its utilization by humans results in different
'Land uses,' which are determined by both human activities and the physical characteristics of the
land.
The utilization of land is impacted by human needs and environmental factors. In countries
like India, rapid population growth and the emphasis on extensive resource exploitation can lead
to significant land degradation, adversely affecting the region's land cover.
Therefore, human intervention has significantly influenced land use patterns over many
centuries, evolving its structure over time and space. In the present era, these changes have
accelerated due to factors such as agriculture and urbanization. Information regarding land use and
cover is essential for various planning and management tasks related to the Earth's surface,
providing crucial environmental data for scientific, resource management, policy purposes, and
diverse human activities.
Accurate understanding of land use and cover is imperative for the development planning
of any area. Consequently, a wide range of professionals, including earth system scientists, land
and water managers, and urban planners, are interested in obtaining data on land use and cover
changes, conversion trends, and other related patterns. The spatial dimensions of land use and
cover support policymakers and scientists in making well-informed decisions, as alterations in
these patterns indicate shifts in economic and social conditions. Monitoring such changes with the
help of Advanced technologies like Remote Sensing and Geographic Information Systems is
crucial for coordinated efforts across different administrative levels. Advanced technologies like
Remote Sensing and Geographic Information Systems
9
Changes in vegetation cover refer to variations in the distribution, composition, and overall
structure of plant communities across different temporal and spatial scales. These changes can
occur natural.
This presentation was provided by Rebecca Benner, Ph.D., of the American Society of Anesthesiologists, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
This document provides an overview of wound healing, its functions, stages, mechanisms, factors affecting it, and complications.
A wound is a break in the integrity of the skin or tissues, which may be associated with disruption of the structure and function.
Healing is the body’s response to injury in an attempt to restore normal structure and functions.
Healing can occur in two ways: Regeneration and Repair
There are 4 phases of wound healing: hemostasis, inflammation, proliferation, and remodeling. This document also describes the mechanism of wound healing. Factors that affect healing include infection, uncontrolled diabetes, poor nutrition, age, anemia, the presence of foreign bodies, etc.
Complications of wound healing like infection, hyperpigmentation of scar, contractures, and keloid formation.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
Temple of Asclepius in Thrace. Excavation resultsKrassimira Luka
The temple and the sanctuary around were dedicated to Asklepios Zmidrenus. This name has been known since 1875 when an inscription dedicated to him was discovered in Rome. The inscription is dated in 227 AD and was left by soldiers originating from the city of Philippopolis (modern Plovdiv).
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
1. Pushdown Automata
Chapter 12
Recognizing Context-Free Languages
Two notions of recognition:
(1) Say yes or no, just like with FSMs
(2) Say yes or no, AND
if yes, describe the structure
a + b * c
Just Recognizing
We need a device similar to an FSM except that it needs more
power.
The insight: Precisely what it needs is a stack, which gives it
an unlimited amount of memory with a restricted structure.
Example: Bal (the balanced parentheses language)
(((()))
2. Definition of a Pushdown Automaton
K is a finite set of states
ion relation. It is a finite subset of
symbols symbols
to pop to push
from top on top
of stackof stack
Definition of a Pushdown Automaton
Manipulating the Stack
c will be written as cab
a
b
If c1c2…cn is pushed onto the stack:
3. c1
c2
cn
c
a
b
c1c2…cncab
Yields
Then:
-
Let |-M* be the reflexive, transitive closure of |-M.
C1 yields configuration C2 iff C1 |-M* C2
Computations
A computation by M is a finite sequence of configurations C0,
● C0 is an initial configuration,
4. ● Cn is of the
● C0 |-M C1 |-M C2 |-M … |-M Cn.
Nondeterminism
Accepting
A computation C of M is an accepting computation iff:
-
M accepts a string w iff at least one of its computations accepts.
Other paths may:
● Read all the input and halt in a nonaccepting state,
● Read all the input and halt in an accepting state with the
stack not
empty,
● Loop forever and never finish reading the input, or
● Reach a dead end where no more input can be read.
The language accepted by M, denoted L(M), is the set of all
strings accepted by M.
5. Rejecting
A computation C of M is a rejecting computation iff:
-
● C is not an accepting computation, and
M rejects a string w iff all of its computations reject.
So note that it is possible that, on input w, M neither accepts
nor rejects.
A PDA for Balanced Parentheses
A PDA for Balanced Parentheses
K = {s}the states
A = {s}
**Important: This does not mean that the stack is empty
6. K = {s, f}the states
stack alphabet
A = {f}the accepting states
Exploiting Nondeterminism
7. A PDA M is deterministic iff:
other, and
● Whenever M is in an accepting configuration it has no
available moves.
But many useful PDAs are not deterministic.
A PDA:
A PDA:
8. More on Nondeterminism
Accepting Mismatches
Start with the case where n = m:
1
2
More on Nondeterminism
Accepting Mismatches
Start with the case where n = m:
● If stack and input are empty, halt and reject.
● If input is empty but stack is not (m > n) (accept):
● If stack is empty but input is not (m < n) (accept):
1
2
More on Nondeterminism
Accepting Mismatches
9. ● If input is empty but stack is not (m < n) (accept):
1
2
2
1
3
More on Nondeterminism
Accepting Mismatches
● If stack is empty but input is not (m > n) (accept):
/a
1
2
2
1
4
10. Putting It Together
● Jumping to the input clearing state 4:
Need to detect bottom of stack.
● Jumping to the stack clearing state 3:
Need to detect end of input.
The Power of Nondeterminism
PDA for it?
The Power of Nondeterminism
der}, and
unequal numbers of a’s, b’s, and c’s).
11. Are the Context-Free Languages Closed Under Complement?
If the CF languages were closed under complement, then
would also be context-free.
But we will prove that it is not.
s
12. a's
Reducing Nondeterminism
● Jumping to the input clearing state 4:
Need to detect bottom of stack, so push # onto the
stack before we start.
● Jumping to the stack clearing state 3:
Need to detect end of input. Add to L a termination
character (e.g., $)
Reducing Nondeterminism
● Jumping to the input clearing state 4:
Reducing Nondeterminism
● Jumping to the stack clearing state 3:
More on PDAs
What about a PDA to accept {
PDAs and Context-Free Grammars
Theorem: The class of languages accepted by PDAs is exactly
the class of context-free languages.
Recall: context-free languages are languages that
can be defined with context-free grammars.
13. Restate theorem:
Can describe with context-free grammar
Can accept by PDA
Going One Way
Lemma: Each context-free language is accepted by some PDA.
Proof (by construction):
The idea: Let the stack do the work.
Two approaches:
Top down
Bottom up
Top Down
The idea: Let the stack keep track of expectations.
Example: Arithmetic expressions
14. A Top-Down Parser
The outline of M is:
● The start-
Example of the Construction
L = {anb*an}
0 (p,
15. transstate unread inputstack
0 q a a b b a aS
3 q a a b b a aaSa
6 q a b b a aSa
3 q a b b a aaSaa
6 q b b a aSaa
2 q b b a aBaa
5 q b b a abBaa
7 q b a aBaa
5 q b a abBaa
7 q a aBaa
4 q a aaa
6 q aa
Another Example
L = {anbmcpdq : m + n = p + q}
Another Example
L = {anbmcpdq : m + n = p + q}
16. input = a a b c d d
Another Example
L = {anbmcpdq : m + n = p + q}
(
(
transstate unread input stack
The Other Way to Build a PDA - Directly
L = {anbmcpdq : m + n = p + q}
17. input = a a b c d d
The Other Way to Build a PDA - Directly
L = {anbmcpdq : m + n = p + q}
c
input = a a b c d d
1
2
3
4
18. Notice Nondeterminism
Machines constructed with the algorithm are often
nondeterministic, even when they needn't be. This happens
even with trivial languages.
A grammar for AnBn is:A PDA M for AnBn is:
(4)
But transitions 1 and 2 make M nondeterministic.
A directly constructed machine for AnBn:
Bottom-Up
19. Reduce Transitions:
(2) (p
Shift Transitions
The idea: Let the stack keep track of what has been found.
A Bottom-Up Parser
The outline of M is:
● The reduce transi
each rule
20. Going The Other Way
Lemma: If a language is accepted by a pushdown automaton M,
it is context-free (i.e., it can be described by a context-free
grammar).
Proof (by construction):
Step 1: Convert M to restricted normal form:
special
symbol # onto the stack and then transfer to a state s from
which
the rest of the computation begins. There must be no
transitions
● M has a single accepting state a. All transitions into a pop
# and
read no input.
exactly one
symbol from the stack.
Converting to Restricted Normal Form
Example:
21. Pop no more than one symbol:
M in Restricted Normal Form
[1] ((s, a, #), (s, a#)),
((s, a, a), (s, aa)),
((s, a, b), (s, ab)),
[2] ((s, b, #), (s, b#)),
((s, b, a), (s, ba)),
((s, b, b), (s, bb)),
[3] ((s, c, #), (f, #)),
((s, c, a), (f, a)),
((s, c, b), (f, b))
Must have one transition for everything that could have been on
the top of the stack so it can be popped and then pushed back
on.
Pop exactly one symbol: Replace [1], [2] and [3] with:
[1]
[2]
[3]
Second Step - Creating the Productions
22. Example: WcWR
M =
The basic idea –
simulate a leftmost derivation of M on any input string.
Second Step - Creating the Productions
Example:
abcba
Nondeterminism and Halting
1. There are context-free languages for which no deterministic
PDA exists.
2. It is possible that a PDA may
● not halt,
● not ever finish reading its input.
3. There exists no algorithm to minimize a PDA. It is
undecidable whether a PDA is minimal.
Nondeterminism and Halting
It is possible that a PDA may
● not halt,
● not ever finish reading its input.
{a} and consider M =
23. - (2, a, a) |-
On any other input except a:
● M will never halt.
Solution
s to the Problem
● For NDFSMs:
● Convert to deterministic, or
● Simulate all paths in parallel.
● For NDPDAs:
● Formal solutions that usually involve changing the
grammar.
● Practical solutions that:
● Preserve the structure of the grammar, but
● Only work on a subset of the CFLs.
24. Alternative Equivalent Definitions of a PDA
Accept by accepting state at end of string (i.e., we don't care
about the stack).
= M.
3. Create a new accepting state qa.
4. For each accepting state a in M do,
Example
The balanced parentheses language
● FSM plus FIFO queue (instead of stack)?
25. ● FSM plus two stacks?
What About These?
Comparing Regular and
Context-Free Languages
Regular Languages Context-Free Languages
● regular exprs.
● or
● regular grammars ● context-free grammars
● recognize ● parse
● = DFSMs ● = NDPDAs
Discuss issue in Chapter 9
Discuss or argue whether you think wellness programs are an
intrusion of privacy.
Make certain you demonstrate you have read the 'Wellness
Programs' section in Chapter 9; do not post superfluous points
that do not directly relate to the issues
26. Follow the Argument Formula below
Context-Free and
Noncontext-Free Languages
Chapter 13
Languages That Are and
Are Not Context-Free
a*b* is regular.
-free but not regular.
27. -free.
Languages and Machines
The Regular and the CF Languages
Theorem: The regular languages are a proper subset of the
context-free languages.
Proof: In two parts:
Every regular language is CF.
There exists at least one language that is CF but not regular.
The Regular and the CF Languages
Lemma: Every regular language is CF.
Proof: Every FSM is (trivially) a PDA:
28. form: ( p, c, q )
old state, input, new state
becomes:
))
old state, input, don't new statedon't
look atpush on
stackstack
In other words, we just don’t use the stack.
There Exists at Least One Language that is CF but Not Regular
Lemma: There exists at least one language that is CF but not
regular
-free but not regular.
So the regular languages are a proper subset of the context-free
languages.
29. How Many Context-Free Languages Are There?
Theorem: There is a countably infinite number of CFLs.
Proof:
● Upper bound: we can lexicographically enumerate
all the CFGs.
● Lower bound: {a}, {aa}, {aaa}, … are all CFLs.
How Many Context-Free Languages Are There?
There is an uncountable number of languages.
Thus there are more languages than there are context-free
languages.
So there must exist some languages that are not context-free.
30. Showing that L is Context-Free
Techniques for showing that a language L is context-free:
1. Exhibit a context-free grammar for L.
2. Exhibit a PDA for L.
3. Use the closure properties of context-free languages.
Unfortunately, these are weaker than they are for
regular languages.
Showing that L is Not Context-Free
Remember the pumping argument for regular languages:
95.unknown
31. A Review of Parse Trees
rooted, ordered tree in which:
● The root node is labeled S,
● Every other node is labeled with some element of V -
● If m is a nonleaf node labeled X and the children of m are
Some Tree Basics
The height of a tree is the length of the longest path from the
root to any leaf.
The branching factor of a tree is the largest number of daughter
nodes associated with any node in the tree.
32. Theorem: The length of the yield of any tree T with height h
From Grammars to Trees
Given a context-free grammar G:
● Let n be the number of nonterminal symbols in G.
● Let b be the branching factor of G
Suppose that T is generated by G and no nonterminal appears
more than once on any path:
33. The maximum height of T is:
The maximum length of T’s yield is:
64.unknown
The Context-Free Pumping Theorem
This time we use parse trees, not automata as the basis for our
argument.
If w is “long”, then its parse trees must look like:
34. Choose one such tree such that there’s no other with fewer
nodes.
The Context-Free Pumping Theorem
35. There is another derivation in G:
in which, at the point labeled [1], the nonrecursive rule2 is
used.
So uxz is also in L(G).
The Context-Free Pumping Theorem
There are infinitely many derivations in G, such as:
36. Those derivations produce the strings:
uv2xy2z, uv3xy3z, …
So all of those strings are also in L(G).
The Context-Free Pumping Theorem
37. would create a parse tree with fewer nodes. But that contradicts
the assumption that we started with a tree with the smallest
possible number of nodes.
The Context-Free Pumping Theorem
The height of the subtree rooted at [1] is at most:
38. The Context-Free Pumping Theorem
The height of the subtree rooted at [1] is at most: n + 1
The Context-Free Pumping Theorem
39. If L is a context-free language, then
vxyz,
k serves two roles:
● How long must w be to guarantee it is pumpable?
● What’s the bound on |vxy|?
40. Let n be the number of nonterminals in G.
Let b be the branching factor of G.
What Is k?
41. If height(T) > n, then some nonterminal occurs more than once
on some path. So T is pumpable.
So if |uvxyz| > bn, w = uvxyz must be pumpable.
How Long Must w be?
Assume that we are considering the bottom-most two instances
of a repeated nonterminal. Then the yield of the upper one has
42. length at most bn+1.
So let k = bn+1.
What’s the Bound on |vxy|?
The Context-Free Pumping Theorem
If L is a context-
h n
nonterminal symbols and branching factor b. Let k be bn + 1.
The longest string that can be generated by G with no repeated
nonterminals in the resulting parse tree has length bn.
Assuming that b 2, it must be the case that bn + 1 > bn. So
43. let w be any string in L(G) where |w|
smallest parse tree for w. T must have height at least n + 1.
Choose some path in T of length at least n + 1. Let X be the
bottom-most repeated nonterminal along that path. Then w can
be rewritten as uvxyz. The tree rooted at [1] has height at most
n + 1. Thus its yield, vxy, has length less than or equal to
bn +
be a smaller parse tree for w and we chose T so that that wasn’t
so. uxz must be in L because rule2 could have been used
because rule1 could have been used q times before finally using
rule2.
Regular vs CF Pumping Theorems
Similarities:
● We choose w, the string to be pumped.
● We choose a value for q that shows that w isn’t pumpable.
● We may apply closure theorems before we start.
Differences:
44. ● Two regions, v and y, must be pumped in tandem.
● We don’t know anything about where in the strings v and y
will
fall. All we know is that they are reasonably “close
together”, i.e.,
● Either v or y could be empty, although not both.
An Example of Pumping: AnBnCn
An Example of Pumping: AnBnCn
Choose w = ak bk ck
1 | 2 | 3
45. An Example of Pumping: AnBnCn
Choose w = ak bk ck
1 | 2 | 3
If either v or y spans regions, then let q = 2 (i.e., pump in
once). The resulting string will have letters out of order and
thus not be in AnBnCn.
If both v and y each contain only one distinct character then set
q to 2. Additional copies of at most two different characters are
added, leaving the third unchanged. There are no longer equal
numbers of the three letters, so the resulting string is not in
AnBnCn.
47. vy = ap, for some nonzero p.
Set q to 2. The resulting string, s, is . It must be in L.
But it isn’t because it is too short:
w:next longer string in L:
(k2)2 a’s (k2 + 1)2 a’s
k4 a’sk4 + 2k2 + 1 a’s
For s to be in L, p = |vy| would have to be at least 2k2 + 1.
hus s is not in L and L
is not context-free.
48. Another Example of Pumping
Let w =
Another Example of Pumping
Let w = akbkak
aaa … aaabbb … bbbaaa … aaa
| 1 | 2 | 3 |
Nested and Cross-Serial Dependencies
a a b b a a
49. The dependencies are nested.
a a b c a a b
Cross-serial dependencies.
Let w = akbkcakbk.
aaa … aaabbb … bbbcaaa … aaabbb … bbb
| 1 | 2 |3| 4 | 5 |
50. Call the part before c the left side and the part after c the right
side.
● If v or y overlaps region 3, set q to 0. The resulting string
will no
longer contain a c.
● If both v and y occur before region 3 or they both occur
after
region 3, then set q to 2. One side will be longer than the
other.
● If either v or y overlaps region 1, then set q to 2. In order
to make
the right side match, something would have to be pumped
into
● If either v or y overlaps region 2, then set q to 2. In order
to make
the right side match, something would have to be pumped
into
Variable Declaration and Use
52. Is English Context-Free?
If either the man who said it would rain is arriving today or the
man who said it wouldn’t rain is not arriving today then we
must go.
Cross Serial Dependencies
Chris and the girls runs and swim respectively.
*Chris and the girls runs and swims respectively.
If English is context-free, then so is:
respectively}
Each sentence is of the form:
53. ssverb respectively
What language of a’s and b’s is this similar to?
Swiss German
But English doesn’t really work this way:
● ? Jan and Pat runs and swims, respectively.
● Jan and Pat run and swim, respectively.
But Swiss German does:
Jan säit das mer em Hans es huus hälfed aastriiche.
Jan says that we Hans/DAT the house/ACC helped
paint.
54. Closure Theorems for Context-Free Languages
The context-free languages are closed under:
● Union
● Concatenation
● Kleene star
● Reverse
● Letter substitution
Closure Under Union
Assume that G1 and G2 have disjoint sets of nonterminals,
not including S.
55. We can show that L is CF by exhibiting a CFG for
it:
Closure Under Union
Assume that G1 and G2 have disjoint sets of nonterminals,
not including S.
We can show that L is CF by exhibiting a CFG for
it:
R1 S2},
S)
Closure Under Concatenation
56. Assume that G1 and G2 have disjoint sets of nonterminals,
not including S.
Let L = L(G1)L(G2).
We can show that L is CF by exhibiting a CFG for it:
Closure Under Concatenation
Assume that G1 and G2 have disjoint sets of nonterminals,
not including S.
Let L = L(G1)L(G2).
We can show that L is CF by exhibiting a CFG for it:
57. R1 S2},
S)
Closure Under Kleene Star
Assume that G does not have the nonterminal S.
Let L = L(G)*.
We can show that L is CF by exhibiting a CFG for it:
Closure Under Kleene Star
Assume that G does not have the nonterminal S.
Let L = L(G)*.
58. We can show that L is CF by exhibiting a CFG for it:
S)
Closure Under Reverse
and C are elements of V -
a: L(X) = {a}. {a}R = {a}.
L(C)RL(B)R.
● For every rule in G of the fo
59. What About Intersection and Complement?
Closure under complement implies closure under intersection,
since:
But are the CFLs closed under either complement or
intersection?
We proved closure for regular languages two different ways:
accepting and rejecting states. If closed under complement and
union, must be closed under intersection.
2. Given automata for L1 and L2, construct an automaton for L1
machines,
using states that are the Cartesian product of the sets of
60. states of
the two original machines.
Does either work here?
Closure Under Intersection
The context-free languages are not closed under
intersection:
The proof is by counterexample. Let:
qual b’s and c’s.
Both L1 and L2 are context-free, since there exist
straightforward context-free grammars for them.
But now consider:
=
61. Closure Under Intersection
The context-free languages are not closed under
intersection:
The proof is by counterexample. Let:
Both L1 and L2 are context-free, since there exist
straightforward context-free grammars for them.
But now consider:
Closure Under Complement
The context-free languages are closed under union, so if they
were closed under complement, they would be closed under
intersection (which they are not).
62. Closure Under Complement
An Example
-free:
-free.
Closure Under Difference
Are the context-free languages closed under difference?
63. Closure Under Difference
Are the context-free languages closed under difference?
- L.
-free. So, if the context-free languages were
closed under difference, the complement of any context-free
language would necessarily be context-free. But we just
showed that that is not so.
The Intersection of a Context-Free Language and a Regular
Language is Context-Free
simulating
the parallel execution of M1 and M2.
64. (((q1, q2),
and each state q2 in K2,
This works because: we can get away with only one stack.
Theorem: The difference (L1 – L2) between a context-free
language L1 and a regular language L2 is context-free.
Proof: L1 –
If L1 is context-
The Difference between a Context-Free Language and a Regular
Language is Context-Free
65. Let:
Alternatively:
– {a1776b1776}.
-free.
{a1776b1776} is regular.
An Example: A Finite Number of Exceptions
One Closure Theorem:
If L1 and L2 are context free, then so is
But what if L3 and L1 are context free? What can we say about
L2?
66. Don’t Try to Use Closure Backwards
One Closure Theorem:
If L1 and L2 are context free, then so is
But what if L3 and L1 are context free? What can we say about
L2?
Example:
Don’t Try to Use Closure Backwards
Using the Closure Theorems with the Pumping Theorem
67. Let’s try pumping: Choose w = (ab)2k
(Don’t get confused about the two uses of w.)
w w
ababab…abababababab…ababababab
But this pumps fine with v = and y =
Exploiting Regions
Choose the string akbakb.
aaaaa…………………baaaaaa……………..b
ww
68. But this also pumps fine.
Make All Regions “Long”
Choose the string akbkakbk.
aaa….. aabb………bbaa……aabb……..b
ww
1 2 3 4
Now we list the possibilities:
(1, 1), (2, 2), (3, 3), (4, 4), (1, 2), (2, 3), (3, 4), (1, 3), (1, 4),
(2, 4), (1/2, 2), (1/2, 3), (1/2, 4), (1/2, 2/3),…
Whenever v or y spans regions, we’ll no longer have a string of
the same form, but that’s okay given the definition of L.
Using Intersection with a Regular Language
69. Recall our last choice of w: akbkakbk.
aaa….. aabb………bbaa……aabb……..b
ww
1 2 3 4
Using Intersection with a Regular Language
L' is not context-free. Let w = akbkakbk.
aaa….. aabb………bbaa……aabb……..b
ww
1 2 3 4
Another Example
70. L = {w : w can be written as
x # y = z :
viewed as binary numbers without
For example, 100#1111=001111 is in L.
Another Example
L = {w : w can be written as
x # y = z :
viewed as binary numbers without
leading zeros, x # y = zR}.
Choose w = 10k#1k=0k1k:
1 000 … 000 # 111 … 111 = 000 … 000111 …111
|1| 2 |3| 4 |5| 6 |
7 |
Note that w is in L.
If
71. Another Example
Choose w = 10k#1k=0k1k:
1 000 … 000 # 111 … 111 = 000 … 000111 …111
|1| 2 |3| 4 |5| 6 |
7 |
*1* is not CF:
v or y overlaps 1, 3, or 5:
v or y contains the boundary between 6 and 7:
(2, 2), (4, 4), or (2, 4):
(6, 6), (7, 7), or (6, 7):
(4, 6):
(2, 6), (2, 7) or (4, 7):
If L were context-free, then
context-free.
72. So neither is L.
Another Example
-Z, a-z, ., blank)+ : there exists at least one
duplicated, capitalized word in w)
A string in L:
The history of China can be viewed from the perspective of an
outsider or of someone living in China.
Another Example
-Z, a-z, ., blank)+ : there exists at least one
duplicated, capitalized word in w)
Prove not CF by pumping:
Choose w = AakqAak:
73. Another Example
-Z, a-z, ., blank)+ : there exists at least one
duplicated, capitalized word in w)
Prove not CF by pumping:
Choose w = AakbkqkAakbk:
Why are the Context-Free Languages Not Closed under
Complement, Intersection and Subtraction But the Regular
Languages Are?
Given an NDFSM M1, build an FSM M2 such that
using ndfsmtodfsm.
, add the
dead state
and all required transitions to it.
74. the
accepting and the nonaccepting states. So:
-
We could do the same thing for CF languages if we could do
step 1,
but we can’t.
The need for nondeterminism is the key.
Deterministic PDAs
A PDA M is deterministic iff:
each other, and
● Whenever M is in an accepting configuration it has no
available moves.
M can choose between accepting and taking the
-transition, so it is not deterministic.
75. Deterministic CFLs
A language L is deterministic context-free iff L$ can be
accepted by some deterministic PDA.
Why $?
An NDPDA for L
A DPDA for L$
76. Adding $ Doesn’t Add Power
The Deterministic CF Languages are Closed Under Complement
Given a PDA M, we want to:
● Complete M.
● Swap accepting and nonaccepting configurations.
A deterministic PDA may fail to accept an input string w
because:
1. Its computation ends before it finishes reading w.
2. Its computation ends in an accepting state but the stack is
not empty.
-transitions,
without ever
halting in either an accepting or a nonaccepting state.
4. Its computation ends in a nonaccepting state.
If we simply swap accepting and nonaccepting states we will
correctly fail to accept every string that M would have accepted
(i.e., every string in L$). But we will not necessarily accept
77. A construction that solves these problems exists.
DCFLs Under Intersection and Union
The DCFLs are closed under complement. What about
intersection and union?
DCFLs are Not Closed Under Union
78. t even CF, much less DCF.
DCFLs are Not Closed Under Intersection
=
L1 and L2 are deterministic context-free:
Nondeterministic CFLs
Theorem: There exist CLFs that are not deterministic.
L is DCF then so is:
79. But then so is:
But it isn’t. So L is context-free but not deterministic context-
free.
This simple fact poses a real problem for the designers of
efficient context-free parsers.
Inherent Ambiguity vs. Nondeterminism
Alternatively, it is:
L1 is inherently ambiguous. Example:
80. aabbcc
L2 is not inherently ambiguous.
But what should a PDA do on:
aabbccd
Push a’s or not?
The CFL Hierarchy
Ogden’s Lemma
-free. We try a
pumping proof:
Let w = ak bk ck+k!.
1 | 2 | 3
81. If either v or y crosses regions, set q to 2. Pump in: out of
order.
● (1, 2) If |v| = |y| then set q to (k!/|v|) + 1. (k!/|v|) must be an
integer
The string that results from pumping is
aXbXck+k!,
where:
X = k + (q –
= k + k!.
So far, so good. But what about (3, 3)?
Ogden’s Lemma
-free. We try a
pumping proof:
82. Let w = ak bk ck+k!.
1 | 2| 3
● (3, 3) Pumping in: will result in even more c’s than a’s and
b’s. So the resulting string is in L.
Pumping out: the maximum number of c’s that can be pumped
out is k, which would result in a string with k! c’s. But, as long
as k 3,
k! > k. So the resulting string is in L.
We’re stuck.
Ogden’s Lemma
We mark some symbols as distinguished and require that at least
one of v or y contain at least one marked symbol.
Ogden’s Lemma
Theorem: If L is a context-free language, then:
83. least k symbols of w as distinguished then:
vy contains at least one distinguished symbol,
vxy contains at most k distinguished
symbols, and
Proof: The proof is analogous to the one we did for the context-
free Pumping Theorem except that we consider only paths that
generate the distinguished symbols.
Using Ogden’s Lemma
-free. Let w =
akbkck+k!. Mark all the a’s in w as distinguished. If either v
or y contains two or more distinct symbols, then set q to 2. The
resulting string will have letters out of order and thus not be in
L. We consider the remaining possibilities:
● (1, 1) (1, 3): Set q to 2. The number of a’s will no longer
equal the number of b’s, so the resulting string is not in L.
● (1, 2): Same argument as above.
● (2, 2), (2, 3), (3, 3): fail to satisfy the requirement that at
least one symbol in vy be marked as distinguished.
84. There is no way to divide w into vxy such that all the conditions
of Ogden’s Lemma are met. So L is not context-free.
Letter Equivalence
Two languages L1 and L2 are letter-equivalent iff they contain
the same strings if we disregard the order in which the symbols
occur in the strings.
Example:
(ab)* is letter equivalent to:(ba)*
Letter Equivalence
).
85. Two languages L1 and L2 are letter-equivalent iff:
Examples of Letter Equivalence
L1 and L2 are letter-equivalent. So are L3, L4 and L5.
86. Parikh’s Theorem
Theorem: Every context-free language is letter-equivalent to
some regular language.
Proof: By an argument similar to the one used to prove the
Pumping Theorem.
Context-Free Languages Over
a Single-Letter Alphabet
Theorem: Any context-free language over a single-letter
alphabet is regular.
Proof: Follows from Parikh’s Theorem
Examples:
L = {anbn}.
=
L
87. =
=
Using The Corollary
Primea = {an : n is prime}.
Primea is not context-free. If it were, then it would also be
regular. But we showed that it is not regular.
So it is not context-free either.
Functions on Context-Free Languages
Are the context-free languages closed under:
firstchars(L) =
88. Functions on Context-Free Languages
Are the context-free languages closed under
maxstring(L) =
Functions on Context-Free Languages
Are the context-free languages closed under
maxstring(L) =
L)}.
p
k
a
90. Rewrite Systems and Grammars
A rewrite system (or production system or rule-based system)
is:
● a list of rules, and
● an algorithm for applying them.
Each rule has a left-hand side and a right hand side.
Example rules:
Simple-rewrite
simple-rewrite(R: rewrite system, w: initial string) =
1. Set working-string to w.
2. Until told by R to halt do:
91. Match the lhs of some rule against some part of working-
string.
Replace the matched part of working-string with the rhs of
the rule that was matched.
3. Return working-string.
A Rewrite System Formalism
A rewrite system formalism specifies:
● The form of the rules
● How simple-rewrite works:
● How to choose rules?
● When to quit?
An Example
w = SaS
92. Rules:
● What order to apply the rules?
● When to quit?
Rule Based Systems
● Expert systems
● Cognitive modeling
● Business practice modeling
● General models of computation
● Grammars
Grammars Define Languages
93. A grammar is a set of rules that are stated in terms of two
alphabets:
the strings in L(G), and
a nonterminal alphabet, the elements of which will function as
working symbols that will be used while the grammar is
operating. These symbols will disappear by the time the
grammar finishes its job and generates a string.
A grammar has a unique start symbol, often called S.
Using a Grammar to Derive a String
Simple-rewrite (G, S) will generate the strings in L(G).
ate steps in a derivation.
A derivation could begin with:
94. Generating Many Strings
Multiple rules may match.
Three choices at the next step:
Generating Many Strings
One rule may match in more than one way.
Two choices at the next step:
95. When to Stop
May stop when:
The working string no longer contains any nonterminal symbols
In this case, we say that the working string is generated by the
grammar.
Example:
When to Stop
May stop when:
There are nonterminal symbols in the working string but none of
them appears on the left-hand side of any rule in the grammar.
96. In this case, we have a blocked or non-terminated derivation but
no generated string.
Example:
When to Stop
It is possible that neither (1) nor (2) is achieved.
Example:
with S the start
symbol.
Then all derivations proceed as:
Context-free Grammars, Languages, and PDAs
97. Context-free Language
Context-free Grammar
PDA
L
Accepts
More Powerful Grammars
Regular grammars must always produce strings one character at
a time, moving left to right.
But it may be more natural to describe generation more flexibly.
Example 1: L = ab*a
98. Key distinction: Example 1 is not self-embedding.
Context-Free Grammars
No restrictions on the form of the right hand sides.
But require single non-terminal on left hand side.
AnBn
AnBn
99. Balanced Parentheses
Balanced Parentheses
Context-Free Grammars
A context-free grammar G is a quadruple,
● V is the rule alphabet, which contains nonterminals
and terminals.
● R (the set of rules) is a finite subset of (V -
100. ● S (the start symbol) is an element of V -
Example:
Derivations
Then the language generated by G, denoted L(G), is:
An Example Derivation
101. Example:
Definition of a Context-Free Grammar
A language L is context-free iff it is generated by some
context-free grammar G.
w1Yw2, where:
A grammar is recursive iff it contains at least one recursive
102. rule.
Recursive Grammar Rules A rule i
w1Yw2, where:
A grammar is recursive iff it contains at least one recursive
rule.
w1Yw2, where:
A grammar is recursive iff it contains at least one recursive
rule.
103. Self-Embedding Grammar Rules A rule in a grammar G is self-
embedding iff it is :
X
A grammar is self-embedding iff it contains at least one self-
embedding rule.
-embedding
-
embedding
-embedding
Recursive and Self-Embedding
Grammar Rules A rule in a grammar G is self-embedding iff it
is :
X
A grammar is self-embedding iff it contains at least one self-
104. embedding rule.
Exampl -embedding
-
embedding
Where Context-Free Grammars Get Their PowerIf a grammar G
is not self-embedding then L(G) is regular.
If a language L has the property that every grammar that defines
it is self-embedding, then L is not regular.
G = {{S, a, b}, {a, b}, R, S}, where:
105. Equal Numbers of a’s and b’s
*: #a(w) = #b(w)}.
Equal Numbers of a’s and b’s
G = {{S, a, b}, {a, b}, R, S}, where:
106. Arithmetic Expressions
where
V = {+, *, (, ), id, E},
R = {
BNFThe symbol | should be read as “or”.
Allow a nonterminal symbol to be any sequence of characters
surrounded by angle brackets.
Examples of nonterminals:
<program>
107. <variable>
A notation for writing practical context-free grammars
BNF for a Java Fragment
<block> ::= {<stmt-list>} | {}
<stmt-list> ::= <stmt> | <stmt-list> <stmt>
<stmt> ::= <block> | while (<cond>) <stmt> |
if (<cond>) <stmt> |
do <stmt> while (<cond>); |
<assignment-stmt>; |
return | return <expression> |
<method-invocation>;
Spam Generation
These production rules yield 1,843,200 possible spellings.
How Many Ways Can You Spell [email protected]? By Brian
Hayes
American Scientist, July-August 2007
http://www.americanscientist.org/template/AssetDetail/assetid/5
108. 5592
HTML
<ul>
<li>Item 1, which will include a sublist</li>
<ul>
<li>First item in sublist</li>
<li>Second item in sublist</li>
</ul>
<li>Item 2</li>
</ul>
A grammar:
/* Text is a sequence of elements.
H
are allowed in the body of an HTML document)
/* The <ul> and </ul> tags must match.
109. /* The <li> and </li> tags must match.
English
ProperNoun | NP PP
older | smart
Designing Context-Free Grammars
● Generate related regions together.
110. AnBn
● Generate concatenated regions:
● Generate outside in:
Outside-In Structure and RNA Folding
A Grammar for RNA Folding
-5> G[.23]
-5> C[.23]
-5> U[.23]
111. <stemlo -5> A[.23]
-5> U[.03]
-5> G[.03]
<stemloop-
Concatenating Independent Languages
The cm portion of any string in L is completely independent of
the anbn portion, so we should generate the two portions
separately and concatenate them together.
Concatenating Independent Languages
The cm portion of any string in L is completely independent of
the anbn portion, so we should generate the two portions
separately and concatenate them together.
112. G = ({S, N, C, a, b, c}, {a, b, c}, R, S} where:
)}
G = ({S, M, a, b}, {a, b}, R, S} where:
113. Another Example: Unequal a’s and b’s
V = {a, b, S, },
R =
Another Example: Unequal a’s and b’s
L = {anbm
V = {a, b, S, A, B},
R =
115. Unproductive Nonterminals
rk every terminal
made without any new symbol being marked do:
has not yet been marked as productive then:
Unreachable Nonterminals
reachable.Mark every other nonterminal symbol as
unreachable.Until one entire pass has been made without any
new symbol being marked do:
-
If X has been marked as reachable and A has not then:
Mark A as reachable.Remove from
symbol on the left-
116. Proving the Correctness of a Grammar
G = ({S, a, b}, {a, b}, R, S),
● Prove that G generates only strings in L.
● Prove that G generates all the strings in L.
Proving the Correctness of a Grammar
To prove that G generates only strings in L:
Imagine the process by which G generates a string as the
following loop:
st := S.Until no nonterminals are left in st do:
2.1. Apply some rule in R to st.
3.Output st.
117. Then we construct a loop invariant I and show that:
● I is true when the loop begins,
● I is maintained at each step through the loop, and
● I
Proving the Correctness of a Grammar
● Prove that G generates only strings in L:
Proving the Correctness of a Grammar
118. ● Prove that G generates all the strings in L:
Base case: |w| = 0.
Prove: If every string in AnBn of length k, where k is even, can
be generated by G, then every string in AnBn of length k + 2
can also be generated. For any even k, there is exactly one
string in AnBn of length k: ak/2bk/2. There is also only one
string of length k + 2, namely aak/2bk/2b. It can be generated
by first applying rule (1) to produce aSb, and then applying to S
whatever rule sequence generated ak/2bk/2. By the induction
hypothesis, such a sequence must exist.
w) = #b(w)}
G = {{S, a, b}, {a, b}, R, S}, where:
119. ● Prove that G generates only strings in L:
- #b(w).
G = {{S, a, b}, {a, b}, R, S}, where:
● Prove that G generates all the strings in L:
Base case:
Induction step: if every string of length k can be generated, then
every string w of length k+2 can be.
120. w is one of: axb, bxa, axa, or bxb.
Suppose w is axb or bxa: Apply rule (1) or (2), then whatever
sequence generates x.
Suppose w is axa or bxb:
G = {{S, a, b}, {a, b}, R, S}, where:
= vy, where v and
y are in L, 2
If that is so, then G can generate w by first applying rule (3) to
produce SS, and then generating v from the first S and y from
the second S. By the induction hypothesis, it must be possible
121. G = {{S, a, b}, {a, b}, R, S}, where:
Suppose w is axa: we show that w = vy, where v and y are in L,
2
and 2
Build up w one character at a time. After one character, we
= 1. Since w = -1. The
ol is added to
been added and becomes negative by the time the string ax has
been built, it must at some point before then have been 0. Let v
be the shortest nonempty prefix of w to have a va
equal to 0, 2
became ax, v must be at least two characters shorter than w, so
122. = vy, we know bounds
on the length of y: 2 |y| = = 0,
Accepting Strings
Regular languages:
We care about recognizing patterns and taking appropriate
actions.
Context free languages:
We care about structure.
E
E +E
id E * E
123. 3 id id
5 7
Structure
To capture structure, we must capture the path we took through
the grammar. Derivations do that.
Example:
1 2 3 4 5 6
1 2 3 5 4 6
But the order of rule application doesn’t matter.
Derivations
124. Parse trees capture essential structure:
1 2 3 4 5 6
1 2 3 5 4 6
S
S S
( S ) ( S )
Derivations
Parse Trees
), is a
125. rooted, ordered tree in which:
● The root node is labeled S,
● Every other node is labeled with some element of:
V –
● If m is a nonleaf node labeled X and the children of m
are labeled x1, x2, …, xn, then R contains the rule
X x1, x2, …, xn.
S
NP VP
Nominal VNP
126. Adjs N Nominal
AdjN
the smart cat smells chocolate
Structure in English
Generative Capacity
Because parse trees matter, it makes sense, given a grammar G,
to distinguish between:
● G’s weak generative capacity, defined to be the
set of strings, L(G), that G generates, and
● G’s strong generative capacity, defined to be the
set of parse trees that G generates.
127. Algorithms Care How We Search
Algorithms for generation and recognition must be systematic.
They typically use either the leftmost derivation or the
rightmost derivation.
S
S S
(S)(S)
Derivations of The Smart Cat
A left-most derivation is:
128. the smart cat smells chocolate
A right-most derivation is:
the Nominal smel
the smart cat smells chocolate
Regular ExpressionRegular Grammar
choose a from (a
129. Derivation is Not Necessarily Unique
The is True for Regular Languages Too
54.unknown
Ambiguity
A grammar is ambiguous iff there is at least one string in L(G)
for which G produces more than one parse tree.
For most applications of context-free grammars, this is a
problem.
An Arithmetic Expression Grammar
id
130. Even a Very Simple Grammar Can be Highly Ambiguous
Inherent Ambiguity
Some languages have the property that every grammar for them
is ambiguous. We call such languages inherently ambiguous.
Example:
Inherent Ambiguity
One grammar for L has the rules:
131. Consider any string of the form anbncn.
L is inherently ambiguous.
Inherent Ambiguity
Both of the following problems are undecidable:
Given a context-free grammar G, is G ambiguous?
Given a context-free language L, is L inherently
ambiguous?
But We Can Often Reduce Ambiguity
We can get rid of:
132. ● rules with symmetric right-hand sides, e.g.,
● rule sets that lead to ambiguous attachment of
optional postfixes.
A Highly Ambiguous Grammar
Resolving the Ambiguity with a Different Grammar
A different grammar for the language of balanced parentheses:
134. are all nullable.
So compute N, the set of nullable variables, as follows:
1. Set N to the set of variables that satisfy (1).
2. Until an entire pass is made without adding anything
to N do
Evaluate all other variables with respect to (2).
If any variable satisfies (2) and is not in N, insert it.
-Rules
Definition: a rule is modifiable iff it is of the form:
removeEps(G: cfg) =
3.
been
processed:
135. –
An Example
G = {{S, T, A, B, C, a, b, c}, {a, b, c}, R, S), R =
atmostoneEps(G: cfg) =
.
136. But There is Still Ambiguity
But There is Still Ambiguity
137. But There is Still Ambiguity
Eliminating Symmetric Recursive Rules
S
S SS1 /* force branching to the left
S S1S /* force branching to the right
So we get:
SS1
S1
141. Examples:
id + id * id
id * id * id
Arithmetic Expressions - A Better Way
The Language of Boolean Logic
142. Boolean Logic isn’t Regular
Suppose BL were regular. Then there is a k as specified in the
Pumping Theorem.
Let w be a string of length 2k + 1 of the form:
w = ( ( ( ( ( ( id ) ) ) ) ) )
k
x y
143. y = (p for some p > 0
Then the string that is identical to w except that it has p
additional (’s at the beginning would also be in BL. But it can’t
be because the parentheses would be mismatched. So BL is not
regular.
Ambiguous Attachment
The dangling else problem:
<stmt> ::= if <cond> then <stmt>
<stmt> ::= if <cond> then <stmt> else <stmt>
Consider:
if cond1 then if cond2 then st1 else st2
Ambiguous Attachment
The dangling else problem:
144. <stmt> ::= if <cond> then <stmt>
<stmt> ::= if <cond> then <stmt> else <stmt>
Consider:
if cond1 then if cond2 then st1 else st2
Ambiguous Attachment
The dangling else problem:
<stmt> ::= if <cond> then <stmt>
<stmt> ::= if <cond> then <stmt> else <stmt>
Consider:
if cond1 then if cond2 then st1 else st2
<Statement> ::= <IfThenStatement> | <IfThenElseStatement> |
<IfThenElseStatementNoShortIf>
<StatementNoShortIf> ::= <block> |
<IfThenElseStatementNoShortIf> | …
145. <IfThenStatement> ::= if ( <Expression> ) <Statement>
<IfThenElseStatement> ::= if ( <Expression> )
<StatementNoShortIf> else <Statement>
<IfThenElseStatementNoShortIf> ::=
if ( <Expression> ) <StatementNoShortIf>
else <StatementNoShortIf>
<Statement>
<IfThenElseStatement>
if (cond) <StatementNoShortIf> else
<Statement>
The Java Fix
Java Audit Rules Try to Catch These
From the CodePro Audit Rule Set:
Dangling Else
146. Severity: Medium
Summary
Use blocks to prevent dangling else clauses.
Description
This audit rule finds places in the code where else clauses are
not preceded by a block because these can lead to dangling else
errors.
Example
if (a > 0) if (a > 100) b = a - 100; else b = -a;
Proving that G is Unambiguous
A grammar G is unambiguous iff every string derivable in G has
a single leftmost derivation.
S SS1 (3)
S S1 (4)
147. ● S*:
● S1: If the next two characters to be derived are (), S1
must expand by rule (6). Otherwise, it must expand by rule (5).
S SS1(3)
S S1 (4)
The siblings of m is the smallest set that includes any matched
set p adjacent to m and all of p’s siblings.
Example:
( ( ) ( ) ) ( ) ( )
1 2 3 4
5
148. The set () labeled 1 has a single sibling, 2. The set (()())
labeled 5 has two siblings, 3 and 4.
The Proof, Continued
The Proof, Continued
S SS1(3)
S S1 (4)
(S)(5)
● S:
● S must generate a matched set, possibly with siblings.
● So the first terminal character in any string that S
generates is (.
Call the string that starts with that ( and ends with the )
that
matches it, s.
● S1 must generate a single matched set with no siblings.
● Let n be the number of siblings of s. In order to generate
those siblings, S must expand by rule (3) exactly n times
before it expands by rule (4).
149. The Proof, Continued
S SS1(3)
S S1 (4)
● S:
((()())) () () (()())
s
s has 3 siblings.
S must expand by rule (3) 3 times before it uses rule (4).
Let p be the number of occurrences of S1 to the right of S.
If p < n, S must expand by rule (3).
If p = n, S must expand by rule (4).
150. Going Too Far
bat
● Chris likes the girl with the cat.
● Chris shot the bear with a rifle.
Going Too Far
● Chris likes the girl with the cat.
151. ● Chris shot the bear with a rifle.
● Chris likes the girl with the cat.
● Chris shot the bear with a rifle.
● Chris shot the bear with a rifle.
Going Too Far
152. Comparing Regular and Context-Free Languages
Regular LanguagesContext-Free Languages
● regular exprs.
or
● regular grammars ● context-free grammars
● recognize ● parse
A Testimonial
Also, you will be happy to know that I just made use of the
context-free grammar skills I learned in your class! I am
working on Firefox at IBM this summer and just found an
inconsistency between how the native Firefox code and a plugin
by Adobe parse SVG path data elements. In order to figure out
which code base exhibits the correct behavior I needed to trace
through the grammar
http://www.w3.org/TR/SVG/paths.html#PathDataBNF.
Thanks to your class I was able to determine that the bug is in
the Adobe plugin. Go OpenSource!
154. Chapter 15
The Job of a ParserExamine a string and decide whether or not
it is a syntactically well-formed member of L(G), and
If it is, assign to it a parse tree that describes its structure and
thus can be used as the basis for further interpretation.
Given a context-free grammar G:
Problems with