CS 173 Study Guide - Final Guide: Terminal And Nonterminal Symbols, List Of Mathematical Symbols, Binary Tree

25 views6 pages

Document Summary

6: (8 points) here is a grammar with start symbol s and terminal symbols a and b. Draw three parse trees for the string abba that match this grammar. S s s | a s | s a | b: (4 points) check the (single) box that best characterizes each item. The mathematical symbol for an empty (zero-length) string e. Number of nodes at level k in a full complete binary tree. 6: (8 points) here is a grammar with start symbol s and terminal symbols a, b, c, and d. circle the trees that match the grammar. S b n a | a n c | a. N d a: (4 points) check the (single) box that best characterizes each item. A full m-ary tree with i internal nodes has mi + 1 nodes total. always sometimes never. S s s | a n | a a.