COSC 2011  N

Mid-Term Exam FAQ


Question:

Will Exceptions be covered in the mid-term?

Answer:

No, exceptions will not be included in the mid-term


Question:

Will we be asked to do proofs for a mathematical induction question??  If we are; then I don't think it would be really fair for those of us in the course who haven't taken 2320 descrete math yet.  Also, I don't remember seeing 2320 as a prerequisite for 2011.

Answer:

This is not a course in discrete math, I agree.  However, mathematical induction is introduced in the course as is recursion. I spent two
lectures describing mathematical induction and went over at least two proofs in great detail.  Furthermore, induction is used extensively for
proving common tree properties.  If you can understand the proofs I covered in the lecture you will definetely be ok.  Go over the proofs available online and try to understand how induction may be used to prove simple tree properties.  if you are having trouble come and see me during office hours or leave email.
 


Question:

I have fully read your lecture note and the text book on tree.  There has two methods really confuse me (expandExternal and
removeAboveExternal),  i don't know the purpose of their existence and possible application to use them.

Answer:

expandExternal() will take an external node and make it an internal node by adding a left and a right child to the external node.  Of course you may not necessarily need this metho since you can actually just go ahead and add the left and right children yourself without calling the method.  However, it simply hides away the details associated with doing so.  You simply pass the external node to the method and it adds the children for you without you having to worry about how the children are actually linked to the parent or about knowing implementation details of the binary tree.

removeAboveExternal() again will simply remove from the binary tree a node along with its parent, replacing the parent by the external nodes sibling.  Once again, this method performs this action and hides the implementation details from the user - you dont need to worry about how it does it.  Now it may seem useless at this point, but we will encounter this method when we study heaps (heap trees in particular), binary search trees, and AVL trees.  I wont go into details of its use here, but their use will becomemore apparent in the next few weeks.  You can read ahead in the book if you like for more details - see appendix for 'removeAboveExternal'.
 


Question:
 
In the material resposible for, the sections 6.3.4 (2nd ed)is excepted.  Are you sure? 6.3.4 is about tree traversal which you spent some time to discuss about and 6.3.5 is very closely related to 6.3.4. And how about section 6.4.4, representing general trees with binary trees, which you skipped last lecture.

Answer:

Well, we did cover binary tree traversals in the lecture but section 6.3.4 talks about some applications of the binary tree trevaresals (tree drawing etc.) which i didnt want to cover so you are not responsible for section 6.3.4. Similarly you are not responsible for section 6.3.5.  Now section 6.4.4 , well we didnt cover it in the lecture so I wont ask anything specific related to it.  of course its a good idea to look it over.  Also
keep in mind that the general tree traversals which we did cover in the lecture apply to binary trees!