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

  Describing problems with information systems management

Describe at least three issues/problems with Information Systems Management (ISM) in a named organization.

  Create class includes instance variables automatic propertie

Create a class called Employee that includes three pieces of information as either instance variables or automatic properties - a firstname (type string), a last name (type string) and a monthly salary (decimal)

  Condition to resume sending messages related to application

Give an example that illustrates why P must not be allowed to do so and state a condition that defines when P may resume sending messages related to application.

  What challenges think a computer forensic analyst

what challenges you think a computer forensic analyst and prosecutors would face when trying a case that involves digital evidence?

  Analyze the benefits and drawbacks of the common criteria

"'Recall that criteria creep' is the process of refining evaluation requirements as the industry gains experience with them, making the evaluation criteria something of a moving target. (See Section 21.2.4.2.)

  Write the student info and processed data

Implement the following algorithm in C# using WFA GUI. Write the student info and processed data (student name, exams, avg and grade and ...) to student database

  Calculate the net profit for all the products

Given the list of all the product prices and wholesale prices as well as a list of all the items sold for each product calculate the net profit for all the products.

  Write program displays the following pattern on the screen

Write a program that displays the following pattern on the screen

  Use an enhanced for loop to process the array

Write a Java method which takes an integer array parameter and locates the minimum value in the array and outputs that value using System.out.printf. Use an enhanced for loop to process the array. You only need one loop to do this!

  Write a program asks the user to enter a month

Write a program asks the user to enter a month (1 for January, 2 for February, and so on) and then prints the number of days in the month. For February, print "28 or 29 days". For example: Enter a mont: 5 30 days Do not use a separate if/else bran..

  What is the smallest negative number

given a tiny computer that has a word size of 6 bits, what is the smallest negative number that this computer can represent if it uses two's complement form

  Allow different payment and shipping options

allow different payment and shipping options. There are a plenty of examples of this kind of web sites. Some well-known ones are amazon.com, Barnes & Nobles, and Borders.

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