In each case, find a shortest word over the alphabet {A, B} that is not in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In each case, find a shortest word over the alphabet {A, B} that is not in the language of the regular expression: (i) A*B* [2 marks (ii) (A*IB*)(A*IB*)(A*|B*) [2 mark: (iii) A*(BAB)*A* [2 mark (c) In the programming language PASCAL, an identifier is an alpha- numeric sequence of characters beginning with a letter. [Note: a character is alpha-numeric if it is either a letter or a digit.] (i) Describe PASCAL identifiers via a regular expression. (ii) There is a finite list of so-called reserved words in PASCAL, such as WHILE and IF, which are not regarded as "proper" identifiers. So, a proper identifier is an identifier that is not on that list. Is the language of proper identifiers also a regular language, or is it not, or does this depend on the list? Justify your answer. [2 marks] [3 marks] In each case, find a shortest word over the alphabet {A, B} that is not in the language of the regular expression: (i) A*B* [2 marks (ii) (A*IB*)(A*IB*)(A*|B*) [2 mark: (iii) A*(BAB)*A* [2 mark (c) In the programming language PASCAL, an identifier is an alpha- numeric sequence of characters beginning with a letter. [Note: a character is alpha-numeric if it is either a letter or a digit.] (i) Describe PASCAL identifiers via a regular expression. (ii) There is a finite list of so-called reserved words in PASCAL, such as WHILE and IF, which are not regarded as "proper" identifiers. So, a proper identifier is an identifier that is not on that list. Is the language of proper identifiers also a regular language, or is it not, or does this depend on the list? Justify your answer. [2 marks] [3 marks]
Expert Answer:
Answer rating: 100% (QA)
To find the shortest word over the alphabet A B that is not in the language of each regular expressi... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
In each case find invertible U and V such that where r = rank A (a) (b) (c) (d) UAV=1 0 0 0 1-1 2-2 4 21 2 1-1 21 A=12-I 03 0 1-41 110- A=1 3 2 1 1 1013
-
The simple truss shown has the following dimensions: H1 = 1.90 in; H2 = 1.60 in; L0=31 in; L2 = 14 in; D1 = 0.76 in; D2 = 0.86 in. Both supporting bars have a depth of 0.5 in. If the maximum...
-
Consider the following data for a one-factor economy. All portfolios are well diversified. Suppose another portfolio E is well diversified with a beta of 2/3 and expected return of 9%. Would an...
-
Tubby Toys estimates that its new line of rubber ducks will generate sales of $7 million, operating costs of $4 million, and a depreciation expense of $1 million. If the tax rate is 25%, what is the...
-
Pileri Industries shipped goods to Consolidated Industries, Inc., via a common carrier. The goods were lost in transit. Pileri claimed that the sale was a shipment contract, thus putting the risk of...
-
DiCenta Corporation reported net income of $270,000 in 2010 and had 50,000 shares of common stock outstanding throughout the year. Also outstanding all year were 5,000 shares of cumulative preferred...
-
a. Draw a graph of the household production model, for a household shared by a man (m) and a woman (f). Assume that the man's wages are higher (wm > w f) and that the woman is more productive in the...
-
Consider the following network representation of a transportation problem: The supplies, demands, and transportation costs per unit are shown on the network. a. Develop a linear programming model for...
-
3. List and explain three shortcomings of GDP as a macroeconomic measurement tool.
-
You have a portfolio with two assets. Stock A returned 6% and Stock B returned 14%. If you have $500 invested in Stock A and $1500 invested in Stock B. For partial credit, type out the formula with...
-
Let's consider sum 1+3+5+...+ (2n-1). (a) Obtain a formula for this sum experimentally by considering small values of n. (b) Use mathematical induction to prove the formula conjectured in the...
-
You purchased GE stock 2 years ago at $74.22 per share just sold them for $83.50 per share. During that time you collected 7 dividends of $2. How much capital gains tax do you owe on this trade per...
-
Topic - Smart Phones: A Comparative Analysis of Apple and Samsung a). The introduction. Specify the objective as clearly as possible. It should set the relevance of the topic and finish with the main...
-
Replacement of a buried isoleucine residue with alanine increases the observed entropy of unfolding for a protein. Explain this observation. The diagram on the right may be helpful, the x- axis is...
-
Alan approaches a local bank to purchase US$2500.If C$1 - US$1.065, and the bank charges a commission of 1.1%, how much in Canadian dollars would Alan have to pay for US$2500? a. C$2672.18 b....
-
A bubble-point liquid feed is to be distilled as shown in Figure. Use the Edmister group method to estimate the mole-fraction compositions of the distillate and bottoms. Assume initial overhead and...
-
Let B = {e1, e2,..., en} be an orthonormal basis of an inner product space V. Given T: V V, define T': V V by (a) Show that (aT)' = aT'. (b) Show that (5 + T)' = S' + T' (c) Show that MB(T') is the...
-
In each case, show that U is T-invariant, use it to find a block upper triangular matrix for T, and use that to compute c1(x). (a) T: P2 P2, T{a + bx + cx2) = (-a + 2b + c) + (a + 3b + c)x + {a +...
-
In each case determine whether U is a subspace of R3. Support your answer. (a) U = {[1 s t]T | s and t in R}. (b) U = {[0 s t]T | s and t in R}. (c) U = {[r s t]T | r, s, and t in R, - r + 3s + 2t =...
-
When nitrogen and fluorine combine to form a molecule, the most likely chemical formula is: (a) N 3 F. (b)N 2 F. (c) NF 4 . (d) NF. (e) NF 3 .
-
In terms of the periodic table, is there an abrupt or gradual change between ionic and covalent bonds? (a) An abrupt change occurs across the metalloids. (b) Actually, any element of the periodic...
-
A substance consisting of which of the two molecules shown below should have a higher boiling point? Why? (a) the molecule on the left, SCO, because it comes later in the periodic table (b) the...
Study smarter with the SolutionInn App