Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

04 - Sets

on

  • 1,194 views

I used this set of slides for the lecture on Sets I gave at the University of Zurich for the 1st year students following the course of Formale Grundlagen der Informatik.

I used this set of slides for the lecture on Sets I gave at the University of Zurich for the 1st year students following the course of Formale Grundlagen der Informatik.

Statistics

Views

Total Views
1,194
Views on SlideShare
1,194
Embed Views
0

Actions

Likes
0
Downloads
22
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

04 - Sets 04 - Sets Presentation Transcript

  • Logic reloaded www.tudorgirba.com
  • What exactly is logic?
  • What exactly is logic? the study of the principles of correct reasoning
  • s th e basic U these are y cZtfns_ w ax off … /watch?v=3P Wa x on … tube.com ww.you http://w
  • Sets www.tudorgirba.com
  • computation information information computer
  • Set A set is a group of objects.
  • Set A set is a group of objects. {10, 23, 32}
  • Set A set is a group of objects. {10, 23, 32} N = {0, 1, 2, … }
  • Set A set is a group of objects. {10, 23, 32} N = {0, 1, 2, … } Z = {… , -2, -1, 0, 1, 2, … }
  • Set A set is a group of objects. {10, 23, 32} N = {0, 1, 2, … } Z = {… , -2, -1, 0, 1, 2, … } Ø empty set
  • Set A set is a group of objects. {10, 23, 32} N = {0, 1, 2, … } Z = {… , -2, -1, 0, 1, 2, … } Ø empty set U universe
  • Set Membership A set is a group of objects. a is a member of set A {10, 23, 32} N = {0, 1, 2, … } Z = {… , -2, -1, 0, 1, 2, … } Ø empty set U universe
  • Set Membership A set is a group of objects. a is a member of set A {10, 23, 32} 10 ∈ {10, 23, 32} N = {0, 1, 2, … } Z = {… , -2, -1, 0, 1, 2, … } Ø empty set U universe
  • Set Membership A set is a group of objects. a is a member of set A {10, 23, 32} 10 ∈ {10, 23, 32} N = {0, 1, 2, … } -1 ∉ N Z = {… , -2, -1, 0, 1, 2, … } Ø empty set U universe
  • Subset A⊆B Every member of A is also an element of B.
  • Subset A⊆B Every member of A is also an element of B. ∀x:: x∈A x∈B
  • Subset A⊆B Every member of A is also an element of B. ∀x:: x∈A x∈B ∅ ⊆ A. A ⊆ A. A = B A ⊆ B ∧ B ⊆ A.
  • Subset A⊆B Every member of A is also an element of B. ∀x:: x∈A x∈B ∅ ⊆ A. A ⊆ A. A = B A ⊆ B ∧ B ⊆ A. Proper subset A⊂B A is a subset of B and not equal to B.
  • Subset A⊆B Every member of A is also an element of B. ∀x:: x∈A x∈B ∅ ⊆ A. A ⊆ A. A = B A ⊆ B ∧ B ⊆ A. Proper subset A⊂B A is a subset of B and not equal to B. ∀x:: A⊆B ∧ A≠B
  • Union A∪B ∀x:: x∈A ∨ x∈B A∪B={ x | x∈A or x∈B }
  • Union A∪B ∀x:: x∈A ∨ x∈B A∪B={ x | x∈A or x∈B }
  • Union A∪B ∀x:: x∈A ∨ x∈B A∪B={ x | x∈A or x∈B } A ∪ B = B ∪ A. A ∪ (B ∪ C) = (A ∪ B) ∪ C. A ⊆ (A ∪ B). A ∪ A = A. A ∪ ∅ = A. A ⊆ B A ∪ B = B.
  • Intersection A∩B ∀x:: x∈A ∧ x∈B A∩B={ x | x∈A and x∈B }
  • Intersection A∩B ∀x:: x∈A ∧ x∈B A∩B={ x | x∈A and x∈B }
  • Intersection A∩B ∀x:: x∈A ∧ x∈B A∩B={ x | x∈A and x∈B } A ∩ B = B ∩ A. A ∩ (B ∩ C) = (A ∩ B) ∩ C. A ∩ B ⊆ A. A ∩ A = A. A ∩ ∅ = ∅. A ⊆ B A ∩ B = A.
  • Complements AB, A’ ∀x:: x∈A ∧ x∉B AB={ x | x∈A and x∉B }
  • Complements AB, A’ ∀x:: x∈A ∧ x∉B AB={ x | x∈A and x∉B } A B ≠ B A. A ∪ A′ = U. A ∩ A′ = ∅. (A′)′ = A. A A = ∅. U′ = ∅. ∅′ = U. A B = A ∩ B′.
  • Neutral elements A ∩ U = A A ∪ ∅ = A
  • Neutral elements A ∩ U = A A ∪ ∅ = A Zero elements A ∩ ∅ = ∅ A ∪ U = U
  • Neutral elements A ∩ U = A A ∪ ∅ = A Zero elements A ∩ ∅ = ∅ A ∪ U = U Idempotence A ∩ A = A A ∪ A = A
  • Neutral elements Commutativity A ∩ U = A A ∪ B = B ∪ A A ∪ ∅ = A A ∩ B = B ∩ A Zero elements A ∩ ∅ = ∅ A ∪ U = U Idempotence A ∩ A = A A ∪ A = A
  • Neutral elements Commutativity A ∩ U = A A ∪ B = B ∪ A A ∪ ∅ = A A ∩ B = B ∩ A Zero elements Associativity A ∩ ∅ = ∅ A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∪ U = U A ∪ (B ∪ C) = (A ∪ B) ∪ C Idempotence A ∩ A = A A ∪ A = A
  • Neutral elements Commutativity A ∩ U = A A ∪ B = B ∪ A A ∪ ∅ = A A ∩ B = B ∩ A Zero elements Associativity A ∩ ∅ = ∅ A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∪ U = U A ∪ (B ∪ C) = (A ∪ B) ∪ C Idempotence Distributivity A ∩ A = A A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ A = A A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
  • Neutral elements Commutativity A ∩ U = A A ∪ B = B ∪ A A ∪ ∅ = A A ∩ B = B ∩ A Zero elements Associativity A ∩ ∅ = ∅ A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∪ U = U A ∪ (B ∪ C) = (A ∪ B) ∪ C Idempotence Distributivity A ∩ A = A A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ A = A A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) Complement A ∩ A’ = ∅ A ∪ A’ = U
  • Neutral elements Commutativity a ∧ 1 = a a ∨ b = b ∨ a a ∨ 0 = a a ∧ b = b ∧ a Zero elements Associativity a ∧ 0 = 0 a ∧ (b ∧ c) = (a ∧ b) ∧ c a ∨ 1 = 1 a ∨ (b ∨ c) = (a ∨ b) ∨ c Idempotence Distributivity a ∧ a = a a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) a ∨ a = a a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) Negation a ∧ ¬ a = 0 n algebra o boolea a ∨ ¬ a = 1 S imilar t
  • Neutral elements Commutativity A ∩ U = A A ∪ B = B ∪ A A ∪ ∅ = A A ∩ B = B ∩ A Zero elements Associativity A ∩ ∅ = ∅ A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∪ U = U A ∪ (B ∪ C) = (A ∪ B) ∪ C Idempotence Distributivity A ∩ A = A A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ A = A A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) Complement A ∩ A’ = ∅ A ∪ A’ = U
  • Neutral elements Commutativity A ∩ U = A A ∪ B = B ∪ A A ∪ ∅ = A A ∩ B = B ∩ A Zero elements Associativity A ∩ ∅ = ∅ A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∪ U = U A ∪ (B ∪ C) = (A ∪ B) ∪ C Idempotence Distributivity A ∩ A = A A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ A = A A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) Complement DeMorgan’s A ∩ A’ = ∅ (A ∩ B)’ = (A’) ∪ (B’) A ∪ A’ = U (A ∪ B)’ = (A’) ∩ (B’)
  • Reflexivity A ⊆ A. Anti-symmetry A ⊆ B ∧ B ⊆ A A = B. Transitivity A ⊆ B ∧ B ⊆ C A ⊆ C
  • Paper Scissors Stone
  • Paper beats beats Scissors Stone beats
  • Paper beats beats Scissors Stone beats
  • Paper beats beats Scissors Stone beats beats Scissors Paper Stone Scissors FALSE TRUE FALSE Paper FALSE FALSE TRUE Stone TRUE FALSE FALSE
  • Paper beats beats Scissors Stone beats beats Scissors Paper Stone Scissors FALSE TRUE FALSE Paper FALSE FALSE TRUE Stone TRUE FALSE FALSE
  • Paper beats beats Scissors Stone beats beats Scissors Paper Stone Scissors FALSE TRUE FALSE Paper FALSE FALSE TRUE Stone TRUE FALSE FALSE
  • Paper beats beats Scissors Stone beats beats Scissors Paper Stone Scissors FALSE TRUE FALSE Paper FALSE FALSE TRUE Stone TRUE FALSE FALSE
  • beats = {(Scissors, Paper), (Paper, Stone), (Stone, Scissors)} beats Scissors Paper Stone Scissors FALSE TRUE FALSE Paper FALSE FALSE TRUE Stone TRUE FALSE FALSE
  • beats = {(Scissors, Paper), (Paper, Stone), (Stone, Scissors)} beats ⊆ {Scissor, Paper, Stone} x {Scissor, Paper, Stone} beats Scissors Paper Stone Scissors FALSE TRUE FALSE Paper FALSE FALSE TRUE Stone TRUE FALSE FALSE
  • Cartesian product AxB AxB={ (a,b) | a∈A and b∈B }
  • Cartesian product AxB AxB={ (a,b) | a∈A and b∈B } A × ∅ = ∅. A × (B ∪ C) = (A × B) ∪ (A × C). (A ∪ B) × C = (A × C) ∪ (B × C).
  • N-ary Relation A1, A2, ..., An R ⊆ A1 x A2 x...x An
  • N-ary Relation A1, A2, ..., An R ⊆ A1 x A2 x...x An Binary Relation
  • N-ary Relation A1, A2, ..., An R ⊆ A1 x A2 x...x An Binary Relation A 1, A 2 R ⊆ A1 x A2 (a,b) ∈ R aRb
  • N-ary Relation A1, A2, ..., An R ⊆ A1 x A2 x...x An Binary Relation A 1, A 2 R ⊆ A1 x A2 (a,b) ∈ R aRb
  • Tudor Gîrba www.tudorgirba.com creativecommons.org/licenses/by/3.0/