sureshcisco
(a) Using the SML system to define a datatype for labeled 4-branch trees, the trees with possible
zero, one, two, three or four branches. Label the nodes of the trees by integers, i.e., no
polymorphic definition for this problem.
(b) Draw a concrete 4-branch tree of at least 15 nodes and represent this tree by using your 4- branch tree datatype definition. Your representation has to be accepted by SML as an instance of the datatype 4-branch trees you define.
(c) Using the SML system to define a function in SML that counts the number of all integer nodes of any integer 4-branch trees.
(d) Apply this function to your concrete tree to get the correct count.
zero, one, two, three or four branches. Label the nodes of the trees by integers, i.e., no
polymorphic definition for this problem.
(b) Draw a concrete 4-branch tree of at least 15 nodes and represent this tree by using your 4- branch tree datatype definition. Your representation has to be accepted by SML as an instance of the datatype 4-branch trees you define.
(c) Using the SML system to define a function in SML that counts the number of all integer nodes of any integer 4-branch trees.
(d) Apply this function to your concrete tree to get the correct count.