treeProbability: The (path) probability of generating tree by grammar G.
Description
treeProbability() returns the path
probability of generating the derivation tree tree
by the context-free grammar G.
The probability is exact, if the grammar is not ambiguous and
if the grammar does not contain redundant rules.
Usage
treeProbability(tree, G)
Value
Real. The probability of generating tree
by grammar G.
Arguments
tree
Derivation tree.
G
A context-free grammar.
See Also
Other Measures of Tree Attributes:
treeLeaves(),
treeListDepth(),
treeNodes(),
treeSize()