a) Define a phrase-structure grammar.
b) What does it mean for a string to be derivable from a string w by a phrase-structure grammar G?
To define a phrase-structure grammer.
Answer to Problem 1RQ
“ A phrase structure grammer is denoted by set
Explanation of Solution
Given:
Phrase structure grammer.
Concept: Definition of phrase structure grammer involves following description of few alphabets :
V: It is a finite, non empty set of elements called symbols.
T : It is a subset of set V that consisting of terminal ( non replacing symbols of vocabulary) symbols.
S : It is a starting symbol ( element of vocabulary, used to start a sentence ) from V.
P : It stands for production. These are the rules that specify the replacement of one string from another in the sentence.
Meaning for a string to be derivable from another string
Answer to Problem 1RQ
A string
Explanation of Solution
If two strings of a production of phrase-structure-language are be replaced in such a way, then it is said that one string is a derivation of another string. And it is represented by symbol
Want to see more full solutions like this?
Chapter 13 Solutions
Discrete Mathematics and Its Applications ( 8th International Edition ) ISBN:9781260091991
- Determine a possible regular expression that could define a language containing strings ab, acb, accb, adb, addb, adddb,...arrow_forwardWhich of the following sets of connectives are expressively adequate? →, ¬, A →, +, V 7,V ^, Varrow_forward5. Using the following context free grammar give a parse tree for the strings. E → E +T|T T → TxF|F F → (E)\a (a) a+a+a (b) ((a))arrow_forward
- Construct a nondeterministic FSA that recognizes the language generated by the regular grammar G = (V, T, S, P), where V = {0, 1, S, A, B}, T = {0, 1), S is the start symbol, and P = {S → 1A, S→ 1B, S→ OC,S → 0,S→ 2, A → OB, A → 0, B → 1B, B → 0, B1, C → 04}arrow_forwardHelp me with my computational theory homeworkarrow_forwardA palindrome is a string that reads the same backward as it does forward, that is, a string w, where w = wr, where wr is the reversal of the string w. Find a context-free grammar that generates the set of all palindromes over the alphabet { 0, 1 }.arrow_forward
- 2. Find two verbs or nouns each that are: (a) reflexive (b) transitive (c) symmetric 3. Which of the following is an equivalence relation? Explain. (a) lives in the same city as (b) is descendant of 4. given: R= {(1, 2), (2, 3), (4, 5), (5,6), (4,7)} (a) Determine the transifive closure R+ (b) Determine the equivalence classesarrow_forwardN-{B, C, D) T= { b, c, d } P= the productions 1. BbBCD 2. BbcD 3. DC-> CD 4. CCCC 5. CD-> cd 6. dD -> dd S-B With the above context-sensitive grammar, which of the following identifiers would be valid from left to right separated by single spaces? cbd bbcdd bbbcccddd bcd bbbbccccdddarrow_forward3. Consider the following CFG S → SS+ | SS* | a Check whether the grammar is ambiguous. If so, eliminate the ambiguity in the grammat.arrow_forward
- Let A, B and C be 3 languages over the same alphabet: AtLeast2(A.B.C) = {w|w is in at least 2 of the 3 languages A, B and C } Show that if A, B and C are regular languages, then so is AtLeast2(A.B.C). Hint: Write "AtLeast2(A,B,C)" in the form of some set operations (intersection, union, complement,.) on "A", "B", and "C". Then use closure properties of regular languages.arrow_forward7) Please look at the attached image.arrow_forwardLabel the following statement as True (T) or False (F): *Check uploaded image*arrow_forward
- Discrete Mathematics and Its Applications ( 8th I...MathISBN:9781259676512Author:Kenneth H RosenPublisher:McGraw-Hill EducationMathematics for Elementary Teachers with Activiti...MathISBN:9780134392790Author:Beckmann, SybillaPublisher:PEARSON
- Thinking Mathematically (7th Edition)MathISBN:9780134683713Author:Robert F. BlitzerPublisher:PEARSONDiscrete Mathematics With ApplicationsMathISBN:9781337694193Author:EPP, Susanna S.Publisher:Cengage Learning,Pathways To Math Literacy (looseleaf)MathISBN:9781259985607Author:David Sobecki Professor, Brian A. MercerPublisher:McGraw-Hill Education