Skip to content

Latest commit

 

History

History
164 lines (152 loc) · 7.8 KB

ListofSymbols.md

File metadata and controls

164 lines (152 loc) · 7.8 KB

List of Symbols (Discrete Mathematics)

CS-113 Discrete Structures

Logic

  • pq: p or q
  • pq: p and q
  • ¬ p, − p, p bar: not p
  • pq: if p, then q
  • pq: p if and only if q
  • PQ: P and Q are logically equivalent
  • ∀: for all
  • ∃: there exists
  • ∴: therefore

Set Notation

  • {x1, ... , xn}: set consisting of the elements x1, ... , xn
  • {x | p(x)}: set consisting of those elements x satisfying property p(x)
  • xX: x is an element of X
  • xX: x is not an element of X
  • X = Y: set equality (X and Y have the same elements)
  • |X|: number of elements in X
  • ∅: empty set
  • XY: X is a subset of Y
  • P(X): power set of X (all subsets of X)
  • XY: X union Y (all elements in X or Y)
  • i = 1 ⋃ n Xi: union of X1, ... , Xn (All elements that belong to at least one of X1, X2, ... , Xn)
  • i = ∞ ⋃ n Xi: union of X1, X2, ... , (All elements that belong to at least one of X1, X2, ...)
  • S: union of S (all elements that belong to at least one set in S)
  • XY: X intersect Y (all elements in X and Y)
  • i = 1 ∩ n Xi: intersection of X1, ... , Xn (All elements that belong to every one of X1, X2, ... , Xn)
  • i = ∞ ∩ n Xi: intersection of X1, X2, ... , (All elements that belong to every one of X1, X2, ...)
  • S: intersection of S (all elements that belong to at every set in S)
  • XY: set difference (all elements in X but not in Y)
  • : complement of X (all elements not in X)
  • (x, y): ordered pair
  • (x1, ... , xn): n-tuple
  • X × Y: Cartesian product of X and Y [pairs (x, y) with x in X and y in Y]

Relations

  • xRy: (x, y) is in R (x is related to y by the relation R)
  • [x]: equivalence class containing x
  • R−1: inverse relation (all (y, x) with (x, y) in R)
  • R2R1: composition of relations
  • xy: xRy

Functions

  • f(x): value assigned to x
  • f: XY: function from X to Y
  • fg: composition of f and g
  • f−1: inverse function (all (y, x) with (x, y) in f)
  • f(n) = Ο(g(n)): |f(n)| ≤ C|g(n)| for n sufficiently large
  • f(n) = Ω(g(n)): c|g(n)| ≤ |f(n)| for n sufficiently large
  • f(n) = Θ(g(n)): c|g(n)| ≤ |f(n)| ≤ C|g(n)| for n sufficiently large

Counting

  • C(n, r): number of r-combinations of an n-element set (n!/[(nr)!r!])
  • P(n, r): number of r-permutations of an n-element set (n(n − 1) ... (nr + 1))

Graphs

  • G = (V, E): graph G with vertex set V and edge set E
  • (v, w): edge
  • δ(v): degree of vertex v
  • (v1, ... , vn): path from v1 to vn
  • (v1, ... , vn): v1 = vn: cycle
  • Kn: complete graph on n vertices
  • Km, n: complete bipartite graph on m and n vertices
  • w(i, j): weight of edge (i, j)
  • Fij: flow in edge (i, j)
  • Cij: capacity of edge (i, j)
  • (P, ): cut in a network

Probability

  • P(x): probability of outcome x
  • P(E): probability of event E
  • P(E|F): conditional probability of E given F[P(EF)/P(F)]

Boolean Algebras and Circuits

  • xy: x or y (1 if x or y is 1, 0 otherwise)
  • xy: x and y (1 if x and y are 1, 0 otherwise)
  • xy: exclusive-OR of x and y (0 if x = y, 1 otherwise)
  • : not x (0 if x is 1, 1 if x is 0)
  • xy: x NOR y (0 if x or y are 1, 1 otherwise)
  • xy: x NAND y (0 if x and y are 1, 1 otherwise)
  • Circuits:
    Diagrams of Circuits, All Hand Drawn by Me; In Order From Left to Right: OR Gate, AND Gate, NOT Gate, NOR Gate, and a NAND Gate

Strings, Grammars, and Languages

  • λ: null string
  • |s|: length of the string s
  • st: concatenation of strings s and t (s followed by t)
  • an: aa ... a (n a's)
  • X*: set of all strings over X
  • X+: set of all nonnul strings over X
  • αβ: production in a grammar
  • αβ: β is derivable from α
  • α1α2 ⇒ ... ⇒ αn: derivation of αn from α1
  • L(G): language generated by the grammar G
  • S ::= T: Backus normal form (BNF)
  • S ::= T1 | T2: S ::= T1, S ::= T2
  • Ac(A): set off strings accepted by A

Matrices

  • (aij): matrix with entries aij
  • A = B: matrices A and B are equal (A and B are the same size and their corresponding entries are equal)
  • A + B: matrix sum
  • cA: scalar product
  • A: (−1)A
  • AB: A + (− B)
  • AB: matrix product
  • An: matrix product AA ... A (n A's)

Miscellaneous

  • lg x: logarithm to the base 2 of x
  • ln x: natural logarithm of x (logarithm to the base e of x)
  • m mod n: remainder when m is divided by n
  • x⌋: floor of x (greatest integer less than or equal to x)
  • x⌉: ceiling of x (smallest integer greater than or equal to x)
  • b | a: b divides a
  • ba: b does not divide a
  • gcd(a, b): greatest common divisor of a and b
  • n!: n factorial (n(n − 1) ... 2 ⋅ 1)
  • fn: n th Fibonacci number
  • Cn: n th Catalan number
  • i = m Σ n ai: am + am+1 + ... + an
  • iX Σ ai: the sum of the elements in the set {ai | iX}
  • i = mn ai: amam+1 ⋅ ... ⋅ an
  • iXai: the product of the elements in the set {ai | iX}

Algorithm Notation

  • x := y
    • assign the value y to x
  • begin end
    • mark the beginning and end of a block of statements
  • if p then
      action
    
    • if p is true, execute action
  • if p then  
      action 1  
    else  
      action 2  
    
    • if p is true, execute action1; if p is false, execute action2
  • //
    • a comment starts with // and continues to the end of the line
  • return
    • suspend execution and return to invoker
  • return(x)
    • suspend execution and return the value x to invoker
  • while p do
      action
    
    • if p is true, execute action and repeat this process
  • for var := init to limit do
      action
    
    • execute action for values of var from init to limit
  • call proc(p1, ... , pk)
    • invoke procedure proc with arguments p1, ... , pk