Tutorial 10: Mathematical Induction & ADT Table
SOLUTIONS
CS 134 Tutors
Spring 2007
1
Inductive Proof
Denition 1 (Degree of a node) deg (v ) : The degree of a node v is the number of children
of v .
Theorem 1 For a non-empty binary tree T on n nodes, prov
CS 134 Tutorial 3: Testing and File I/O Review
CS 134 Tutors
Spring 2007
1
1.1
What is Testing?
Purpose of Testing
The purpose of testing is not to verify that the code is correct. Its purpose is to nd aws in
your program. In fact, a successful test is on
Organizational Design
Lecture 13 (Chap.18)
Overview
Classical approach
Bureaucracy
Contingency approach
Environment
Technology
Organizational size
Application of Ashbys law
Bureaucracy
Basic idea
Chain & unity of command
Control mechanism
Problem
CS 134 Tutorial 10: ADT Table & Asymptotic Analysis
CS 134 Tutors
Spring 2008
1
ADT Table
1.1
Summary of Important Points
A Table is a collection of key-value pairs
The keys are stored in KeyedItem Objects.
Keys must be unique and of type Comparable
T
Tutorial 10: Mathematical Induction & ADT Table
CS 134 Tutors
Spring 2007
1
Inductive Proofs
1.1
Parts of an Induction Proof
Dene the variable n (number of nodes, height, etc.) to induct on.
State the Base Case(s) and prove them true from the denition.