Question

In: Computer Science

Given L={words in which the number of a’s are the same as the number of b’s}...

  1. Given L={words in which the number of a’s are the same as the number of b’s}
    1. Write a CFG to accept L.
    2. Convert the CFG to CNF.
    3. Construct a PDA for this CNF.

Solutions

Expert Solution

if you have any doubts please comment !!!


Related Solutions

Firm A’s management is very conservative whereas Firm B’s is more aggressive. All else equal, which...
Firm A’s management is very conservative whereas Firm B’s is more aggressive. All else equal, which firm would probably have larger holdings of marketable securities? Explain your answer. Give an example of communication style for Firm A and Firm B and why each may be effective or ineffective.
Consider a sample space with 3 A’s and 2 B’s. Assume that each sample point is...
Consider a sample space with 3 A’s and 2 B’s. Assume that each sample point is equally likely to be selected. (a) What is the probability that a randomly selected set of 2 items will include all B’s? (b) What is the probability that a randomly selected set of 3 items will include all A’s? 1 (c) What is the probability that a randomly selected set of 2 items will include 1 A and 1 B? (d) What is the...
5. Of the 9-letter passwords formed by rearranging the letters AAAABBCCC (4 A’s, 2 B’s, and...
5. Of the 9-letter passwords formed by rearranging the letters AAAABBCCC (4 A’s, 2 B’s, and 3 C’s), I select one at random. Determine the following probabilities. (a) Prob (my word is a palindrome and has no two C’s next to each other). 4 points (b) Prob (my word has two C’s next to each other and the other C not next to them). (c) Prob (my word has the three C’s next to each other and the B’s apart...
5. Of the 9-letter passwords formed by rearranging the letters AAAABBCCC (4 A’s, 2 B’s, and...
5. Of the 9-letter passwords formed by rearranging the letters AAAABBCCC (4 A’s, 2 B’s, and 3 C’s), I select one at random. Determine the following probabilities. (a) Prob (my word is a palindrome and has no two C’s next to each other). (b) Prob (my word has two C’s next to each other and the other C not next to them). (c) Prob (my word has the three C’s next to each other and the B’s apart from each...
Bull A’s EPD for yearling weight is +45 lb. Bull B’s EPD for yearing weight is...
Bull A’s EPD for yearling weight is +45 lb. Bull B’s EPD for yearing weight is -5 lb.             a. What is the expected difference in average yearling weights of progeny of these two bulls?             b. Will some of Bull B’s progeny have heavier yearling weights than some of A’s progeny? Why?
Is Mr. B’s class has the better students who are good rope jumpers than Mrs. A’s...
Is Mr. B’s class has the better students who are good rope jumpers than Mrs. A’s class? Please solve the problem and show the necessary tests and calculations Mrs. A’s class Mr. B’s class Boy 5 Boy 1 Boy 35 Boy 30 Girl 91 Boy 28 Boy 62 Boy 10 Girl 96 Girl 27 Girl 23 Girl 102 Boy 16 Boy 47 Boy 1 Boy 8 Boy 8 Girl 160 Boy 11 Girl 23 Girl 93 Boy 17 Girl 27...
Grades assigned by an economics instructor have historically followed a symmetrical distribution: 5% A’s, 25% B’s,...
Grades assigned by an economics instructor have historically followed a symmetrical distribution: 5% A’s, 25% B’s, 40% C’s, 25% D’s, and 5% F’s. This year a sample of 150 grades were drawn and the grades were recorded. The sample had 11 A’s; 32 B’s; 62 C’s; 29 D’s; and 16 F’s. Can you conclude, at the 10% level of significance, that this year’s grades are distributed differently from grades in the past?
Grades assigned by an economics instructor have historically followed a symmetrical distribution: 5% A’s, 25% B’s,...
Grades assigned by an economics instructor have historically followed a symmetrical distribution: 5% A’s, 25% B’s, 40% C’s , 25% D’s, and 5% F’s. This year, a sample of 150 grades was drawn and the grades (1 = A, 2 = B, 3 = C, 4 = D, and 5 = F) were recorded. Can you conclude, at the 10% level of significance, that this year’s grades are distributed differently from grades in the past? *****I dont want the excel...
Three firms carry inventories that differ in size. Firm A’s inventory contains 2000items, Firm B’s inventory...
Three firms carry inventories that differ in size. Firm A’s inventory contains 2000items, Firm B’s inventory contains 5000 items, and Firm c’s inventory contains 10,000items. The population standard deviation for the cost of the items in each firm’s inventory is 144. A statistical consultant recommends that each firm take a sample of 50 items from its inventory to provide statistically valid estimates of the average cost per item. Manager of a small firm state that because it has the smallest...
Three firms carry inventories that differ in size. Firm A’s inventory contains 2000 itemns, firm B’s...
Three firms carry inventories that differ in size. Firm A’s inventory contains 2000 itemns, firm B’s inventory contains 5,000 items, and firm C’s inventory contains 10,000 items. The population standard deviation for the cost of the items in each firms’ inventory is 144, A statistical consultant recommends that each firm take a sample of 150 items from its inventory to provide statistically valid estimates of the average cost per item. Using the finite population correction factor if needed, compute the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT