1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alex73 [517]
3 years ago
7

Let CFG G be the following grammar.

Engineering
2 answers:
adoni [48]3 years ago
6 0

Answer:

See Explanation Below

Explanation:

Given

S → aSb | bY | Y a

Y → bY | aY | ε

Giving a simple description of L(G) in English. The description is as follows;

This means that L(G) contains a string of a's and b's such that the following are true;

1. the string starts with n a’s and m b’s, where n and m can be zero, but not at the same time,and at least one of option 2 and option 3

2. and has any number of a’s or b’s followed by an a

3. ab followed by any number of a’s and b’s

Note that n and m represent numerical digits

Using the description to give a CFG for L(G), the complement of L(G) is written as L'(G)

L'G are elements not in L(G) and they are

L'(G) =a^n b (a∪b) * b^n ∪ a^n (a∪b) * ab^n

valentinak56 [21]3 years ago
4 0

Answer:

The answer in the explanation section

Explanation:

The context free grammar is equal to:

S → aSb|bY|Ya

Y → bY|aY|ε

The language L(G) is equal to:

Y → bY

Y → aY

Y → ε

S → aSb

S → bY

S → Ya

If S → Ya, thus:

S → ∈a

S → a

If S → bY:

S → ∈b

S → b

If S → aSb:

S → abYb

S → abbYb

If S → bY:

S → bbY

S → bb∈

S → bb

From all this cases, the languaje is the follow:

L(G)=[a,b,abbb,bb...]

The description of L(G) is:

-strings made up of a consecutive number of a length a, that can vary from 1 to infinity.

-strings made up of a consecutive number of a length b, that can vary from 1 to infinity.

-strings whose start symbol a is followed by number b

-strings whose start symbol b is followed by number a

-strings beginning with the symbol a and ending with the symbol b

-strings beginning with the symbol b and ending with the symbol a

The grammar for L(G) is equal to a^{i} b^{i} if i\geq 0\\

The CFG for L(G) is equal to:

S → aSb|∈

S → abb∈b

S → abbb

You might be interested in
3. (a) (5 points) Suppose N packets arrive simultaneously to a link at which no packets are currently being transmitted or queue
Bezzdna [24]

Answer:

(N-1) × (L/2R) = (N-1)/2

Explanation:

let L is length of packet

R is rate

N is number of packets

then

first packet arrived with 0 delay

Second packet arrived at = L/R

Third packet arrived at = 2L/R

Nth packet arrived at = (n-1)L/R

Total queuing delay = L/R + 2L/R + ... + (n - 1)L/R = L(n - 1)/2R

Now

L / R = (1000) / (10^6 ) s = 1 ms

L/2R = 0.5 ms

average queuing delay for N packets = (N-1) * (L/2R) = (N-1)/2

the average queuing delay of a packet = 0 ( put N=1)

4 0
3 years ago
Explain mathematically whether the divergence of the curl of a vector field is
svp [43]

Answer:

yes

Explanation:

6 0
2 years ago
You are testing a new jet engine in a test cell at sea level conditions. You measure the mass flow through the engine and find i
bulgar [2K]

Answer:

43248 newtons.

Explanation:

Force = mass x accelerations and units of force are newtons which are given in the question.

here mass = 125 of air and 2.2 of fuel, total = 125+2.2=127.5kg/s  and the velocity of the exhaust is 340m/s.

force = 340m/s * 127.5kg/s = 43248 newtons technically this is wrong (observe units) but i will expalin how i have taken acceleration as a velocity here and mass/unit time as simply mass.

see force is mass times acceleration or deceleration, here our velocity is not changing therefore it is constant 340m/s but if it were to change and become 0 in one second then there would be -340m/s^2 (note the units ) of deceleration and there would be force associated with it and that force is what i have calculated here. similarly there would be mass in flow rate of mass per second, which is also in that one second of time.

let's calculate error.

error = (actual-calculated)/actual. = (43248-60000)/43248= -38.734% less is ofcourse greater than 2%.

So the load cell is not reading correct to within 2% and it should read 43248newtons.

5 0
3 years ago
Read 2 more answers
Implement a function called myFilter that does the following: Takes a sequence of integers with values from 0 to 100 Remove all
goldenfox [79]

Answer:

using System;

using System.Collections.Generic;

using System.Linq;

public class Problem1 {

public static IEnumerable < int > myFilter(IEnumerable < int > input) {

return input.Where((val, index) => {

//First remove all multiples of 6 less than 42

return !(val % 6 == 0 && val < 42);

}).Select((val, index) => {

//Then square each number

return val * val;

}).Where((val, index) => {

// Finally, remove any resulting integer that is odd

return !(val % 1 == 0);

});

}

public static void Main(string[] args) {

Random rnd = new Random(5);

//Takes a sequence of integers with values from 0 to 100

var listForProblem = Enumerable.Range(1, 100).Select(i => rnd.Next() % 101);

var answer = Problem1.myFilter(listForProblem);

foreach(int i in answer) {

Console.WriteLine(i);

}

}

}

Explanation:

The Problem 1 solution is explanatory enough.

Your problem 2 question is lacking details. However, i have written a code that sorts it.

6 0
3 years ago
Can space debris take out a whole state
vodomira [7]
Yes depends how big the debris is
5 0
3 years ago
Other questions:
  • In a tensile test on a steel specimen, true strain is 0.171 at a stress of 263.8 MPa. When true stress is 346.2 MPa, true strain
    7·1 answer
  • Air is compressed in the compressor of a turbojet engine. Air enters the compressor at 270 K and 58 kPa and exits the compressor
    13·1 answer
  • The air contained in a room loses heat to the surroundings at a rate of 60 kJ/min while work is supplied to the room by computer
    7·2 answers
  • The driveshaft of an automobile is being designed to transmit 238 hp at 3710 rpm. Determine the minimum diameter d required for
    8·1 answer
  • This search compares the target value with the middle element in the collection, then ignores the half of the collection in whic
    11·1 answer
  • Why does an object under forced convection reach a steady-state faster than an object subjected to free-convection?
    5·1 answer
  • Ti-6Al-4V has a fracture toughness of 74.6 MPa-m0.5. How much stress (in MPa) would it take to fail a plate loaded in tension th
    13·1 answer
  • A hypothetical A-B alloy of composition 57 wt% B-43 wt% A at some temperature is found to consist of mass fractions of 0.5 for b
    15·1 answer
  • 1. Lea y analice la Norma ISO 16949 - Calidad en la industria automotriz, luego se ubica en los requisitos particulares, usted m
    12·1 answer
  • What’s the answer to this I don’t understand
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!