CIS 275 (Discrete Mathematics)
LAB PROJECT 1 Source Code in Python
> import cmd class interface(cmd.Cmd): def prompt(mySet): print "Please enter the type number for function you would like to choose"\ " %c to %c:\n 1 for one to one\n 2 for onto\n 3
CIS 275 Discrete Math I
Winter 2017
Assignment 02
Evaluation:
As described in the syllabus, the assignments are 20% of the overall grade.
Submission:
Submit your document at the beginning of the lecture or by email on Monday
02/13/17. No late submission w
Chapter 2 : Mathematical Induction
Mathematical Induction
Mathematical induction can be used in more profound way.
Let Sn denote the sum of the first n positive integers :
Sn= 1 + 2+ . +n
Suppose that: Sn = n(n+1)/2
A sequence of statement can be made :
CIS 275 Discrete Math I
Winter 2017
Assignment 03
Evaluation:
As described in the syllabus, the assignments are 20% of the overall grade.
Submission:
Submit your document at the beginning of the lecture or by email on Monday
03/06/17. No late submission
Chapter 4 : Introduction to
Number Theory
Introduction
What is Number Theory?
Number theory or arithmetic is the branch of pure mathematics devoted primarily
to the study of the natural numbers and the integers.
In this chapter, we used some basic number
CIS-275
Discrete Mathematics I
1
Outline
Introduction
Syllabus
Chapter 1: Sets
Homework
2
Introduction
Me
You
3
Why Study Discrete Mathematics ?
Discrete Mathematics solves problems that
continuous mathematics such as Calculus
cannot.
Discrete Mat
Chapter 9 : Trees
Introduction
Trees
Definition: A tree is a simple graph in
which there is a unique path between
every pair of vertices.
Computer Science, in particular, makes
extensive use of trees.
In Computer Science, Trees are useful in
organizing
Chapter 5 : Algorithms
Introduction
Algorithms
Definition: An algorithm is a step-by-step method of solving some problem.
Algorithm typically refers to a solution that can be executed by a computer.
Algorithms typically have the following characteristic
Chapter 3 : Functions, sequences and
relations
Functions, sequences and relations
All of mathematics, as well as subjects that rely on mathematics, such
as computer science and engineering, make use of functions,
sequences and relations.
vA function assig
Algebraic Methods in Combinatorics
Instructor: Benny Sudakov
Assignment 4
To be completed by November 25
Solution of every problem should be no longer than one page!
Problem 1: Let G be a graph with adjacency matrix A.
(a) Show that the (i, j) entry of Ak
The first box purchased will always contain one of the coupons. For each subsequent box, there
is a
(n-1)/n
chance that the coupon found will be different than the first, and since it follows a geometric
distribution, the expected number of boxes that mus
CIS 275 Discrete Math I
Winter 2017
Assignment 04
Evaluation:
As described in the syllabus, the assignments are 20% of the overall grade.
Submission:
Submit your document at the beginning of the lecture on Monday 04/03/17. No
late submission will be accep
CIS 275 Discrete Math I
Winter 2016
Assignment 01
Evaluation:
As described in the syllabus, the assignments are 20% of the overall grade.
Submission:
Submit your document at the beginning of the lecture or by email on Monday 01/30/17. No late
submission w
Lecture 11
Chapt. 6 Counting Methods
6.1. Basic Principles
Example Fig. 6.1.1
Appetizers
Nachos
Salads
Main Courses
hamburger
Cheeseburger
Fish filet
Beverages
tea
milk
coke
root Beer
Ex 6.1.1:Multiplication Rule
How may dinner choices do you have if you
Lecture 16
7.3: Applications to Algorithm
Analysis
Algorithm 7.3.1. Selection Sort
Void sort (int *A, cont int n)
/* sort the n integers in ascending order
For (int i+0; i<n; i+)
O(n)
O(n 2 )
cfw_ int j = i;
for int k=i+1; k < n; k+)
O(n)
if (A[k] < A[j])
Lecture 23
Chapter 11
Boolean Algebras and Combinational
Circuits
A Computer System
HumanHuman
users
System software
hardware
bit
Logical Operations on Boolean Variables. A
Boolean variable takes on 0 or 1 (false or true)
AND
0
1
0
0
0
1
0
1
XOR
0
1
0
0
1
Lecture 20
Chap. 9
Trees
TREES
DEF: A tree is a simple graph in which there is a
unique path between every pair of vertices.
a
b
f
c
g
ROOT
d
level 0
e
level 1
i
level 2
j
level 3
The height of a tree is the maximum level number.
i is the parent of j.
j i
Lecture 12
6.2 Permutations and Combinations
DEF. Permutations
A permutation of n distinct elements x1 , , xn is
an ordering of the n elements x1 , , xn .
Example 6.2.1 There are 6 permutations of
A,B,C.
ABC, ACB, BAC, BCA, CAB, CBA
Theorem 6.2.3
There
Lecture 9
5.2
Representation of Integers and
Integer Algorithms
Number Systems
USERS
CPU
HARDWARE
decimal numbers
hexadecimal
numbers
binary numbers
number Systems as polynomials
Decimal number
(3854)10 = 3*103 + 8*102 + 5*101 + 4*100
Binary number
(10101
Lecture 19
8.5: Representations of Graphs
Example 8.5.2 Adjacency Graph
a b
c
d
graph
a b c d
a
b
c
d
e
e
0
1
0
1
0
1
0
1
0
1
0 1
1 0
0 1
1 0
1 0
0
1
1
0
0
=A
e
adjacency matrix
Adjacency matrix: V x V
A, A2 , A3 ,
A2 = A * A =
0 1 01 0
0 1 01 0
1 0 1 01
1. If there are m people and n different birthdays, then the probability that all
m people have different birthdays is:
Tex code: (1-1/n)* (1-2/n)*(1-3/n) . (1-(m-1)/n) = \prod_cfw_j=1^cfw_m-1 (1-(j/n)
Actual Equation:
From the hint, we can say:
1-(j/n) <