5 Counting
Combinatorics, the study of arrangements of objects, is an important part of discrete mathematics. Counting of objects
with certain properties, is an important part of combinatorics. In fact, counting is frequently used to determine the
complex
5.3 Permutations and combinations
Reading: Rosen 5.3 and 5.5
Permutation: A permutation of a set of distinct elements is an ordered arrangement of these elements. An
r-permutation is an ordered arrangement of r elements of a set. The number of r-permutat
6 Graphs
6.1 Terminology and denitions
Reading: Rosen 9.1-9.4
Denition 1: A graph or an undirected graph G = (V, E ) consists of V , a set of vertices or nodes, and E , a set of
edges, where an edge e = (u, v) connects its endpoins u and v.
Denition 2: A
3.2 Algorithms
Reading: Rosen 3.1
An algorithm is a nite set of precise instructions for performing a computing task or for solving a problem.
Some components that an algorithm usually possesses: input, output (solution/answer), deniteness (well-dened
ste
3 Algorithms
3.1 Growth rates of functions
Reading: Rosen 3.2
We focus on increasing (non-decreasing) functions. We are interested in how fast these functions grow as their variables grow.
Big-O notation is used to compare the growth rates of two increas
1.2 Methods of proof
Reading: Rosen 1.5 1.7
A proof is a sequence of statements, where each statement is a given condition or a conclusion obtained from previous
statements by some rules of inference.
The following table summarizes the rules of inference
2 Basic Structures: Sets/Functions/Sequences/Sums
2.1 Sets
Reading: Rosen 2.1 and 2.2
Set theory is one of the cornerstones of mathematics and provides a convenient language for describing concepts in
mathematics and computer science.
Here are some basic
2.2 Functions
Reading: Rosen 2.3
For most of you, this should be just a review of what you have already learned in high schools.
A function f : A B is a mapping of each element in set A to some element in set B. A is called the domain
of f and B is calle
2.3 Sequences and sums
Reading: Rosen 2.4
A sequence is a discrete structure used to represent an ordered list. It can be dened as a function s : N S for some
set S. For example, cfw_hn , where hn = 1 , is the sequence 1, 1 , 1 , . This sequence is called
CSci 243 Discrete Structures
1 Logic and Proofs
Logic is essential in any formal discipline and consists of rules for drawing inferences. Since logic can be separated
from the context of the discipline to which it is applied, it provides a suitable tool f
CSCI 243-01 Homework 3
Part I Self Concept Check
Please answer all the questions in the file of SelfConceptCheck-3.pdf.
Part III Hand-in Problems (50 points)
Due: 14:00, Wednesday, Sep 28
Hard Deadline: 23:59, Friday, Sep 30
Mei-Ting Song
Please submit yo
CSCI 243-01 Homework 1
Mei-Ting Song
p
T
T
F
F
1a.(q p) (p q)
1b.(p q) r) s
p
T
T
T
T
T
T
T
T
F
F
F
F
F
F
F
F
q
T
F
T
F
q
T
T
T
T
F
F
F
F
T
T
T
T
F
F
F
F
r
T
T
F
F
T
T
F
F
T
T
F
F
T
T
F
F
p
F
F
T
T
q p
F
F
T
T
pq
F
F
F
F
(q p) (p q)
T
T
F
F
s
T
F
T
F
T
F
CSCI 243-01 Homework 5
Part III Hand-in Problems (50 points)
Due: 14:00, Monday, Oct 24
Hard Deadline: 23:59, Wednesday, Oct 26
*My name*
Please submit your solutions of the following questions onto the Blackboard. Youre required to edit your
solutions us
CSCI 243-01 Homework 4
Part III Hand-in Problems (50 points)
Due: 14:00, Wednesday, Oct 5
Hard Deadline: 23:59, Friday, Oct 7
Mei-Ting Song
Please submit your solutions of the following questions onto the Blackboard. Youre required to edit your
solutions
CSCI 243-02 Homework 6
Part III Hand-in Problems (50 points)
Due: 14:00, Monday, Nov 7
Hard Deadline: 23:59, Wednesday, Nov 9
Mei Song
Please submit your solutions of the following questions onto the Blackboard. Youre required to edit your
solutions using
CSCI 243-01 Homework 2
Part I Self Concept Check
Please answer all the questions in the file of SelfConceptCheck-2.pdf.
Part III Hand-in Problems (50 points)
Due: 14:00, Wednesday, Sep 21
Hard Deadline: 23:59, Friday, Sep 23
Mei-Ting Song
Please submit yo
4 Induction and Recursion
4.1 Mathematical induction
Reading: Rosen 4.1
Principle of induction: (P(1) k(P(k) P(k + 1) nP(n).
Or equivalently, to prove that a proposition function P(n) is true for integer n 1, we complete two steps:
Basis step: Verify that
4.4 Solving problems recursively
Reading: Rosen 4.4 and 7.1
Here is a collection of some recursive algorithms.
Computing n!:
factorial(n)
if n=0 return 1
else return n*factorial(n-1)
Computing an :
power(a, n)
if n=0 return 1
else if n is even
half=powe
CSci 243 Homework 1
Due: 11:00 am, Wednesday, Jan 30
*Chelsie Lawrence*
1. Construct a truth table for each of these compound propositions.
(a) (Rosen 1.1/31(c), 3 points) ( p q) q
p
T
F
F
T
q
T
T
F
F
(q)
F
F
T
T
( p q)
T
F
T
T
p q
T
T
T
F
r s
T
F
T
T
(
CSci 243 Homework 1
Due: 11:00 am, Wednesday, Jan 30
*Chelsie Lawrence*
1. Construct a truth table for each of these compound propositions.
(a) (Rosen 1.1/31(c), 3 points) ( p q) q
p
T
F
F
T
q
T
T
F
F
(q)
F
F
T
T
( p q)
T
F
T
T
p q
T
T
T
F
r s
T
F
T
T
( p
CSci 243 Homework 2
Due: 11:00 am, Wednesday, Feb 6
*Chelsie Lawrence*
1. (Rosen 1.7/18, 10 points) Prove that if n is an integer and 3n + 2 is even, then n is even using
(a) a proof by contraposition.
Step 1: Assume that the conclusion is not true
if n i
CSci 243 Homework 4
Due: 11:00 am, Wednesday, Feb 20
*Chelsie Lawrence*
1. (12 points) For each of these partial sequences of integers, determine the next term of the sequence,
and then provide a general formula or rule to generates terms of the sequence.
so; or macsms/
0(Xinms
logic (mask: of mm hr daums 'mknmc
verOQikbn AW ANA' Ms. M loot; 'rk aw 41w. or fake. (rounds NComSerurm)
o Mn: (Ilrc-
um. \ogic. Janina m? otogos'kion'ais MM Proposakm .J Calmlus
. Comeound (Masha - woman. Ongosz Ian-W
- Co» b