30 likes | 148 Views
Quiz June 03 2004. Section 3.4 6.1 6.2 (only beginning). Quiz June 03: 3.30-3.45 pm. 1) Consider the following tree: a) Is this a rooted tree? Is this a extended binary tree? Is this a full binary tree? b) The basis step for constructing full binary trees
E N D
Quiz June 03 2004 Section 3.4 6.1 6.2 (only beginning)
Quiz June 03: 3.30-3.45 pm 1) Consider the following tree: a) Is this a rooted tree? Is this a extended binary tree? Is this a full binary tree? b) The basis step for constructing full binary trees starts with a single vertex. Construct all possible full binary trees at the next step using their recursive definition. 2) A bank offers the following deal: Each year the bank will give you 4% interest on the amount in your account, but in addition to that it will offer you 2% interest on the amount that was in your account a year ago. a) Write a recurrence relation that describes how much money there will be in your account in future years given you know the amount at year t=1 and t=2. 3) Determine if the following recurrence relations are 1) linear, 2) homogeneous, 3) have constant coefficients and 4) determine their degree.
Quiz answers 1) Consider the following tree: a) Is this a rooted tree? yes Is this a extended binary tree? yes Is this a full binary tree? no b) The basis step for constructing full binary trees is a single vertex. Construct all possible full binary trees at step 1 using their recursive definition. 2) A bank offers the following deal: Each year you the bank will give you 4% interest on the amount in your account, but in addition to that it will offer you 2% interest on the amount that was in your account a year ago. a) Write a recurrence relation that describes how much money there will be in your account in future years given you know the amount at year t=1 and t=2. B[t]=B[t-1]+0.04*B[t-1]+0.02*B[t-2]=1.04B[t-1]+0.02B[t-2] 3) Determine if the following recurrence relations are 1) linear, 2) homogeneous, 3) have constant coefficients and 4) determine their degree. degree 1, linear, inhomogeneous, const, coeff. degree 2, nonlinear, homogeneous, const coeff. degree 1, linear, homogeneous, coeff, depend on n.