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
Elanso [62]
3 years ago
6

Give CFG for the following languages,

Computers and Technology
1 answer:
polet [3.4K]3 years ago
8 0

Answer:

a.  

CFG for {a^{n}b^{m}, m=n-1 and n=1,2,3… …}

Here we can have a string containing only a single a and no b.

For that the production rule is S → aT, T → ε

Now  to get the strings with at least one b, the production rule is to be

T → ATB/ ε

A → a

B → b

Now merging two set of production rules:

S → aT

T → ATB/ε    [As T → ε is in both set, so one occurrence is taken]

A → a

B → b

Now let us generate “aaabb”

S → aT → a ATB → aAATBB → aaATBB → aaaTBB → aaaεBB → aaaεbB →aaaεbb → aaabb

b.  

CFG for {a^{n}b^{2n}, n=1,2,3… …}

Here for every single a, we have to generate two b’s.

So the production rule is to be:

                          S → aSbb/ε

Each time S will generate two b’s for one a.

You might be interested in
How was the Big Ben project similar to the investigation you conducted in class to determine if the table was vibrating? How is
a_sh-v [17]

Answer:

Mate it has been about two months

Explanation:

3 0
3 years ago
Write pseudocode instruction to carry out each of thefollowing computational operations.
iVinArrow [24]

Explanation:

A. Pseudocode to determine the area of a triangle given value the base b andthe height h:-

START

INPUT b

INPUT h

COMPUTE Area = 0.5*b*h

DISPLAY Area

STOP

B. Pseudocode to compute the simple interest earned in 1 year given the starting account balance B and annual interest rate I :-

START

INPUT B

INPUT I

COMPUTE Interest = (B*I*1)/100

DISPLAY Interest

STOP

C. Pseudocode to determine the flying time between two cities given the mileage M between them and average speed of the airplane :-

START

INPUT M

INPUT S

COMPUTE Time = M/S

DISPLAY Time

STOP

6 0
4 years ago
eplace the underlines with the words in parentheses that follow: The ____ solves the ____ of a ____ by expressing an ____ in a _
SOVA2 [1]

Answer: Following are the sequence-wise answers to blanks :

1)programmer

2)problems

3)user

4)algorithm

5)programming language

6)program

7)computer

Explanation:

To solve any situation, firstly an algorithm is designed which can be in English as well and its optimized and a language is chosen according to the system's configuration and many factors and then that algorithm is converted to code in same language chosen. This is how a user's situation is solved using programming by a coder or programmer.

4 0
4 years ago
Why do networks need standards?
svetoff [14.1K]

Answer:

4. Standards are what guarantee that the different pieces of network are configured to communicate with one another

Explanation:

Networking standards ensure the interoperability of networking technologies by defining the rules of communication among networked devices. Networking standards exist to help ensure products of different vendors are able to work together in a network without risk of incompatibility

Hope it will help you...

3 0
3 years ago
A chip that wakes up the computer system
bezimeni [28]

Explanation:

The wake-up receiver is an ultra-low power chip that continuously looks out for a specific radio signal, called a wake-up signature, that tells it when to wake up the main device

4 0
3 years ago
Other questions:
  • Dan needs to ensure that delegates as well as those looking at his shared calendar information are unable to see the details of
    7·1 answer
  • Use the balanced equation of a nitrogen cycle pathway below to support the conservation of matter and energy. N2 + 8 H --> 2
    9·1 answer
  • The algorithm ADDN implements N-bit fixed-width binary addition for non-negative integers and ignores overflows. For example, AD
    13·1 answer
  • What will you personally do to make your peers aware of the seriousness Of teen crashes?
    9·1 answer
  • A student has created a Book class. The class contains variables to represent the following.An int variable called pages to repr
    11·1 answer
  • A device can transport objects instantaneously anywhere in the world without damaging them. Is it a creative invention? Yes, bec
    6·1 answer
  • What are the advantages of knowing demographics over psychographics and vice versa?
    12·1 answer
  • Portable Document Format is a proprietary document file type created by Adobe Systems that is compatible with most computer syst
    7·1 answer
  • Write the application of computer in education and communication​
    9·1 answer
  • Rr lyrae stars pulsate, but with shorter periods and lower luminosities than cepheids. true false
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!