# Obtain grammar to generate strings of a’s and b’s such that string length is multiple of three.

## Question

## Solution 1

Sure, here is a context-free grammar that generates strings of a's and b's such that the string length is a multiple of three:

- S -> aaa | bbb | aSa | bSb | ε

Here is a step-by-step explanation:

- The non-terminal symbol S represents a string whose length is a multiple of three.
- The product Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.

```
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI
```

## Similar Questions

Rs. 120 are divided among A, B, C such that A’s share is Rs. 20 more than B’s and Rs. 20 less than C’s. What is B’s share? Options :Rs. 10Rs. 20Rs. 15Rs. 25

Eighteen years ago, the ratio of A’s age to B’s age was 8 : 13. Their present ratios are 5 : 7. What is the present age of A

The product of the ages of A and B is 240. If twice the age of B is more than A’s age by 4 years, what was B’s age 2 years ago?

A and B’s salaries together amount to Rs. 2,000. A spends 95% of his salary and B spends 85% of his. If now their savings are the same, what is A’s salary?

Which built-in function is used to find the length of a sequence (such as a string or list) in Python? count() length() len() size()

## Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.