CFG Problem Solve Tip

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2022 Oct 5 3:51
Editor
Edited
Edited
2022 Oct 5 3:54
Refs
Refs

Problem Solve Tip

  • design CFG is like peeling onion - start from right and left side ← cannot effect both side → so represent required string - ex. a^(k+n)b^k c^n → a^n a^k b^k c^k → we can peel n
  • CFG only solve add → so make sub to add - ex. a = b - c → b = a + c
  • remove lambda → unit → redundant → CNF
  1. Remove λ-productions
  1. Remove unit productions
  1. Remove redundant symbols
 
 
 
 
 
 
 
 

Recommendations