Write a regular expression defining strings

Assignment Help Basic Computer Science
Reference no: EM13287328

1.Write a regular expression defining strings that begin with an a and end with a b and can contain any number (including zero) of c's or d's in the middle. Every c that is in the string must be followed by at least one d.
2. Construct a deterministic finite state automaton with no more than four states that accepts the language defined by the regular expression in problem 1.
3.  Define an unambiguous context free grammar that generates the language of strings containing a series of a's followed by a series of b's followed by a series of c's concluding with a series of d's. The number of a's must be exactly the sames as the number of d's and the number of b's must be exactly the same as the number of c's. The strings must contain at least of instance one each of the four letters. Examples of valid stings are:
aaabbccddd abbbcccd
Is this a regular language? Explain your answer.
4. Provide a left-most derivation of the second example shown in the previous problem and a parse tree that corresponds to that derivation.
5. Define a language that is not a regular language using a context-free grammar that is not ambiguous. The alphabet of the language must contain at least five characters. Describe in English the strings of the language. Choose any string that is in the language and demonstrate that it is in the language by showing the left-most derivation that derives it. Draw the parse tree that corresponds to the left-most derivation. Give an example of one string that is not in the language.

Reference no: EM13287328

Questions Cloud

Jewelers company might derive from a new system : Suggest at least five (5) expected business benefits that Especially for You Jewelers company might derive from a new system. Provide a rationale for your suggestions.
What is the expected return on the portfolio : The following information is available in general and about investments in stocks J and K.
Calculate next year ending receivables balance : A firm is planning to lower its ACP by ten days next year. Receivables are currently $15M on credit sales of $120M Credit sales are expected to grow by 20% next year. Calculate next year's ending receivables balance (make calculations using ending..
Find the volume of the person that is above the water : A person with a mass of 71.6 kg and a volume of 0.089 m3 floats quietly in water. find the volume of the person that is above the water
Write a regular expression defining strings : 1.Write a regular expression defining strings that begin with an a and end with a b and can contain any number (including zero) of c's or d's in the middle. Every c that is in the string must be followed by at least one d.
What is the distance to the center of the object : A distance away from a uniformly charged spherical object, the magnitude of the electric field is 575V/m and the electric potential is 3.50kV. What is the distance to the center of the object
Find the composition of this hot vaporized material : As the fragment falls through the atmosphere, it is heated and some of the material is vaporized, find the composition of this hot vaporized material from the light it emits
What do you know about PETA : What do you know about PETA? How do you feel about the way in which they conduct their beliefs? What were your impressions of the way they dealt with KFC?What do you know about PETA? How do you feel about the way in which they conduct their beliefs? ..
Small businesses and multinational corporations : How does strategic planning differ between small businesses and multinational corporations? How is strategic planning different between public-sector and private-sector organizations?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Create a pseudocode that reads in temperature input

Create a pseudocode that reads in temperature input. It should print "Freezing cold!" if the temperature is 32 degrees or below.

  Extended grep for regular expressions

That contain the word "as" exactly onceb) that contain the word "sa" more than once

  Develop a framework for the it steering committee

Develop a framework for the IT steering committee, explaining the roles and responsibilities of the members.

  Determine pz and also estimate any constants

Determine P(z) and also estimate any constants in this expression so that P(z) is given in terms only of  and μ. If possible eliminate any common factors in numerator and denominator of this expression

  Centralized and distributed computing architectures

"Centralized and Distributed Computing Architectures" Please respond to the following:

  Flowchart for batch control tape

Design a document flow chart to depict each of given situations. Batch control tape is prepared along with set of transactions to make sure completeness of the data.

  Electronic communications privacy act ecpa

Electronic Communications Privacy Act (ECPA)

  Display the users gross pay

Write a class that accepts a user's hourly rate of pay and the number of hours worked. Display the user's gross pay, the withholding tax ( 15% of the gross pay), and the net pay (gross pay - withholding). Save as Payroll.java

  Use html5 to create a document that contains

Insert a horizontal rule between the h1 element and the p element. Open your new document in a web browser to view the marked up document.

  Determine entities from functional requirements

Using Crow's feet, determine and draw relationships between entities. (Typically verbs in sentences will recognize these). Find out the entities from functional requirements.

  The number of page interrupts in fifo and lru page

A job has four pagse A, B, C, D and the main memory has two page frames only.

  From the e-activity, briefly describe through research

From the e-Activity, briefly describe through research one way the company you chose is using a data warehouse. Support your reasoning. Cite all references.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd