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
masha68 [24]
3 years ago
6

Write a grammar for the language consisting of strings built only of the letters a and b. The strings may have any number of the

se letters, but the letter combinations bb must be in each string somewhere, and each string must end with a ba.
Computers and Technology
1 answer:
Alika [10]3 years ago
4 0

Answer:

Grammer:

S->ABS/bba

A->aA/ab

B->bB/ba

Output:

  1. abbabba
  2. aabbbabba
  3. bba

Explanation:

The above grammar satisfies the question because the question says that there is a combination of string made by 'a' and 'b' which ends with 'ba' and there is somewhere 'bb' in the string. Prove of the above grammar is as follows--

  • Take the 'S' and replace it with 'ABS'. Then 'A' will replace with 'ab' and 'B' will replace with 'ba' and 'S' will replace with 'bba' then the string will "abbabba", which is the first output.
  • Take the 'S' and replace it with 'ABS'. Then A will replace with 'aA' and 'B' will replace with 'bB' and 'S' will replace with 'bba' then further 'A' will replace with 'ab' and 'B' will with 'ba' and then the string will "aabbbabba", which is the second output.
  • Take the 'S' and replace it with "bba" and the string will "bba".

So the question says that there is a string ending with 'ab' and there exits 'bb' in anywhere. so all the output define above satisfies the condition and all other output also satisfies the condition.

You might be interested in
What is the impact of information technology in your daily life?
yawa3891 [41]
Technology affects people's lives differently.
Some are bad and some are good.
But for me, technology gives us a chance to collaborate and connect even if we are miles away.
People are opening their mind to new kind of knowledge that can help us improve and grow.
3 0
3 years ago
What may happen if there is too much harmony in a design?
Rudiy27

Answer:

B It can seem boring.

Explanation:

The repetition of visual effects results in consistency, rhythm, and movement. However, too much repetition can cause monotony and boredom. And this is not good for you certainly. You are certainly going to lose the audience. And too much harmony in design as well in a similar manner causes boredom, or it can seem boring. And hence, the correct option here is B it can seem boring.

5 0
3 years ago
Please help!!!
skad [1K]

Answer:

B

Explanation:

Problem and Solution

7 0
3 years ago
Read 2 more answers
What should not be compromised when trying to meet standards and deadlines?
n200080 [17]
A i believe is the answer
5 0
3 years ago
Write a program to calculate the area of a triangle whose base is 10cm and height is 6cm
Tcecarenko [31]

Answer:

30cm

Explanation:

Height X Base

6cm X 10cm

60cm

Then take half because a triangle is half a square and we are using a square formula.

60cm divided by 2

=30cm

7 0
3 years ago
Other questions:
  • Problems with using a single Local Area Network (LAN) to interconnect devices on a premise include ______.
    12·1 answer
  • You install an M.2 SSD card in an M.2 slot on a motherboard. When you boot up your system, you discover the DVD drive no longer
    15·1 answer
  • Tanya is entering the amount of money she has earned from babysitting onto an Excel spreadsheet, but the AutoComplete feature is
    7·1 answer
  • The relational database is the primary method for organizing and maintaining data today in information systems. It organizes dat
    9·1 answer
  • Which operating system is a version of Linux?​
    13·1 answer
  • Difference between positional and non positional number​
    12·1 answer
  • The process of identifying and eliminating bugs in a software program is most generally called
    5·1 answer
  • Problem: Mr. James Reid, the director of admissions at MOGCHS University, has
    14·1 answer
  • The process of sending a result back to another part of the program is
    14·1 answer
  • Describe risk avoidance. Name three common methods of risk avoidance.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!