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...
-
The Problem Solvers Consulting Corporation began business in 2010. The following transactions took place during January: January 1 The owners invested $75,000 in exchange for common stock. 1 The...
-
A national publication reported that a college student living away from home spends, on average, no more than $15 per month on laundry. You believe this figure is too low and want to disprove this...
-
Mammoth Corporation has 100,000 shares of \(\$ 10\) par value common stock outstanding. At year-end, the company declares a five percent stock dividend. The market price of the stock on the...
-
Wheeler Bus Lines uses the units-of-activity method in depreciating its buses. One bus was purchased on January 1, 2014, at a cost of $145,000. Over its 4-year useful life, the bus is expected to be...
-
! Required information [The following information applies to the questions displayed below.] Astro Company sold 28,500 units of its only product and reported income of $57,900 for the current year....
-
Meg McIntyre opened a public relations firm called Pop Chart on August 1, 2024. The following amounts summarize her business on August 31, 2024: During September 2024, the business completed the...
-
Research the telecommunications options that currently exists for you to link the Internet from where you live. What are your needs? Who are providers? Are other providers available? How is the...
-
describe an idea that could assist in an effective international agreement to solve the problems of global warming. What would be the strengths and weaknesses of your idea?
-
Acting as the HIPAA Privacy Officer, identify the non-compliant issues in the following scenario and recommend corrective actions Background: The HIPAA Security Rule specifies that routine audits and...
-
IP Addressing: IP addressing will have significant impacts on the future extension of the network. You need to decide whether you will be using IPv4 or IPv6. Whatever you are choosing, you need to...
-
How could a hospital firm use the mix variance to analyze its revenues? How could a hospital firm use the mix variances to analyze salary costs regarding emergency room services?
-
Throughout American history, there has been consistent debate over the US Supreme Court's role in our political system and how it ought to make its decisions on cases. What do you think the US...
-
This is a programming assignment. Submit all your results in pdf files.\ Implement the breadth-first search algorithm described on page 18 of the lecture notes on Graphs, with the graph represented...
-
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
-
The following selected balance sheet and income statement data were taken from the financial records of The Ventura Company: Required 1. Use the Dupont Model to compute the 2013 through 2016 return...
-
North Company's income statement and comparative balance sheets as of December 31 of 2019 and 2018 follow: During 2019, North sold land for \(\$ 70,000\) cash that had originally cost \(\$ 45,000\)....
-
The Pruitt Company's income statement and comparative balance sheets as of December 31 of 2019 and 2018 follow: During the year, the company sold for \(\$ 15,000\) cash old equipment that had cost...
Study smarter with the SolutionInn App