Basic Encoding a Grammar
S -> DBD
A -> be
B -> AA
D -> bBe
b 000
e 001
S 010
A 011
B 100
D 101
# 110
D B D # b e # A A # b B e
101 100 101 110 000 001 110 011 011 110 000 100 001 39 bits
Grammar
Symbol Code
Grammar Code
|Grammar Code| =
r = number of rules
s = sum of right hand sides
a = number in original symbol alphabet
Previous slide
Next slide
Back to first slide
View graphic version