Recursive Definitions and Proofs in CSE 260: Homework 9 - Prof. Sakti Pramanik, Assignments of Discrete Structures and Graph Theory

Recursive definitions and proofs for various mathematical and graph theory problems as presented in cse 260 homework 9. Topics include proving divisibility, recursively defining sequences, and using mathematical induction to establish identities. Additionally, the document covers the recursive definition of rooted trees and a recursive function to find the height of a binary tree.

Typology: Assignments

Pre 2010

Uploaded on 07/28/2009

koofers-user-uz3-1
koofers-user-uz3-1 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE 260
Homework 9- Recursive Definitions
Ignore the proofs by mathematical induction part of the problems.
1. Section 4.3: 20
2. Prove that 5n4n1 is divisible by 16 for nZ +
3. Recursively define b0=b1=b2= 1 and bn=bn1+bn3for n3.
(a) Calculate bnfor n= 3,4,5
(b) Show by using the second principle (strong) of mathematical induc-
tion that
bn2bn2for n3
4. Prove by mathematical induction
13+ 23+... +n3= (1 + 2 + ... +n)2
5. The set of rooted trees, where a rooted tree consists of a set of vertices
containing a distinguished vertex called the root, and edges connecting
these vertices, can be defined recursively by the following steps:
(a) Basis Step: A single vertex is a rooted tree.
(b) D Recursive Step: Suppose that T1, T2, ...Tnare disjoint rooted
trees with roots r1, r2, ..., rnrespectively. Then the graph formed
by starting with a root r, which is not in any of the rooted trees
T1, T2, ...Tn, and adding an edge from r to each of the vertices
r1, r2, ..., rn, is also a rooted tree.
Construct the following tree using the above definition. Show all
the steps of your construction.
6. Followiing is a recursive function defined for a binary tree, T, that returns
the height of the tree. Give the sequence of values of the variable val
that the function generates when the binary tree, T, is the one given in
problem 3 above.
pf2

Partial preview of the text

Download Recursive Definitions and Proofs in CSE 260: Homework 9 - Prof. Sakti Pramanik and more Assignments Discrete Structures and Graph Theory in PDF only on Docsity!

CSE 260

Homework 9- Recursive Definitions

Ignore the proofs by mathematical induction part of the problems.

  1. Section 4.3: 20
  2. Prove that 5n^ − 4 n − 1 is divisible by 16 for nZ+
  3. Recursively define b 0 = b 1 = b 2 = 1 and bn = bn− 1 + bn− 3 for n ≥ 3.

(a) Calculate bn for n = 3, 4 , 5 (b) Show by using the second principle (strong) of mathematical induc- tion that bn ≥ 2 bn− 2 for n ≥ 3

  1. Prove by mathematical induction 13 + 2^3 + ... + n^3 = (1 + 2 + ... + n)^2
  2. The set of rooted trees, where a rooted tree consists of a set of vertices containing a distinguished vertex called the root, and edges connecting these vertices, can be defined recursively by the following steps:

(a) Basis Step: A single vertex is a rooted tree. (b) D Recursive Step: Suppose that T 1 , T 2 , ...Tn are disjoint rooted trees with roots r 1 , r 2 , ..., rn respectively. Then the graph formed by starting with a root r, which is not in any of the rooted trees T 1 , T 2 , ...Tn , and adding an edge from r to each of the vertices r 1 , r 2 , ..., rn, is also a rooted tree. Construct the following tree using the above definition. Show all the steps of your construction.

  1. Followiing is a recursive function defined for a binary tree, T, that returns the height of the tree. Give the sequence of values of the variable val that the function generates when the binary tree, T, is the one given in problem 3 above.

Function f(T: Tree) :integer begin if T =nil then val=- else val=1+Max(f(T->Left), f(T->right)); return(val); end

  1. Assume the following predicate: RC(City1,City2,RoadType) City1 and City2 are reachable cities. Give recursive rules for the following: All cities that are reachable from East Lansing only through highways.