Download presentation
Presentation is loading. Please wait.
Published byFrederica Hill Modified over 9 years ago
1
CSC-2259 Discrete Structures Konstantin Busch Louisiana State University
K. Busch - LSU
2
Topics to be covered Logic and Proofs Sets, Functions, Sequences, Sums
Integers, Matrices Induction, Recursion Counting Discrete Probability Graphs K. Busch - LSU
3
Binary Arithmetic Decimal Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Numbers: 9, 28, 211, etc Binary Digits: 0, 1 (also known as bits) Numbers: , 11100, , etc K. Busch - LSU
4
Binary Decimal 1001 9 K. Busch - LSU
5
1001 (9) 1001 (9) x 1 1 (3) + 1 1 (3) ------ ------ 1001 1100 (12)
Binary Addition Binary Multiplication (9) x (3) ------ 1001 + 1001 (27) (9) (3) ------ (12) K. Busch - LSU
6
Binary Logic AND OR NOT Gates NOT AND OR x y z 1 x y z 1 x z 1
1 x y z 1 NOT x z 1 Gates NOT AND OR K. Busch - LSU
7
… An arbitrary binary function is implemented
with NOT, AND, and OR gates … OR AND NOT K. Busch - LSU
8
Propositional Logic Proposition: a declarative sentence which
is either True or False Examples: Today is Wednesday (False) Today it Snows (False) 1+1 = (True) 1+1 = (False) H20 = water (True) K. Busch - LSU
9
We can map to binary values: True = 1 False = 0
Propositions can be combined using the binary operators AND, OR, NOT Example: K. Busch - LSU
10
“You get a computer science degree
Implication True False x implies y “You get a computer science degree only if you are a computer science major” You get a computer science degree You are a computer science major K. Busch - LSU
11
“There is a received phone call if and only if there is a phone ring”
Bi-conditional True False x if and only if y “There is a received phone call if and only if there is a phone ring” There is a received phone call There is a phone ring K. Busch - LSU
12
Sets Set is a collection of elements: Real numbers R Integers Z
Empty Set Students in this room K. Busch - LSU
13
Basic Set Operations 1 Subset 3 2 4 5 Union 1 4 3 2 5 K. Busch - LSU
14
Intersection 1 4 3 2 5 Complement universe K. Busch - LSU
15
DeMorgan’s Laws K. Busch - LSU
16
Inclusion-Exclusion A B C K. Busch - LSU
17
Contains all subsets of a set
Powersets Contains all subsets of a set Powerset of A K. Busch - LSU
18
Counting Suppose we are given four objects: a, b, c, d
How many ways are there to order the objects? a,b,c,d b,a,c,d a,b,d,c b,a,d,c … and so on K. Busch - LSU
19
Combinations Given a set S with n elements
how many subsets exist with m elements? Example: K. Busch - LSU
20
Sterling’s Approximation
K. Busch - LSU
21
Probabilities What is the probability the a dice gives 5?
Event set = {5} Sample space = {1,2,3,4,5,6} K. Busch - LSU
22
What is the probability that two dice give the same number?
Event set = {{1,1},{2,2},{3,3},{4,4},{5,5},{6,6}} Sample Space = {{1,1},{1,2},{1,3}, …., {6,5}, {6,6}} K. Busch - LSU 22
23
Quicksort(A): Randomized Algorithms If ( |A| == 1)
return the one item in A Else p = RandomElement(A) L = elements less than p H = elements higher than p B = Quicksort(L) C = Quicksort(H) return(BC) K. Busch - LSU
24
Graph Theory San Francisco Chicago Boston New York Las Vegas Atlanta
1500 miles Boston 2000 miles 300 New York 800 1500 1500 Las Vegas 800 1000 700 Atlanta 1000 1000 1500 2000 700 Baton Rouge 1500 Los Angeles Miami K. Busch - LSU
25
Shortest Path from Los Angeles to Boston
1500 2000 300 800 1500 1500 800 1000 700 1000 1000 1500 700 2000 1500 Los Angeles K. Busch - LSU
26
Maximum number of edges in a graph with nodes:
Clique with five nodes K. Busch - LSU
27
Other interesting graphs
Trees Bipartite Graph K. Busch - LSU
28
Recursion Sum of arithmetic sequence Basis Sum of geometric sequence
K. Busch - LSU
29
Divide and conquer algorithms (Quicksort)
Fibonacci numbers Basis Divide and conquer algorithms (Quicksort) K. Busch - LSU
30
Proof Techniques Induction Contradiction Pigeonhole principle
K. Busch - LSU
31
Proof by Induction Prove: Induction Basis: Induction Hypothesis:
Induction Step: K. Busch - LSU
32
Proof by Contradiction
is irrational Suppose ( and have no common divisor greater than 1 ) m=2k m2 is even m is even 2 n2 = 4k2 n2 = 2k2 n is even Contradiction K. Busch - LSU
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.