0 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 3.6k views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply anon1 commented Jan 29, 2022 reply Follow flag What is n? 0 0 replyShare anon1 commented Jan 29, 2022 reply Follow flag It is generating aabcbc , So wrong 1 1 replyShare Please log in or register to add a comment.
0 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 1 1 comment reply Someone26 commented Feb 4, 2023 reply Follow flag Because of cA --> Ac is not in CSG isn't it? Can u write CSG grammar for this 0 0 replyShare Please log in or register to add a comment.