Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

question1: Given the following grammars with start symbol , specify the type (0, 1, 2 or 3) of each  one and give a reason that relates part of the grammar to a requirement for the grammar type. Note:  while technically any grammar is Type 0, the answer should be the highest number that is correct.
a. = aaabb b. = abc | λ
= ab | λ = ab | λ
bbc = | bbcc
b = b

question2: For each of the following languages on Τ={a, b, c}, construct the corresponding regular expression and regular grammar. All strings containing at most three b's.


question3: Find a regular grammar that produces the language aa*(ab ∪ a)*

question4: For the following expressions of binary operations, a) state whether it is prefix, infix,
postfix or none, b) if it is none, modify it to make it legal prefix and if it is one of {prefix, infix or
postfix}, state what it evaluates to. (All numbers are single digits.)
a. 5 4 * 3 +
b. 8 * 2 - 4
c. * + - 8 2
d. 3 9 2 + -
e. / + 6 4 - 5 3


question5: For programming assignment 1, you were required to scan a file and find the words, while
disregarding anything within <>. The following questions relate to this problem. You can use some
special symbols: > and < can represent the terminals < and >. You may also use symbols from Java's
Pattern class, e.g., p{Lower}, p{Upper}, p{Alpha}, p{Digit} and p{Punct}.
a. Give a grammar and a regular expression for the language consisting of words (which consist
of just letters) separated by punctuation or whitespace (use the special symbols from Java's
Pattern class for letters, numbers, punctuation and whitespace).
b. Assuming we decided to identify numbers, give a grammar and a regular expression for
identifying numbers both integers and floats (e.g., 1.2 365.492).
c. Assuming we decided to recognize headings in HTML (e.g.,

...

), give a grammar
for recognizing headings h1 through h3 where the heading is "h" followed by a digit such that
the beginning and end digits match (your grammar does not need to include nested headings).

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9884767
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

What statistic was calculated to determine differences

What statistic was calculated to determine differences between the intervention and control groups for the lumbar and femur neck BMDs? Were the groups significantly different for BMDs?

Sum of consecutive integersa write a program that prompts

Sum of consecutive integers A) Write a program that prompts for an integer-let's call it X-and then finds the sum of X consecutive integers starting at 1. That is, if X = 5, you will find the sum of1+2+3+4+5=15 B) Modify ...

What are some examples of when a data compression utility

What are some examples of when a data compression utility can be used for information stored on a computer's hard drive?

Suppose the sulfur content of a mineral sample is

Suppose the sulfur content of a mineral sample is determined by complete conversion to Ag2S(s). What mass of sample must be chosen, so that the number of grams of Ag2S(s) obtained is equal to one eighth of the percent su ...

A sample of 1000 us households is taken and the average

A sample of 1,000 U.S. households is taken and the average amount of newspaper garbage or recycling is found to be 27.8 pounds with a standard deviation of 2 pounds. Estimate, with 90% confidence, the mean amount of news ...

Subject digital securityimagine a scenario that you go to a

Subject: Digital security Imagine a scenario that you go to a restaurant and pay the meal using your credit card. What communication parties are involved and what information is exchanged in order to complete this transa ...

The standard bcd-to-7-segment decoder such as the 74ls47

The standard BCD-to-7-segment decoder (such as the 74LS47 used in the lab), has active-LOW outputs. Should the 7-segment display be common-anode or common-cathode? Why do you think the decoder is configured for active-LO ...

Identify and evaluate at least three considerations that

Identify and evaluate at least three considerations that one must plan for when designing a database. Suggest at least two types of databases that would be useful for small businesses, two types for regional level organi ...

Discuss how a successful organization should have the

Discuss how a successful organization should have the following multiple layers of security in place for the protection of its operations: Information security management. Data security Network security

Do you need computers or information and communication

Do you need computers or information and communication technologies to store, organize, and manage data in organizations? Explain how the present day organizations in a developed country like the USA store and manage the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As