Sets, Combinatorics, and Probability
Mathematical Structures
for Computer Science
Chapter 4
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 4.2
Counting
How many members are present in a finite set?
Principles of counting answer the following kind o
Sets, Combinatorics, and Probability
Mathematical Structures
for Computer Science
Chapter 4
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 4.4
Combinations
When order becomes immaterial, i.e. we are just interested in
selecting r objects from n dis
Sets, Combinatorics, and Probability
Mathematical Structures
for Computer Science
Chapter 4
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 4.5
Bayes Theorem Motivation
Bayes theorem is useful for incorporating prior
probability of an event with its
Sets, Combinatorics, and Probability
Mathematical Structures
for Computer Science
Chapter 4
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 4.1
Set theory
Definition: A set is a collection of distinct objects called
elements.
Traditionally, sets are
Sets, Combinatorics, and Probability
Mathematical Structures
for Computer Science
Chapter 4
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 4.5
Pascals Triangle
Consider the following expressions for the binomials:
(a + b)0 = 1
(a + b)1 = a + b
(a +
Sets, Combinatorics, and Probability
Mathematical Structures
for Computer Science
Chapter 4
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 4.1
Set theory
Definition: A set is a collection of distinct objects called
elements.
Traditionally, sets are
Sets, Combinatorics, and Probability
Mathematical Structures
for Computer Science
Chapter 4
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 4.5
Pascals Triangle
Consider the following expressions for the binomials:
(a + b)0 = 1
(a + b)1 = a + b
(a +
Sets, Combinatorics, and Probability
Mathematical Structures
for Computer Science
Chapter 4
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 4.2
Counting
How many members are present in a finite set?
Principles of counting answer the following kind o
Predicates and Quantifiers
Mathematical Structures
for Computer Science
Chapter 1, Section 3
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 1.3
Variables and Statements
Variables in Logic
A variable is a symbol that stands for an individual in a co
Recursion, Recurrence Relations, and
Analysis of Algorithms
Mathematical Structures
for Computer Science
Chapter 3
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 3.1
Recursive Sequences
Definition: A sequence is defined recursively by explicitly na
Recursion, Recurrence Relations, and
Analysis of Algorithms
Mathematical Structures
for Computer Science
Chapter 3
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 3.1
Recursive Sequences
Definition: A sequence is defined recursively by explicitly na
Proofs, Induction, and Number Theory
Mathematical Structures
for Computer Science
Chapter 2
Copyright 2014 W.H. Freeman & Co.
MSCS Slides
Section 2.1
Proof Techniques
Possible methods of proof:
Proof by exhaustion
Direct proof
Proof by contraposition
Proo
1. p q r
a) r p
b) r q
c) p q r
d) r <> (qp)
e) p q r
2.
a)
b)
c)
d)
False
True
True
True
3. a)
q
F
T
Q
T
F
b)
Q
p
T
T
F
F
T
F
T
F
q q
T
T
p
F
T
F
T
q p
T
F
F
T
c)
P
q
pq
p q
(p q) (p q)
T
T
T
F
F
T
F
T
F
T
F
F
T
F
T
F
T
F
T
F
P
q
p q
pq
(p q) (p q)
T
T
(Exponential expressions, such as 36^3, can be left as they are. You do not need
compute the exact values.)
1. (10 points) Find the prime factorization of each of these integers.
a) 97 b) 81 c) 24 d) 143
e) 169
f ) 625
2. (10 points) Use the Euclidean alg
1.
Suppose
I(x) represents "x is an integer",
E(x) represents "x is even", and
O(x) represents "x is odd", respectively,
translate the following English sentences into predicate logic statements:
1) "Not every integer is even",
2)"All integers are odd"
3)
1(10points) Suppose that E and F are events in a sample space and p(E) = 1/3, p(F) = 2/3, and
p(F  E) = 3/4. Find p(E  F) and P(E and F).
2.(20 points) When a test for steroids is given to swimmers, 96% of the swimmers taking
steroids test positive and
1 (20 points)
Suppose the following relations are defined on the set of A = cfw_2, 1, 0 1, 2, , . List the pairs in
each relation and determine each relation is reflexive, symmetric and transitive .
1)
2)
3)
4)
5)
6)
R = cfw_(a,b)  a+b = 0
R = cfw_(a,b
(Factorial and exponential expressions, such as 10! and 36^3, can be left as they
are. You do not need compute the exact values.)
1. (10 points ) Let S = cfw_1, 2, 3, 4, 5.
a) List all the 2combinations of S.
b) List all the 2permutations of S.
2. (10 p
1. Format the cells below so it has a border around each cell and the make the cells within the border yellow.
$
$
$
$
$
24.00
45.00
44.00
76.00
23.00
$
$
$
$
$
44.00
78.00
76.00
77.00
98.00
$
$
$
$
$
45.00
101.00
67.00
45.00
89.00
2. Format the cells abo
S04 Review
1. What is system Analysis: Is the act, process, or profession of studying an activity (as a
procedure, a business, or a physiological function) typically by mathematical means in
order to define its goals or purposes and to discover operations
S06 Assignment
(i)
1)
1. All data flows must flow to or from a process:
All flows of data must be either coming from or going to a process. External entities cannot flow
directly to each other. A data flow cannot link a data store to an external entity. D
DBMS250 Exam
Ch 16  Automating Tasks by Using Oracle Scheduler
1
2
In which situation would you use a Schedulergenerated event?
You would use a Schedulergenerated event when you want to execute another job
immediately after another job completes. Sched
Apply Your Knowledge
1.)
TERRIER NEWS
NAME

ADDRESS

Method of Payment
TELEPHONE

 Money
ORDER


EMAIL

 Master card
check
Visa
Ad Categories Express
Ads are for dogs wanted
Ads are for dogs for sale
Ads are for products
Ads are for services
2.)
DBMS150 Final Exam
CHAPTER 7
Why is there a segment for system.T1 but not for scott.T1?
Deferred segment creation is not supported for the system schema
In some circumstances, a row can be migrated. What could be the result?
Row migration does not have
CSCI 362: Data Structures
Problem Set 1 Sample Answers
1. Prove or disprove the following statements:
Big O definition: O(g(n) = f(n)
If there exist positive constants c and such that 0<= f(n) <= cg(n) for all n>= k .
(i) n! = O(nn) (Demonstration)
(a) n!
Below are the final exam grades and the estimated number of minutes students said they studied to prepare for
Class Grades
Minutes Studied.
Letter Grade
63
55
D
67
65
D
62
83
D
45
55
F
59
88
F
48
40
F
54
35
F
53
67
F
51
89
F
54
76
F
55
55
F
45
60
F
54
60