CS 221
Outline of Material for Test 2
The following is an outline of the material which will be covered on the second test.
1. Abstract Data Types
a. Dene, with appropriate illustrations the following
Today's Class
Each day in class you can refer to this page for notes and slides related to the current topic.
DO NOT PRINT THIS PAGE ON THE LAB PRINTERS
If you try to print everything posted on this p
Today's Class
Each day in class you can refer to this page for notes and slides related to the current topic.
DO NOT PRINT THIS PAGE ON THE LAB PRINTERS
If you try to print everything posted on this p
Today's Class
Each day in class you can refer to this page for notes and slides related to the current topic.
DO NOT PRINT THIS PAGE ON THE LAB PRINTERS
If you try to print everything posted on this p
CS 221
Outline of Material for Test 1
The following is a brief outline of the material which will be covered on the rst test. All of this information can be found
in the lecture notes and/or on this w
Today's Class
Each day in class you can refer to this page for notes and slides related to the current topic.
DO NOT PRINT THIS PAGE ON THE LAB PRINTERS
If you try to print everything posted on this p
CS 221
1/18/18, 5'18 PM
Today's Class
Each day in class you can refer to this page for notes and slides related to the current topic.
DO NOT PRINT THIS PAGE ON THE LAB PRINTERS
If you try to print eve
Today's Class
Each day in class you can refer to this page for notes and slides related to the current topic.
DO NOT PRINT THIS PAGE ON THE LAB PRINTERS
If you try to print everything posted on this p
Today's Class
Each day in class you can refer to this page for notes and slides related to the current topic.
DO NOT PRINT THIS PAGE ON THE LAB PRINTERS
If you try to print everything posted on this p
SECTION 2.2
Induction
2
Principle of Induction
Climbing an infinitely high ladder can you reach
an arbitrarily high rung?
2 Assertions
1.You can reach the first rung.
2.Once you get to some rung, yo
CHAPTER 4, SECTION 1
Sets
2
Section 4.1: Sets
A set is a collection of objects.
Usually share some common property P
An object with this common property is a member of the
set.
An object without t
CHAPTER 5
Section 5.1
Section 5.1: Relations
Binary relation
A relationship between pairs of elements within a set
Example 1
Cartesian product, S S or S2
S = cfw_1, 2, 3
S2 = cfw_(1,1),(1,2),(1,
CHAPTER 1
Formal Logic
2
Goals of Chapter 1
Use the formal symbols of propositional logic
Find the truth value of an expression in propositional logic
Construct formal proofs in propositional logic
CHAPTER 1, SECTION 2
Propositional Logic
2
Propositional Logic
Reasoning in formal logic
Determining the truth of an argument
Argument
A sequence of statements in which the conjunction of the init
CHAPTER 3, SECTION 2
Recurrence Relations
2
More Recurrence Relations
Example 20: Solve the following recurrence
relation
T(1) = 1
T(n) = 2nT(n-1), n 2
3
Linear 2nd Order Recurrences
The general for
CHAPTER 5
Section 5.1
Graphs
Informal definition of a graph
A nonempty set of nodes (vertices) and a set of arcs (edges)
such that each arc connects two nodes.
Our graphs will always have a finite
SECTION 2.2
Second Principle of Induction
2
More Induction
Second Principle of Mathematical Induction
1. P(1) is true
2. (k)[P(r) true for all r, 1 r k P(k+1) true]
1 & 2 P(n) true for all positive in
CHAPTER 5
Section 5.2
2
Trees
A tree is a special type of graph.
Definition
A tree is an acyclic, connected graph with one node designated as
the root of the tree.
A tree is typically drawn with t
CHAPTER 4
Section 4.6: Probability
Probability
Given all possible outcomes of an action (sample
space), we want to know the likelihood of a
specific event occurring.
An event is the occurrence of on
CHAPTER 3, SECTION 2
Recurrence Relations
2
Summation Notation
Appendix B talks about sums
stands for summation, or sum
General notation for a sum is
q
(expression)
i= p
Example
n
(2i 1) = 1 + 3
CHAPTER 2, SECTION 1
Proof Techniques
Proof Techniques
Moving away from formal arguments of Chapter 1
Is the argument universally true?
Focused on the relationships between statements
Unconcerned
CHAPTER 4
Section 4.6
2
Matrices
Matrix
Represents values in rows and columns
&1 0 4#
A=$
!
3
'
6
8
%
"
The dimensions of a matrix are the number of rows and columns.
A is a 2 3 matrix.
Elements
CHAPTER 4
Section 4.2: Counting
Section 4.3: Principle of Inclusion and Exclusion;
Pigeonhole Principle
2
Counting
Combinatorics
Branch of math that deals with counting
Counting
Finding out how ma
CHAPTER 4
Section 4.4: Permutation and Combinations
2
Permutations & Combinations
What is a permutation?
An ordered arrangement of objects.
P(n, r): the number of permutations of r distinct
objects
CHAPTER 3, SECTION 1
Recursive Definitions
2
3.1: Recursive Definitions
A recursive definition is one in which the item
being defined is included as part of the definition
Also called an inductive
CHAPTER 1, SECTION 3
Quantifiers, Predicates, and Validity
Representation in Predicate Logic
Example:
What if you want to represent the statement:
For every x, x > 0
Can you do it in propositional
CHAPTER 5
Section 5.4: Functions
2
Functions
A function is a special type of binary relation
Three parts to a function
The set of starting values (Domain)
The set from which associated values come
CS 221
Programming in C+ - Data Structures
Review for the Final Exam
In an attempt to give you some guidance as you study for the final exam I
have prepared the following review. It is, in fact, more
Analysis of Algorithms
1. What is Algorithm analysis, and Big O notation? List from best to worst the eight
standard measures used in Big O notation?
Algorithm Analysis- An attempt to measure the am