hw2a - Copy (2)

hw2a - Copy (2) - MCS4653, Theory of Computation Homework...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MCS4653, Theory of Computation Homework Assignment 2, Due 9/22/03 Sample Answers From Class Page 1 1. (GRE Problem 5, Page 13) A procedure that printed this binary tree in postorder would produce what output? D E B F C A DEBFCA 2. (GRE Problem 6, Page 14) Which one of the following is Not a binary search tree. Why? 2 4 3 7 5 2 3 6 7 5 2 3 4 5 3 4 7 6 5 3 6 4 7 5 Because this tree reads falsely that 4 ≤ 6 ≤ 5. 3. (GRE Problem 15, Page 19) An integer c is a common divisor of two integers x and y if and only if c is a divisor of x and c is a divisor of y . Which of the following sets of integers could possibly be the set of all common divisors of two integers? Explain your answer. a) {- 6 ,- 2 ,- 1 , 1 , 2 , 6 } If 2 and 6 are divisors, so is 3 b) {- 6 ,- 2 ,- 1 , , 1 , 2 , 6 } 0 is not a divisor c) {- 6 ,- 3 ,- 2 ,- 1 , 1 , 2 , 3 , 6 } Ok d) {- 6 ,- 3 ,- 2 ,- 1 , , 1 , 2 , 3 , 6 } 0 is not a divisor e) {- 6 ,- 4 ,- 3 ,- 2 ,- 1 , 1 , 2 , 3 , 4 , 6 } if 6 and 4 are divisors, so is 12 MCS4653, Theory of Computation...
View Full Document

This note was uploaded on 09/26/2011 for the course TOC 1345 taught by Professor Joe during the Spring '11 term at HDM Stuttgart.

Page1 / 2

hw2a - Copy (2) - MCS4653, Theory of Computation Homework...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online