1 / 17

Math Review

Math Review . CSC 351. Sets: Basic Operations. Set: a collection of elements, no imposed structure S1 = {0,1,2,3,4,5} S2={0,2,4,6,8,10} S3 = {i : i > 0, i is even} S1 U S2 = S1 ∩ S2 = S1 – S2 = S3 =. Sets: Basics Cont’d. Ø = { } (null set or empty set)

duke
Télécharger la présentation

Math Review

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. Math Review CSC 351

  2. Sets: Basic Operations • Set: a collection of elements, no imposed structure • S1 = {0,1,2,3,4,5} S2={0,2,4,6,8,10} • S3 = {i : i > 0, i is even} • S1 U S2 = • S1 ∩ S2 = • S1 – S2 = • S3 =

  3. Sets: Basics Cont’d • Ø = { } (null set or empty set) • U = Universal set, or all possible elements • Subsets: • Proper subsets • Sets with no common elements are disjoint • Number of elements in a set |S|

  4. Sets: Powerset • S = {0,1} • Powerset of S is

  5. Sets: DeMorgan’s Laws

  6. Sets: Cartesian Product • S1 X S2 = {(x,y) : x is in S1 and y is in S2} • S1 = {2,4} S2 = {1,2,3} • S1 X S2 =

  7. Functions • Function: assigns elements of one set uniquely to elements of another set • Domain: first set • Range: “another” set • f: S1 S2 (S1 is domain, S2 is range) • f(x: x is in S1) has only one possibility • If all members in the domain are mapped, the function is a total function. Otherwise, it is a partial function.

  8. Function Growth Rates Huh?!?

  9. Function Growth Rates exponential quadratic linear logarithmic constant

  10. Function Growth Rates

  11. Relations • Mapping from one set to another without restrictions • Equivalence relation • Reflexive x Ξ x • Symmetric x Ξ y implies y Ξ x • Transitive x Ξ y and y Ξ z implies x Ξ z

  12. Graphs • Graph: a picture with vertices and edges • Digraph: a graph with arrows for edges (directed graph) • Walk: path from one vertex to another in a graph • Simple path: no repeated vertices • Cycle: path from one vertex back to itself

  13. Trees • Directed graph with no cycles, with one root node such that there is a path from root to every other node • Leaves: nodes with no outarcs • Parent/Child nodes: edge connects from parent node to child node • Level of a node: length of path from root to node • Height: length of longest path from root to leaf

  14. Proof Techniques: Proof by contradiction • Want to prove that P is true • Assume that P is not true • Arrive at an impossible conclusion

  15. Proof by Contradiction Given: n is even iff n=2k for some integer k. Also: n is odd iff n = 2k – 1 for some integer k. Prove: If n2 is an even integer, then n is an even integer. Assume: n2 is an even integer and n is odd. n = 2k -1 n2 = (2k -1)2 = 4k2 -4k +1 = 2(2k2 -2k) -1 Since 2k2 -2k is an integer, n2 is odd. But that contradicts the assumption that n2 is even. So n must be even.

  16. Proof Techniques: Proof by Induction • Prove base case: proposition is true for some number. (Base) • Assume that the proposition is true for some n >= the base case (Assume) • Show that the proposition holds for n+1. (Show) (Why does this work??)

  17. Proof by Induction • Prove that the sum of the first n positive integers is • Base case: k =1; • 0+1= =1 • Assume sum of first k positive integers is • Then, sum of first k+1 integers is

More Related