DEV Community

David Hwang
David Hwang

Posted on

5/18 TIL: Cartesian Product

  • Cartesian Product A X B is the set of all ordered pairs (a,b) where a ∈ A and b ∈ B
  • A function:
    • For every input, there is some output
    • Has one output at most for an input—vertical line testing could be done to test this
  • A function F between A and B is a relation between A and B (subset of A X B)—define this using the Cartesian Product:
    • For every element x ∈ A there is an element y ∈ b such that (x, y) ∈ F
    • If (x, y) ∈ F and (x, z) ∈ F then y = z
  • Two statements are logically equivalent if they have the same truth table
    • p ≡ ~(~p) (p equals to not not p)
    • DeMorgan's Laws

Top comments (0)