Let L= {u1,..., Uk} be the set of lower case words in the English dictionary and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Let L= {u1,..., Uk} be the set of lower case words in the English dictionary and let U= {v1,..., Vk} be the set of words in the English dictionary with the first letter capitalized. We will define an English word as "correct" if it's in (either lower case or upper case) dictionary. We will define an English sentence as being "correct" if • it is composed of a sequence of 1 or more "correct English words" separated by a single space (use or something like that for a space), or a comma followed by a space, • if there is exactly one period directly and it occurs after the last word, • if the first word is capitalized, • no other word is capitalized. A "correct English paragraph" is a sequence of 1 or more correct English sentences separated by a single space. A "correct English document" is a sequence of 1 or more correct English paragraphs separated by newlines (we can use \n' as the newline). (a) Give a regular expression for the set of "correct English words", "correct English sentences", "correct English paragraphs", and "correct English documents". (b) If you have a bunch of text files on a computer, and you wanted to check whether or not they are "correct English documents", how would you do it? (You don't need to provide an algorithm, just a strategy that you know could be coded and justify why you know it could be coded). Let L= {u1,..., Uk} be the set of lower case words in the English dictionary and let U= {v1,..., Vk} be the set of words in the English dictionary with the first letter capitalized. We will define an English word as "correct" if it's in (either lower case or upper case) dictionary. We will define an English sentence as being "correct" if • it is composed of a sequence of 1 or more "correct English words" separated by a single space (use or something like that for a space), or a comma followed by a space, • if there is exactly one period directly and it occurs after the last word, • if the first word is capitalized, • no other word is capitalized. A "correct English paragraph" is a sequence of 1 or more correct English sentences separated by a single space. A "correct English document" is a sequence of 1 or more correct English paragraphs separated by newlines (we can use \n' as the newline). (a) Give a regular expression for the set of "correct English words", "correct English sentences", "correct English paragraphs", and "correct English documents". (b) If you have a bunch of text files on a computer, and you wanted to check whether or not they are "correct English documents", how would you do it? (You don't need to provide an algorithm, just a strategy that you know could be coded and justify why you know it could be coded).
Expert Answer:
Answer rating: 100% (QA)
Hello Learner Thanks for the question It is already given U Set of all correct Capitalized word L Se... View the full answer
Related Book For
Posted Date:
Students also viewed these accounting questions
-
Let A be the set of Problem 1-18. If T = i = 1 (bi ai)
-
Let A be the set of students who live within one mile of school and let B be the set of students who walk to classes. Describe the students in each of these sets. a) A B b) A B c) A - B d) B A
-
Let S be the set of bit strings defined recursively by S and 0x S, x1 S if x S, where is the empty string. a) Find all strings in S of length not exceeding five. b) Give an explicit description...
-
Santa's Helpers Ltd estimates its income taxes at 35% of pre-tax income. For the quarter ended September 30, pre-tax income was $200,000. Prepare the journal entry to record the estimated income...
-
Rewrite the function shown in Figure so that it is no longer vulnerable to a stack buffer overflow. Address gets (str2) gets (str2) Value of bffffbf4 34fcffbf 4. 01000000 34fcffbf argv bffffbf0...
-
How does the introduction of noncontrolling shareholders change the consolidation worksheet?
-
Effects of an Unusual Point. You are analyzing a data set of size \(n=100\). You have just performed a regression analysis using one predictor variable and notice that the residual for the 10th...
-
1. Complete Problem 5- 33 using the FIFO method of process costing. 2. If you did Problem 5- 33, explain any difference between the cost of work completed and transferred out and the cost of ending...
-
Melissa recently paid $660 for round-trip airfare to San Francisco to attend a business conference for three days. Melissa also paid the following expenses: $650 fee to register for the conference,...
-
Right Company purchased 25,000 common shares (25%) of ON Inc. on January 1, Year 11, for $250,000. Right uses the equity method to report its investment in ON because it has significant influence in...
-
Below is a partial listing of the adjusted account balances of Pina Colada at year-end on December 31, 2014: Accounts receivable $26,880 Cost of goods sold 286,720 Selling expenses (includes...
-
Doolarie assigned her whole life policy to her favorite charity. At that time the CSV of the policy was $60,000 and her ACB was $40,000. What is the result of Doolarie's donation to her charity?
-
OBJECTIVE: The objective of this assignment is to: Analyze business letters for effective use of information. Use the correct words in communicating ideas and information. Thus, you will develop your...
-
explain the difference between an external memo of law and an internal memo of law.?
-
Using only publicly available data from the U.S. Census website, develop brief (1 page) consumer profiles of the following zip codes: 60624 and 60462 Use these profiles to identify five products that...
-
Memorandum or Memo is generally used for quick short communication within an organization. However, its structure and function varies according to a given context. Differentiate between Trip Report...
-
The Procurement Manager anticipated that the components industry would be facing a price hike due to unforeseeable economic conditions. He has sent a proposal to the Managing Director to proceed with...
-
For a nonzero constant a, find the intercepts of the graph of (x 2 + y 2 ) 2 = a 2 (x 2 - y 2 ). Then test for symmetry with respect to the x-axis, the y-axis, and the origin.
-
a. Show that ( is a linear transformation when b = 0. b. Find a property of a linear transformation that is violated when b ( 0. c. Why is ( called a linear function? RR
-
Let H be the set of all vectors of the form Where t is any real number. Show that h is a subspace of R3. (Use the method of Exercise 9.) 3: 0-7
-
In Exercises 1 and 2, find the B-matrix for the transformation x Ax where B = {b1, b2, b3}. 1. 2. 212 b 632111 0 213 669- 845 -71-3-313
-
What is the pro forma statement, and how important is it for a business?
-
Briefly compare replacement value to liquidation value of an asset.
-
Briefly describe what quality control is all about, and explain the three statistical types of control.
Study smarter with the SolutionInn App