# midkey - COP 3503H Mid-term Exam Spring 2001 Thursday March...

This preview shows pages 1–3. Sign up to view the full content.

COP 3503H – Mid-term Exam – Spring 2001 Thursday March 1, 2001 [100 points] NO CALCULATORS MAY BE USED! 1. (15 points – Induction Proof) Shown below is a conjecture. Complete an induction proof that proves the conjecture is true for all integer numbers greater than or equal to 1. Show all your work. = + = + n 1 i 1 n 4 n 2 i 2 i 2 1 ) ( ) ( base case: n = 1 LHS: = = = + 1 1 i 8 1 4 2 1 2 1 2 1 2 1 ) ( ) ) ( )[ ( RHS: 8 1 2 4 1 1 1 4 1 = = + ) ( ) ( proven inductive hypothesis: assume true for all values of n = k: = + = + k 1 i 1 k 4 k 2 i 2 i 2 1 ) ( ) ( induction step: prove true for n = k +1: RHS: + = + + = + + + = + 1 k 1 i 2 k 4 1 k 1 1 k 4 1 k 2 i 2 i 2 1 ) ( ) ) (( ) ( LHS: + = = + + + + + = + 1 k 1 i k 1 i 2 1 k 2 1 k 2 1 2 i 2 i 2 1 2 i 2 i 2 1 ] ) ( )[ ( ) ( ) ( By the inductive hypothesis this is equal to: ) )( ( ) ( 4 k 2 1 k 2 1 1 k 4 k + + + + ) )( ( ) ( ) )( ( ) ( ) )( ( ) ( 2 k 1 k 4 1 1 k 4 k 4 k 2 2 k 2 1 1 k 4 k 4 k 2 1 k 2 1 1 k 4 k + + + + = + + + + = + + + + ) ( ) )( ( ) )( ( ) )( ( ) )( ( ) ( 2 k 4 1 k 2 k 1 k 4 1 k 1 k 2 k 1 k 4 1 k 2 k 2 k 1 k 4 1 2 k k 2 + + = + + + + = + + + + = + + + + = Since LHS = RHS the conjecture is proven. 1 NAME: Student ID: KEY

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

View Full Document
2. (15 points – Bactracking Algorithms) Shown below is a graph. You want to move from node 1 to node 6 in such a way that maximizes the value of your trip. Each edge in the graph has an associated value . Using the backtracking technique, draw the tree corresponding to search space for this problem. On any given level in the tree order the nodes from left to right based upon decreasing value. What is the optimal solution to the problem? Totally how many solutions are there to this problem? 2 4 3 1 3 2 4 There are a total of 5 solutions, only one of which is optimal with a value of 15. Solutions are shown as purple nodes, the optimal solution as a red node.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 10

midkey - COP 3503H Mid-term Exam Spring 2001 Thursday March...

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

View Full Document
Ask a homework question - tutors are online