S
v
(
t
)
=
0
if
t
is character at leaf
∞
otherwise