
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question

Transcribed Image Text:d. Write a Lisp program that verifies if a list of symbols is correct from the point of view of this grammar.
For example,
(check-A '(y w z w y))
(check-A '(y z w w))
should return true (t) and
should return false (nil).
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Question 2. Find a regular expression that describes the given language:(2.a) Language of strings over Σ = {a, b, c} in which every character c is followed by the character a.(2.b) Language of strings over Σ = {a, b} which contain both substrings abb and bab. Note that thesubstrings can occur in any order and can overlap, so for example the string babb is in this language.(2.c) Let Σ = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, −, .}. The language L contains all strings that form a properdecimal representation of some number.Some examples of strings in the language: 42, -999, 0, 12.333, -0.14, 5.000.Some examples of strings that are not in the language: 028 (leading zero), 75. (decimal point but nodecimal part), -.5 (no integer part), -0 (there is no negative zero), 4..2-6 (malformed nonsense).You can use the shorthand [0−9] to stand for (0 + 1 + 2 + ···+ 9).arrow_forwardNo written by hand solutionarrow_forwardWhich of the following is true about bottom-up parsers? a.Input is processed from right to left b.Grammar must be free of left recursion c.Left recursion is not a problem d.Input is processed left to right in reverse orderarrow_forward
- Correct and detailed answer will be Upvoted else downvoted. Thank you!arrow_forward(a) L is a language with L = {r°101°r°10}. Which of the following strings are contained within L? 4. (i) 101011010 (ii) 11101110 (iii) 0101010 (iv) 10110 (v) 1010101010arrow_forwardWrite a regular expression for the following languages: The set of strings of 0’s and 1’s whose third symbol from the right end is 1.arrow_forward
- Write regular expression for the following languages, alphabet {0,1}a. The set of strings that do not end with 11b. The set of strings that do not contain substring 01c. The set of strings having 0 at every 3rd position.d. Describe the language given by the regular expression 0*10*10*1(1|0)* e. Set ofall strings that are at least of length 4 and contains an even number of 1’s.arrow_forwardFill out the table for executing the polynomial-time dynamic programming algo- rithm for deciding whether the string 1001 is in the context-free language generated by the following CFG. Fill the table completely-do not stop the algorithm early. (Note: This CFG is not quite in Chomsky Normal Form since A appears on the right-hand side of a rule, but |the same algorithm still works.) A + BC | CC B + BA | 0 с + АВ | Вв | 1arrow_forwardWhat you need to do:1. Type that code up and run it to make sure that it is doing what it is supposed to do. Provide the strings in the header of the program when prompted.2. Use the logic in that program to design your own Recursive Descent parser in C for the following grammar:S →aABA →Abc | bB →d3. Make sure that you choose at least two strings that pass the grammar and one string that does not pass the grammar just like I did in the model program4. Submit both the code and a screen shot of your results for the choice of strings that you provided. Below is the C code that can be used to implement a Recursive Descent parser for the above grammar/* Recursive Descent Parser for the Expression Grammar:S → (L) |aL' →,SL'|εL → SL'Valid inputs: (a,(a,a)) and (a,((a,a),(a,a)))Invalid inputs:(aa,a)*/#include <stdio.h>#include <string.h>int S(), Ldash(), L();char *ip;char string[50];int main() {printf("Enter the string\n");scanf("%s", string);ip =…arrow_forward
- The next 3 questions pertain to the following grammar from the book. The string to test is aba. S→ XY X→ XA | a | b Y→AY|a A→ a Question 1 Enter which variables can generate the following substrings of length 2 as found in stage 2 of the CYK algorithm. Enter no spaces. Enter multiple variables separated by a comma in alphabetical order (e.g., XY). If there are no variables that generate the substring, enter none. ab e ba e Question 2 Enter which variables can generate the following substrings of length 3 as found in stage 3 of the CYK algorithm. Enter no spaces. Enter multiple variables separated by a comma in alphabetical order (e.g., X,Y). If there are no variables that generate the substring, enter none. a ba e ab a +arrow_forwardPlease give me correct solution in type Solution only.arrow_forwardCancel RESET Let E-(a,b). TRUE or FALSE (with explanation): L-(w€ (a,b)*: w-a", m 2 1) is a regular language. ·C Donearrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education