Construct a CFG for the regular expression (101+1)(01).
Answers
Answer: CFG for (011 + 1)*
A –> CA
A –> ε
C –> 011 | a
CFG for (01)*
B –> DB
B –> ε
D –> 01
Final CFG for (011 + 1)*(01)*
S –> AB
A –> CA | ε
C –> 011 | 1
B –> DB | ε
D –> 01
Explanation:
CFG for (011 + 1)*
A –> CA
A –> ε
C –> 011 | a
CFG for (01)*
B –> DB
B –> ε
D –> 01
Final CFG for (011 + 1)*(01)*
S –> AB
A –> CA | ε
C –> 011 | 1
B –> DB | ε
D –> 01
CFG is an abbreviation for context-free grammar. It is a formal grammar used to produce all conceivable string patterns in a given formal language. Grammar without context G is defined by four tuples: G = (V, T, P, S)
Where G is the grammar, which is made up of a collection of production rules. It is used to produce a language's string.
T is the terminal symbol's last set. Lower case letters are used to represent it.
V is a non-terminal symbol's final set. Capital letters are used to indicate it.
P is a set of production rules that is used to replace non-terminals symbols in a string with other terminal or non-terminal symbols (on the left side of the production).in the presence of additional terminal or non-terminal symbols in a string (on the right side of the production).
The initial symbol, S, is utilised to generate the string. The string may be obtained by continually replacing a non-terminal by the right-hand side of the production until all non-terminals are replaced by terminal symbols.
#SPJ2
Answer:
CGF for (101 + 1)(01) is :
Explanation:
A –> CA
A –> ε
C –> 011 | a
CFG for (01)*
B –> DB
B –> ε
D –> 01
S –> AB
A –> CA | ε
C –> 011 | 1
B –> DB | ε
D –> 01
1. What is CGF
- CGF is a unique complex.
- It is found only in the cell nucleus of chlorella.
- It is produced during intense photosynthesis process.
- It allows to grow chlorella rapidly.
- It do not have any side effects on the micro - organisms.
- It is a nutritional supplement to promote growth.
- It also helps in stimulating immune defenses and accelerating healing power.
- It has purifying and anti inflammatory properties.
- It detoxifies and repairs tissues.
#SPJ2