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
9. Government and corporate officials concerned about security threats do not bring their own cell phones or laptops when travel
tatuchka [14]

Answer:

True

Explanation:

It is known as Don-Not-Carry rules are implemmented to avoid

-Unauthorized full disk copies (it have been made while the laptop owner was out of the hotel room on overseas travel)

-Laptops steals

- Monitoring by third parties of wireless using.

3 0
3 years ago
A blank is the full web Address for particular website<br> (Computer technology)
Yuki888 [10]
What do you mean by that
6 0
3 years ago
2. A shift register can operate:
Naddik [55]
C. Both serially and Perullo
8 0
3 years ago
Which types of customizing can you do with the Cell Style galleries? Check all that apply.
guapka [62]

Change the font size

Change the font color

Change the background color

Adjust percentage of background shade

Add a hyperlink

Explanation:

All of these have todo with style

8 0
3 years ago
Read 2 more answers
John has had a message pop-up on his computer asking him to pay $800 to have his files
faltersainse [42]

• Installed a program containing ransomware/malware. (Do not accept downloaded without inferring it was installed)

• Opened an email attachment containing malware.

• Opened a file containing a malicious macro.

• Left his computer unsecure allowing someone else to install malware on it. (Should include an example, e.g. not logging off)

3 0
3 years ago
Read 2 more answers
Other questions:
  • How would you delete a slide from your presentation after selecting it?
    12·1 answer
  • The desktops of computers running the same OS all look the same
    8·1 answer
  • After you enter the details for the first selected recipient in the New Address List dialog box, click _______ to add another re
    9·1 answer
  • Idea citizen activation
    9·2 answers
  • Give me 3 facts and 3 opinions
    5·1 answer
  • Write a calculator program that keeps track of a subtotal like real calculators do. Start by asking the user for an initial numb
    12·1 answer
  • A(n) _____ is a telephone facility that manages incoming calls, handling them based on the number called and an associated datab
    5·1 answer
  • _____ interviews rely on scenarios and reflections to evaluate an applicant’s skill set.
    9·2 answers
  • What is the purpose of using variables in programming?
    11·1 answer
  • Identify what a computer needs to
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!