EBK COMPUTER SCIENCE: AN OVERVIEW
12th Edition
ISBN: 8220102744196
Author: BRYLOW
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 6, Problem 41CRP
Program Plan Intro
Syntax diagram:
Syntax diagram is the
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
For each of the following statements about regular expressions α, β and languages A, B, state whether they are true or false. Provide a one-sentence justification for each answer.
Context-free grammars are sometimes used to model natural languages. In this problem you will model a fragment of the English language using context-free grammars. Consider the following English sentences:
The girl is pretty.
The girl that the boy likes is pretty.
The girl that the boy that the clerk pushed likes is pretty.
The girl that the boy that the clerk that the girl knows pushed likes is pretty.
This is a special type of sentence built from a subject (The girl), a relative pronoun (that) followed by another sentence, a verb (is) and an adjective (pretty).
Give a context-free grammar G that models this special type of sentence. Your terminals should be words or sequences of words like pretty or the girl.
Is the language of G regular? If so, write a regular expression for it. If not, prove using the pumping lemma for regular languages.
Can you give an example of a sentence that is in G but does not make sense in common English?
Do not give me irrelevant explanation.
I will report it directly right away.
True/false?
Chapter 6 Solutions
EBK COMPUTER SCIENCE: AN OVERVIEW
Ch. 6.1 - In what sense is a program in a third-generation...Ch. 6.1 - We can summarize the imperative programming...Ch. 6.1 - Prob. 4QECh. 6.2 - Why is the use of a constant considered better...Ch. 6.2 - Prob. 2QECh. 6.2 - Prob. 3QECh. 6.2 - Identity some common control structures found in...Ch. 6.2 - What is the difference between an array and an...Ch. 6.3 - Prob. 1QECh. 6.3 - Prob. 2QE
Ch. 6.3 - Why do many programming languages implement I/O...Ch. 6.3 - Prob. 4QECh. 6.3 - Prob. 5QECh. 6.4 - Prob. 1QECh. 6.4 - What is a symbol table?Ch. 6.4 - What is the difference between a terminal and a...Ch. 6.4 - Prob. 4QECh. 6.4 - Prob. 5QECh. 6.4 - Prob. 6QECh. 6.5 - What is the difference between an object and a...Ch. 6.5 - Prob. 2QECh. 6.5 - Suppose the classes PartTimeEmployee and...Ch. 6.5 - What is a constructor?Ch. 6.5 - Why are some items within a class designated as...Ch. 6.6 - Prob. 1QECh. 6.6 - Prob. 2QECh. 6.6 - Prob. 3QECh. 6.7 - Prob. 2QECh. 6.7 - Prob. 3QECh. 6.7 - Prob. 4QECh. 6 - Prob. 1CRPCh. 6 - Translate the following Python program into the...Ch. 6 - Prob. 3CRPCh. 6 - Why was it necessary to identify the type of data...Ch. 6 - Prob. 6CRPCh. 6 - Suppose the function f expects two numeric values...Ch. 6 - Suppose f is a function that returns the result of...Ch. 6 - Prob. 9CRPCh. 6 - Summarize the distinction between a machine...Ch. 6 - John Programmer argues that the ability to declare...Ch. 6 - Summarize the distinction between declarative...Ch. 6 - Explain the differences between a literal, a...Ch. 6 - a. What is operator precedence? b. Depending on...Ch. 6 - Prob. 16CRPCh. 6 - What is the difference between the meaning of the...Ch. 6 - Draw a flowchart representing the structure...Ch. 6 - Prob. 19CRPCh. 6 - Prob. 20CRPCh. 6 - Draw a flowchart representing the structure...Ch. 6 - Rewrite the following program segment using a...Ch. 6 - Summarize the following rats-nest routine with a...Ch. 6 - Prob. 24CRPCh. 6 - Prob. 25CRPCh. 6 - Suppose the variable X in a program was declared...Ch. 6 - Prob. 27CRPCh. 6 - Why would a large array probably not be passed to...Ch. 6 - Sometimes an actual parameter is passed to a...Ch. 6 - Prob. 32CRPCh. 6 - What ambiguity exists in the statement X = 3 + 2 ...Ch. 6 - Suppose a small company has five employees and is...Ch. 6 - Prob. 35CRPCh. 6 - Prob. 36CRPCh. 6 - Prob. 37CRPCh. 6 - Prob. 38CRPCh. 6 - Prob. 39CRPCh. 6 - Design a set of syntax diagrams that describes the...Ch. 6 - Prob. 41CRPCh. 6 - Prob. 42CRPCh. 6 - Add syntax diagrams to those in Question 5 of...Ch. 6 - Prob. 44CRPCh. 6 - What code optimization could be performed by a...Ch. 6 - Simplify the following program segment Y = 5 if (Y...Ch. 6 - Simplify the following program segment while (X !=...Ch. 6 - In an object-oriented programming environment, how...Ch. 6 - Describe how inheritance might be used to develop...Ch. 6 - What is the difference between the public and...Ch. 6 - a. Give an example of a situation in which an...Ch. 6 - Describe some objects that might be found in a...Ch. 6 - Prob. 53CRPCh. 6 - Prob. 54CRPCh. 6 - Prob. 55CRPCh. 6 - Prob. 56CRPCh. 6 - Prob. 57CRPCh. 6 - Prob. 58CRPCh. 6 - Prob. 59CRPCh. 6 - In general copyright laws support ownership rights...Ch. 6 - By using a high-level programming language, a...Ch. 6 - Prob. 3SICh. 6 - Prob. 4SICh. 6 - Prob. 5SICh. 6 - Suppose an amateur programmer writes a program for...Ch. 6 - Prob. 7SI
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
- Formalize the following sentence in english: Vx. (person(x ) A ay. (like(x,y) ^ food(y) A¬contain(cheese)))arrow_forwardWe place ourselves on a language with a constant me (the person speaking) and three binary relations: - friend(x, y) if x is the friend of y - enemy(x, y) if x is the enemy of y (x is my enemy then it corresponds to enemy(x, me)) - x = y if x and y are equal Translate the following formulas into English: ∀x, ¬friend (x, me) ⇒ enemy(x, me) ∃x, ∀y, ¬friend(y, x) ∀x, ∃y, enemy(y, x)arrow_forwardOrder the following sentences so that they form a direct proof of the statement: If x and y are rational numbers, then 3x + 2y is also a rational number. Choose from this list of sentences Since b, d are integers, bd is an integer. By the definition of rational numbers, x = a/b where a and b are integers and b# 0, and y = c/d where c and d are integers and d 0. Since 3x + 2y can be expressed as a ratio of two integers where the denominator is not zero, 3x + 2y is a rational number. Since a, b, c, d are integers, 3ad + 2bc is an integer. Let x and y be rational numbers. Since b 0 and d # 0, bd # 0. It follows that 3x + 2y = 3a/b + 2c/d = (3ad + 2bc)/(bd) Direct proof of the statement (in order):arrow_forward
- Give solution Theory of Automataarrow_forwardSee the image. a.Construct a context-free grammar generating C.Explain how your construction accounts for each rule. b.We could eliminate one rule from Cand make it regular. Which rule would that be, and why would it work? You do not need a formal proof, but you do need an explanation.arrow_forwardDO NOT COPY FROM OTHER WEBSITES Correct and detailed answer will be Upvoted else downvoted. Thank you!arrow_forward
- Construct a CFG and PDA for the language B={w| w is a string over {a,b} with the same count of a's and b's}. For example, abba € B, abab e B,aabb € B, babbbaaaba € B, that is, there is no particular order in which a's and b's appear in w as long as there is the same amount of them.arrow_forwardLogic is used in formal methods. Conceptually, propositional and predicate logic are the most common types of logic. A first-year student in discrete mathematics wants to use propositional and conditional logics to test software. Assist this kid. One idea is to talk about what's good and bad about reasoning and software testing. How should testing of formal programmes be done? Which reason is the best?arrow_forwardAdd the required and proper prefixes or suffixes to the following words to convert them from one type of speech part to another. 1- "Dermatology". Add the proper suffix to recognize the more involving person in this field. 2- "Summary". Add the proper suffix to convert the word to verb. 3- "Neighber" Add the required cuff to this word to abstract it to a family term. 4- "Advantageous". Add the proper prefix to this word to get the opposite meaning. 5- According to the given prefix, what is the meaning of the below sentence: - "Post-Combustion Chamber process". 6- Which type of verb the word "run" belongs to in the below sentence: - "Run your final exam carefully before it starts."arrow_forward
- 2. Give a CFG that generates the language L = {b'db° | i > 0} U{dd}. Also, demonstrate that your CFG generates the string dd by generating it from your CFG. Use a single arrow, , when defining a production rule. Use a double arrow, , for replacing one variable with something (from a production rule) while generating a string.arrow_forwardBuild a deterministic and complete PDA for the language over the alphabet Σ={a,b} that consistsof all words that end with a double letter.arrow_forwardI require assistance with completing a pushdown automaton. A visual representation illustrating the solution process would greatly aid my understanding. Could you kindly provide assistance with this? Specifically, I need help with question 2.7, part A.arrow_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