0 votes 0 votes Is the following CSG for a^n b^n c^n correct? S->aSbC|abc Cb->bC C->c If not please explain why? Theory of Computation theory-of-computation context-sensitive + – preethi01 asked Jan 29, 2022 preethi01 1.6k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply raja11sep commented Jan 29, 2022 reply Follow Share What is n? 0 votes 0 votes raja11sep commented Jan 29, 2022 reply Follow Share It is generating aabcbc , So wrong 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes Below is the grammar for L = {a^n b^n c^n | n>=1} S → abc | aSAc cA → Ac bA → bb Let’s try deriving string w = aaabbbccc S → aSAc [S → aSAc] → aaSAcAc [S → aSAc] → aaSAAcc [cA → Ac] → aaabcAAcc [S → abc] → aaabAcAcc [cA → Ac] → aaabAAccc [cA → Ac] → aaabbAccc [bA → bb] → aaabbbccc [bA → bb] girish13 answered Feb 1, 2022 girish13 comment Share Follow See 1 comment See all 1 1 comment reply Someone26 commented Feb 4, 2023 reply Follow Share Because of cA --> Ac is not in CSG isn't it? Can u write CSG grammar for this 0 votes 0 votes Please log in or register to add a comment.