Question
can you plzz do question 1 and 2
Question 1. Design a CFG for the language over = {1, #} whose elements consist of every pair of distinct, #-separated unary v
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.

S -> 1S1 | A# | #A
A -> 1A | 1

2.

S -> 0S0 | 0A1
A -> XAX | XA | X
X -> 0 | 1

Add a comment
Know the answer?
Add Answer to:
can you plzz do question 1 and 2 Question 1. Design a CFG for the language...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 3 points) Question Three Consider the context-free grammar S >SS+1 SS 1a and the string aa...

    3 points) Question Three Consider the context-free grammar S >SS+1 SS 1a and the string aa Give a leftmost derivation for the string. 3 points) (4 poiots) (5 points) (3 points) sECTION IWOLAttcmpt.any 3.(or 2) questions from this.scction Suppose we have two tokens: (1) the keyword if, and (2) id-entifiers, which are strings of letters other than if. Show the DFA for these tokens. Give a nightmost derivation for the string. Give a parse tree for the string i) Is...

  • The question involves two parts and is for a compiler design course. See the image below for the question. It may help if you have used a tool called ANTLR and know about grammar files. Answer part 1...

    The question involves two parts and is for a compiler design course. See the image below for the question. It may help if you have used a tool called ANTLR and know about grammar files. Answer part 1 and part 2 correctly and I will give a positive rating. Thank you. Part 1: In BDL (badly designed language), the equal sign is the assignment operator. The language allows multiple assignments such as i -j k which first assigns the value...

  • 1. (p. 2-3.) Which of the following is NOT a reason for studying concepts of programming...

    1. (p. 2-3.) Which of the following is NOT a reason for studying concepts of programming languages according to Sebesta? a. Increased capacity to express ideas. b. Improved background for choosing appropriate languages. c. Increased ability to design new languages. d. Increased ability to learn new languages. 2. (p. 5-6.) What programming language has dominated scientific computing over the past 50 years? a. FORTRAN b. ALGOL c. SNOBOL d. PL/I 3. (p. 6.) What programming language has dominated artificial intelligence...

  • can You do question 2 (I am adding question 1 for reference) question 2 is explain...

    can You do question 2 (I am adding question 1 for reference) question 2 is explain with help of diagram power to weight ratio Question 2: Explain with the aid of a realistic scenario the meaning of the term, "power to weight ratio", and its application. Present and explain briefly, two phases considered during design and manufacturing process wherein it is a primary factor. [25 marks] A 1.5cm thick steel plate will be used to cover a 15cm diameter hole...

  • How do you do question 3? HWK #2 Instrirtinns [1] Swrd tn this PC john sullivan...

    How do you do question 3? HWK #2 Instrirtinns [1] Swrd tn this PC john sullivan File Home Insert Draw Design Layout References Mailings Review View Help Tell me what you want to do Share Comments Sparty Corporation has been operating for two years. The December 31, 2017 account balances are Cash Accounts Receivable Inventory Short-term Investments Fquipment $102,540 46,500 149,600 113,650 113,540 $132,000Accounts Payable Salaries Payable 42,610 23,000Notes Payable - long term 16,420Contributed Capital 142,000 169,800 Retained Farnings an...

  • How do you create the journal entries and T-accounts for this problem HWK #2 Instrirtinns [1]...

    How do you create the journal entries and T-accounts for this problem HWK #2 Instrirtinns [1] Swrd tn this PC john sullivan File Home Insert Draw Design Layout References Mailings Review View Help Tell me what you want to do Share Comments Rplar Select Copy Pastr Dictate tyles Spa Corporation has been operating tor two years. The December 31, 2017 account balances are: S132,000 Accounts Payable Salaries Payable Notes Payable long term $102,340 Accounts Receivable Inventory Short-tenm Investments 42,610Sala 46.500...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT