Regular expressions vs. Unix regular expressions. Regular expressions and Unix regular expressions have some superficial differences,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Regular expressions vs. Unix regular expressions. Regular expressions and Unix regular expressions have some superficial differences, but also some deeper ones that affect the class of languages recognized. (a) Unix regular expressions have quantifiers: if a is a regular expression, a{m,n} is a regular expression that matches at least m and no more than n strings that match a. More formally, it matches all strings w(1)...w(¹) where m < 1 ≤ n, and for all i such that 1≤ i ≤l, w(¹) matches a. Prove that for any regular expression with quantifiers, there is an equivalent regular expression without quantifiers. (b) Unix regular expressions have backreferences.¹ Give an example of a Unix regular expression that uses backreferences to describe a nonregular lan- guage, and prove that this language is not regular. We want you to get practice writing a non-regularity proof, so although you may use Ex- amples 1.73-77, do not simply cite one of them; please write out a full proof. Regular expressions vs. Unix regular expressions. Regular expressions and Unix regular expressions have some superficial differences, but also some deeper ones that affect the class of languages recognized. (a) Unix regular expressions have quantifiers: if a is a regular expression, a{m,n} is a regular expression that matches at least m and no more than n strings that match a. More formally, it matches all strings w(1)...w(¹) where m < 1 ≤ n, and for all i such that 1≤ i ≤l, w(¹) matches a. Prove that for any regular expression with quantifiers, there is an equivalent regular expression without quantifiers. (b) Unix regular expressions have backreferences.¹ Give an example of a Unix regular expression that uses backreferences to describe a nonregular lan- guage, and prove that this language is not regular. We want you to get practice writing a non-regularity proof, so although you may use Ex- amples 1.73-77, do not simply cite one of them; please write out a full proof.
Expert Answer:
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these operating system questions
-
The functions f and g are defined as follows. f(x)=-5x+2 g(x)=-4x-3 Find f (6) and g (5). Simplify your answers as much as possible.
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
33. Monker Dining Room Furniture manufactures two models of dining table sets: Traditional brand Contemporary. Manufacturing requirements are as follows: um boxi mod sq to get YTO TRADITIONAL...
-
What follows are the income statements for Caesars Entertainment Corporation for the three years ending December 31, 2012 through 2014? Caesars Entertainment Corporation Consolidated Statements of...
-
Three mutually exclusive alternatives are being evaluated, and their costs and revenues are listed in Table P6-1. (6.4) a. If the MARR is 20% per year and the analysis period is 10 years, use the PW...
-
The following TI-84 Plus display presents the results of a test of the null hypothesis H0: 1 = 0. a. What is the alternate hypothesis? b. What is the value of the test statistic? c. How many degrees...
-
Harold, a CPA, has a new client who recently moved to town. Harold prepares the client's current-year tax return, which shows a net 1231 gain. Harold calls the client to request copies of the...
-
Can social-media platforms like Twitter block or remove posts by particular people, based on the person's viewpoint? Generally, media companies are free to publish only material of their choosing....
-
The current price of a stock is $86, and three-month call options with a strike price of $87 currently sell for $4.30. An investor who feels that the price of the stock will increase is trying to...
-
Problem 3. In the circuit shown below: (a) Specify which individual resistors are in series with resistor R. (b) Specify which individual resistors are in parallel with resistor R. (c) Specify which...
-
Open-economy AE model with proportional taxes : Consider an AE model with trade in which AE=C +Ip +G + (EX-IM). Consider planned aggregate expenditure model with taxes proportional to income: so that...
-
Their 1.5 inch, 90-degree copper elbow (see below) is a very popular item in the plumbing line that comes packaged in 10 elbows per box. The box costs about $65 to Western, and Western sells it at...
-
= If log2 3 m and log, 6=n find log, 2 in terms of m and n. I
-
A company has the following value on its annual tax return. Cash flows Company Sales revenues, $ 1 , 5 0 0 , 0 0 0 Interest revenues, $ 3 1 , 0 0 0 Expenses, $ - 7 5 4 , 0 0 0 Depreciation, $ 1 4 8...
-
Find the factors of 3x3 - 5x2-4x + 4 provided that one of the factors is (x+1)
-
Losses follow a lognormal distribution with = 5, = 1. Inflation is a uniform 5% per year. A coverage has a franchise deductible of 500. Calculate the average payment per loss after 1 year?
-
2. Assume a person bends forward to lift a load "with his back" as shown in Figure P12.42a. The person's spine piv- ots mainly at the fifth lumbar vertebra, with the principal supporting force...
-
The U.S. Department of the Interior filed an environmental impact statement (EIS) with regard to its proposal to lease approximately eighty tracts of submerged land, primarily located off the coast...
-
Discuss the duties of collecting banks.
-
Jonnel Enterprises, Inc., contracted to construct a student dormitory at Clarion State College. On May 6, Jonnel entered into a written agreement with Graham and Long as electrical contractors to...
-
Why would you expect retailers to have lower current ratios than manufacturers?
-
If a companys gross profit ratio has increased, what does that tell us about the volume of sales and selling prices?
-
You are given the following statement of financial position information about the Nikkigra Company. You are required to comment on the financial position and performance of the company, making use of...
Study smarter with the SolutionInn App