1 / 32

CS 23022 Discrete Mathematical Structures

CS 23022 Discrete Mathematical Structures. Mehdi Ghayoumi MSB rm 132 mghayoum@kent.edu Ofc hr: Thur, 9:30-11:30a. Announcements. Homework , Hwk 5 is available now Midterm 1: 06/30/14, location rm121. Today section 2.4 and 2.5 Rossen and some articles

janine
Download Presentation

CS 23022 Discrete Mathematical Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 23022Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 mghayoum@kent.edu Ofc hr: Thur, 9:30-11:30a

  2. Announcements Homework , Hwk 5 is available now Midterm 1: 06/30/14, location rm121. Today section 2.4 and 2.5 Rossen and some articles Next Sections will be exam review.

  3. Sequences Definition: A sequence {ai} is a function f: N  {0}  R, where we write aito indicate f(i). A Sequence is a list of things (usually numbers) that are in order.

  4. Sequences Examples: {1, 2, 3, 4, ...} is a very simple sequence (and it is an infinite sequence) {20, 25, 30, 35, ...} is also an infinite sequence {1, 3, 5, 7} is the sequence of the first 4 odd numbers (and is a finite sequence) {1, 2, 4, 8, 16, 32, ...} is an infinite sequence where every term doubles {a, b, c, d, e} is the sequence of the first 5 letters alphabetically

  5. Sequences Examples: {f, r, e, d} is the sequence of letters in the name "fred" {0, 1, 0, 1, 0, 1, ...} is the sequence of alternating 0s and 1s (yes they are in order, it is an alternating order in this case) Sequence {ai}, where ai = i is just a0 = 0, a1 = 1, a2 = 2, … Sequence {ai}, where ai = i2 is just a0 = 0, a1 = 1, a2 = 4, …

  6. Summation The symbol: The limit:

  7. Sum of first n odds. Summations you should know… What is S = 1 + 3 + 5 + … + (2n - 1)?

  8. Sum of first n odds. Summations you should know… What is S = 1 + 3 + 5 + … + (2n - 1)?

  9. Summations you should know… Arithmetic Sequences the difference between one term and the next is a constant. Example: 1, 4, 7, 10, 13, 16, 19, 22, 25, ... {a, a+d, a+2d, a+3d, ... } a is the first term, and d is the difference between the terms xn = a + d(n-1)

  10. Summations you should know… GeometricSequences each term is found by multiplying the previous term by a constant Example: 2, 4, 8, 16, 32, 64, 128, 256, ... This sequence has a factor of 2 between each number. {a, ar, ar2, ar3, ... } • a is the first term, and • r is the factor between the terms (called the "common ratio") xn = ar(n-1)

  11. Summations you should know… Triangular Numbers 1, 3, 6, 10, 15, 21, 28, 36, 45, ... xn = n(n+1)/2 the 5th Triangular Number is x5 = 5(5+1)/2 = 15, and the sixth is x6 = 6(6+1)/2 = 21

  12. Summations you should know… Square Numbers 1, 4, 9, 16, 25, 36, 49, 64, 81, ... The next number is made by squaring where it is in the pattern. Rule isxn = n2 Cube Numbers 1, 8, 27, 64, 125, 216, 343, 512, 729, ... The next number is made by cubing where it is in the pattern. Rule isxn = n3

  13. Summations you should know… Fibonacci Sequence 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ... Rule is xn = xn-1 + xn-2

  14. Geometric Series Multiply by r Subtract 2nd from 1st factor divide DONE! Summations you should know… What is S = 1 + r + r2 + … + rn

  15. If r  1 this blows up. If r < 1 we can say something. Summations you should know… What about:

  16. An infinite set is “countably infinite” if it can be put into one-to-one correspondence with the set of natural numbers. A set is “countable” if it is either finite or countably infinite. Infinite Cardinality Two sets A and B have the same cardinality if and only if there exists a bijection between them, A ~ B. In your own example, we can create bijections between the various descriptions of the sets of A and the set of B.

  17. {0,2,4,6,8,…} ~ {1,3,5,7,9,…}, f(x) = x-1 N ~ {0,2,4,6,8,…}, f(x) = 2x {0,2,4,6,8,…} ~ {0,3,6,9,12,…}, f(x) = 3x/2 {0,2,4,6,8,…} ~ {2,4,6,8,…}, f(x) = x-2 Perfect squares ~ N, f(x) = x Infinite Cardinality Are there more evens than odds? Are there more natural numbers than evens? Are there more evens than multiples of 3?

  18. 1/1, 1/2, 1/3, 1/4, … 2/1, 2/2, 2/3, 2/4, … 3/1, 3/2, 3/3, 3/4, … 1/1, 1/2, 2/1, 1/3, 2/2, 3/1, 1/4, 2/3, 3/2, 4/1, … Infinite Cardinality How many rational numbers are there?

  19. 0.4 3 2 9 0 1 3 2 9 8 4 2 0 3 9 … 0.8 2 5 9 9 1 3 2 7 2 5 8 9 2 5 … 0.9 2 5 3 9 1 5 9 7 4 5 0 6 2 1 … “Countably many! There’s the list!” “Are you sure they’re all there?” Counterexample: 0.5 3 6 … So we say the reals are “uncountable.” Infinite Cardinality How many real numbers are in interval [0, 1]?

  20. Countably many, we can list them by length. Can we write programs for all functions? How many different programs can we write? Depends on the size of the alphabet we use. Let’s say our alphabet is size 100. How many 1 character programs are there? How many 2 character programs are there? How many n character programs are there? How many programs are there?

  21. 0.1415926… Real, irrational. Can we write programs for all functions? How many different functions are there? Suppose domain is N, and codomain is {0,1,…9}, so we’re really only asking “how many functions f:N{0,1,2,…9} are there?”

  22. Matrix A Matrix is an array of numbers: A Matrix(This one has 2 Rows and 3 Columns) Adding To add two matrices: add the numbers in the matching positions: The two matrices must be the same size, i.e. the rows must match in size, and the columns must match in size.

  23. Matrix Negative The negative of a matrix is also simple: Subtracting To subtract two matrices: subtract the numbers in the matching positions:

  24. Matrix Multiply by a Constant We can multiply a matrix by some value: Multiplying by Another Matrix But to multiply a matrix by another matrix you need to do the "dot product" of rows and columns ... what does that mean? To work out the answer for the 1st row and 1st column:

  25. Matrix Dividing A/B = A × (1/B) = A × B-1 where B-1 means the "inverse" of B. When you multiply a number by its reciprocal you get 1 8 × (1/8) = 1 When you multiply a Matrix by its Inverse you get the Identity Matrix (which is like "1" for Matrices): A × A-1 = I

  26. Matrix Dividing 2x2 Matrix OK, how do we calculate the Inverse? Well, for a 2x2 Matrix the Inverse is: In other words: swap the positions of a and d, put negatives in front of b and c, and divide everything by the determinant (ad-bc).

  27. Matrix Dividing Let us try an example: So, let us check to see what happens when we multiply a matrix by its inverse:

  28. Matrix Dividing A Real Life Example A group took a trip on a bus, at $3 per child and $3.20 per adult for a total of $118.40. They took the train back at $3.50 per child and $3.60 per adult for a total of $135.20. How many children, and how many adults? First, let us set up the matrices (be careful to get the rows and columns correct!):

  29. Matrix Dividing This is just like the example above: XA = B So to solve it we need the inverse of "A":

  30. Matrix Now we have the inverse we can solve using: X = BA-1 Same answer: 16 children and 22 adults.

  31. Matrix Transposing To "transpose" a matrix, swap the rows and columns. We put a "T" in the top right-hand corner to mean transpose: Notation A matrix is usually shown by a capital letter (such as A, or B) Each entry (or "element") is shown by a lower case letter with a "subscript" of row, column:

More Related