Comprehensive Discrete Mathematics Study Notes

Set Theory

  • Definition of a Set: Sets are the fundamental discrete structures on which all others are built. Formally, a set is an unordered, well-defined collection of distinct objects, known as elements or members of the set, all of the same type. The "type" is defined by the person establishing the set.
    • Examples of Sets:
      • A={0,2,4,6,}A = \{0, 2, 4, 6, \dots\}
      • B={1,3,5,}B = \{1, 3, 5, \dots\}
      • C={xxNatural number}C = \{x \mid x \in \text{Natural number} \}
  • Notation and Membership:
    • Sets are generally denoted by capital letters (A,B,CA, B, C).
    • Objects within a set are called elements or members.
    • Lower case letters (x,y,zx, y, z) are used to denote elements.
    • xAx \in A means that element xx is a member of set AA.
    • xAx \notin A means that element xx is not a member of set AA.
  • Cardinality of a Set: This refers to the number of elements present in a set, denoted as A|A|. For example, if A={0,2,4,6}A = \{0, 2, 4, 6\}, then A=4|A| = 4.
  • Representation of Sets:
    • Tabular/Roster Form: The set is defined by actually listing all its members inside curly braces. Examples include A={a,e,i,o,u}A = \{a, e, i, o, u\}, B={1,2,3,4}B = \{1, 2, 3, 4\}, and C={,4,2,0,2,4,}C = \{\dots, -4, -2, 0, 2, 4, \dots\}.
    • Set Builder Form: The set is defined by specifying the property that all elements must satisfy. Examples include:
      • A={xx is an odd positive number less than 10}A = \{x \mid x \text{ is an odd positive number less than } 10\}
      • B={xxEnglish alphabet and x is a vowel}B = \{x \mid x \in \text{English alphabet and } x \text{ is a vowel}\}
      • C={xxZ and x(mod2)=0}C = \{x \mid x \in Z \text{ and } x \pmod 2 = 0 \}
  • Types of Sets:
    • Finite Set: A set SS is finite if it contains exactly nn elements, where nn is a non-negative integer. Example: A={1,2,3,4}A = \{1, 2, 3, 4\}.
    • Infinite Set: A set is infinite if the count of its elements never comes to an end. Example: The set of all natural numbers.
    • Null / Empty Set: A unique set containing no elements, denoted by ϕ\phi or \emptyset or \emptyset, with a cardinality of zero (ϕ=0|\phi| = 0).
    • Singleton Set: A set containing exactly one element.
    • Universal Set: A fixed set containing all objects under investigation, of which all other sets are subsets. In Venn diagrams, it is represented by a rectangle and denoted by UU.
  • Subsets:
    • If every element of set AA is also an element of set BB, then AA is a subset of BB, written as ABA \subseteq B. Formally: x(xAxB)\forall x(x \in A \rightarrow x \in B).
    • If ABA \subseteq B, then BB is called the superset of AA.
    • To show AA is not a subset of BB, one must find at least one element xAx \in A such that xBx \notin B.
    • Important Properties:
      • ϕA\phi \subseteq A: The empty set is a subset of every set.
      • AUA \subseteq U: Every set is a subset of the Universal set.
      • AAA \subseteq A: Every set is a subset of itself.
  • Proper Subset: If ABA \subseteq B and ABA \neq B, then AA is a proper subset of BB, denoted as ABA \subset B. This implies there is at least one element in BB not present in AA.
  • Equality of Sets: Sets AA and BB are equal (A=BA = B) if they contain exactly the same elements. This is true if ABA \subseteq B and BAB \subseteq A, or x(xAxB)\forall x(x \in A \leftrightarrow x \in B).
  • Power Set: The set of all subsets of a set AA is called the power set, denoted P(A)P(A) or 2A2^A. If A=n|A| = n, then the cardinality of the power set is P(A)=2n|P(A)| = 2^n. For example, if A={1,2,3}A = \{1, 2, 3\}, then P(A)={ϕ,{1},{2},{3},{1,2},{2,3},{1,3},{1,2,3}}P(A) = \{\phi, \{1\}, \{2\}, \{3\}, \{1, 2\}, \{2, 3\}, \{1, 3\}, \{1, 2, 3\}\}.

Operations on Sets

  • Complement of a Set: The set of all elements in the universal set UU that are not in set AA, denoted AcA^c. Formally: Ac={xxA and xU}A^c = \{x \mid x \notin A \text{ and } x \in U\}.
  • Union of Sets: The set containing all elements that belong to either set AA, set BB, or both. Denoted AB={xxA or xB}A \cup B = \{x \mid x \in A \text{ or } x \in B\}.
  • Intersection of Sets: The set containing all elements that belong to both set AA and set BB. Denoted AB={xxA and xB}A \cap B = \{x \mid x \in A \text{ and } x \in B\}.
  • Disjoint Sets: Two sets are disjoint if they have no common elements, meaning AB=ϕA \cap B = \phi.
  • Set Difference: The set of all elements that belong to set AA but do not belong to set BB. Denoted AB={xxA and xB}A - B = \{x \mid x \in A \text{ and } x \notin B\}.
  • Symmetric Difference: The set of elements that are in AA or in BB but not in both. Denoted ABA \oplus B. Equivalents include:
    • AB=(AB)(AB)A \oplus B = (A \cup B) - (A \cap B)
    • AB={x(xA and xB) or (xB and xA)}A \oplus B = \{x \mid (x \in A \text{ and } x \notin B) \text{ or } (x \in B \text{ and } x \notin A)\}
    • AB=(AB)(BA)A \oplus B = (A - B) \cup (B - A)

Mathematical Laws of Sets

  • Idempotent Laws:
    • AA=AA \cup A = A
    • AA=AA \cap A = A
  • Associative Laws:
    • (AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C)
    • (AB)C=A(BC)(A \cap B) \cap C = A \cap (B \cap C)
  • Commutative Laws:
    • AB=BAA \cup B = B \cup A
    • AB=BAA \cap B = B \cap A
  • Distributive Laws:
    • A(BC)=(AB)(AC)A \cup (B \cap C) = (A \cup B) \cap (A \cup C)
    • A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)
  • De Morgan's Laws:
    • (AB)c=AcBc(A \cup B)^c = A^c \cap B^c
    • (AB)c=AcBc(A \cap B)^c = A^c \cup B^c
  • Identity Laws:
    • Aϕ=AA \cup \phi = A
    • Aϕ=ϕA \cap \phi = \phi
    • AU=UA \cup U = U
    • AU=AA \cap U = A
  • Complement Laws:
    • AAc=UA \cup A^c = U
    • AAc=ϕA \cap A^c = \phi
    • Uc=ϕU^c = \phi
    • ϕc=U\phi^c = U
  • Involution Law:
    • (Ac)c=A(A^c)^c = A

Relations

  • Cartesian Product: The set of all ordered pairs (a,b)(a, b) where aAa \in A and bBb \in B. Denoted A×B={(a,b)aA and bB}A \times B = \{(a, b) \mid a \in A \text{ and } b \in B\}.
    • It is the maximum possible relation between two sets.
    • It is generally not commutative: A×BB×AA \times B \neq B \times A.
    • If A=m|A| = m and B=n|B| = n, then A×B=m×n|A \times B| = m \times n.
  • Definition of a Relation: A relation from set AA to set BB is any subset of the Cartesian product A×BA \times B.
    • Since a relation is a subset of A×BA \times B, the total number of possible relations is 2m×n2^{m \times n}.
  • Representation: Relations can be represented using a matrix where rows correspond to elements of AA and columns to elements of BB. A value of 11 indicates a pair is in the relation, and 00 indicates it is not.
  • Complement of a Relation (RR'): Let RR be a relation from AA to BB. The complement consists of all pairs in A×BA \times B not present in RR.
    • R={(a,b)(a,b)A×B,(a,b)R}R' = \{(a, b) \mid (a, b) \in A \times B, (a, b) \notin R\}
    • RR=A×BR \cup R' = A \times B
    • RR=ϕR \cap R' = \phi
  • Inverse of a Relation (R1R^{-1}): A relation from BB to AA formed by reversing the pairs in RR.
    • R1={(b,a)(a,b)R}R^{-1} = \{(b, a) \mid (a, b) \in R \}. The size remains the same: R=R1|R| = |R^{-1}|.
  • Diagonal Relation ($\Delta_A$): A relation containing all pairs (x,x)(x, x) for every xAx \in A. Denoted ΔA={(x,x)xA}\Delta_A = \{(x, x) \mid \forall x \in A \}.

Types of Relations on a Set

  • Reflexive Relation: A relation RR on set AA is reflexive if xA,(x,x)R\forall x \in A, (x, x) \in R.
  • Irreflexive Relation: A relation RR on set AA is irreflexive if xA,(x,x)R\forall x \in A, (x, x) \notin R.
  • Symmetric Relation: If a,bA,(a,b)R(b,a)R\forall a, b \in A, (a, b) \in R \rightarrow (b, a) \in R.
  • Anti-Symmetric Relation: If a,bA,(a,b)R and (b,a)Ra=b\forall a, b \in A, (a, b) \in R \text{ and } (b, a) \in R \rightarrow a = b. Symmetry is not allowed except for diagonal pairs (a=ba=b).
  • Asymmetric Relation: If a,bA,(a,b)R(b,a)R\forall a, b \in A, (a, b) \in R \rightarrow (b, a) \notin R. No symmetry is allowed, including diagonal pairs.
  • Transitive Relation: If a,b,cA,(a,b)R and (b,c)R(a,c)R\forall a, b, c \in A, (a, b) \in R \text{ and } (b, c) \in R \rightarrow (a, c) \in R.
  • Equivalence Relation: A relation that is simultaneously reflexive, symmetric, and transitive.
    • If R1R_1 and R2R_2 are equivalence relations, their intersection R1R2R_1 \cap R_2 is an equivalence relation, but their union R1R2R_1 \cup R_2 is not necessarily one.
  • Partial Order Relation: A relation that is reflexive, anti-symmetric, and transitive.
  • Poset (Partially Ordered Set): A set AA paired with a partial order relation RR, denoted [A,R][A, R]. Examples include [A,divides][A, \text{divides}], [A,][A, \le], and [P(S),][P(S), \subseteq].

Hasse Diagrams and Lattices

  • Hasse Diagram: A graphical representation of a partial order relation in its transitive reduction form.
    • Steps to create:
      1. Draw a vertex for each element.
      2. Draw an edge from aa to bb if (a,b)R(a, b) \in R.
      3. Remove all reflexive edges (loops) and transitive edges.
      4. Remove direction and arrange by increasing height.
  • Lattice: A Poset or Hasse diagram where every pair of elements has a unique supremum (least upper bound or Join) and infimum (greatest lower bound or Meet).
    • A Lattice is both a Join Semi-Lattice and a Meet Semi-Lattice.
    • Lattice Laws: Idempotent, Associative, Commutative, Distributive, De Morgan's, Identity, Complement, and Involution laws all apply to lattice operations \vee (Join) and \wedge (Meet).
  • Properties of Lattices:
    • Unbounded Lattice: Contains an infinite number of elements.
    • Bounded Lattice: Contains a finite number of elements, with a defined upper bound (UU) and lower bound (ϕ\phi).
    • Complement of an Element: Element aca^c is a complement of aa if aac=Upper bounda \vee a^c = \text{Upper bound} and aac=Lower bounda \wedge a^c = \text{Lower bound}.
    • Distributive Lattice: For every element, there exists at most one complement (zero or one).
    • Complemented Lattice: For every element, there exists at least one complement (one or more).
    • Boolean Algebra: A lattice that is both complemented and distributive, where every element has exactly one complement.

Functions

  • Definition: A function is a relation between sets AA and BB that associates every element of set AA to exactly one element of set BB. Written as f:ABf: A \rightarrow B.
  • Range of a Function: The set of all images of elements of AA, such that Range={yyB and (x,y)f}\text{Range} = \{ y \mid y \in B \text{ and } (x, y) \in f \}. Note that RangeB\text{Range} \subseteq B.
  • Total Number of Functions: If A=m|A| = m and B=n|B| = n, there are nmn^m possible functions.
  • Function Composition: Operation taking f:XYf: X \rightarrow Y and g:YZg: Y \rightarrow Z to produce h(x)=g(f(x))h(x) = g(f(x)). Denoted gfg \circ f. Composition is associative: f(gh)=(fg)hf \circ (g \circ h) = (f \circ g) \circ h.
  • Types of Functions:
    • One-to-One (Injective): Function where distinct elements of the domain map to distinct elements of the codomain. Possible if AB|A| \le |B|. Number of injective functions is P(n,m)P(n, m). If A=B=n|A| = |B| = n, there are n!n! functions.
    • Onto (Surjective): Function where every element in codomain BB is the image of at least one element in domain AA (Range=B\text{Range} = B). Possible if BA|B| \le |A|.
      • Formula for Number of Onto Functions: nm(n1)(n1)m+(n2)(n2)m(n3)(n3)m++(1)n1(nn1)1mn^m - \binom{n}{1}(n-1)^m + \binom{n}{2}(n-2)^m - \binom{n}{3}(n-3)^m + \dots + (-1)^{n-1}\binom{n}{n-1}1^m
    • Bijective: A function that is both injective and surjective. Possible only if A=B=n|A| = |B| = n. Total bijective functions: n!n!.
  • Inverse of a Function (f1f^{-1}): A function that reverses the original mapping. If f(x)=yf(x) = y, then f1(y)=xf^{-1}(y) = x. Only bijective functions have inverses.

Theory of Logics

  • Proposition: A declarative sentence that is either true (TT) or false (FF), but not both.
    • Determining Propositions:
      • "Delhi is the capital of USA": Proposition (FF).
      • "How are you doing?": Not a proposition.
      • 5115 \le 11: Proposition (TT).
      • X+y=zX + y = z: Not a proposition unless variables are defined.
  • Arguments: A set of premises (P1,P2,,PnP_1, P_2, \dots, P_n) yielding a conclusion (QQ). An argument is valid if whenever all premises are true, the conclusion must be true.
  • Logical Operators:
    • Negation ($\neg p$): "It is not the case that pp". Inverts truth value.
    • Conjunction (pqp \wedge q): True only if both pp and qq are true.
    • Disjunction (pqp \vee q): False only if both pp and qq are false.
    • Implication (pqp \rightarrow q): True except when pp is true and qq is false. pq¬pqp \rightarrow q \equiv \neg p \vee q.
    • Biconditional (pqp \leftrightarrow q): True only if pp and qq have the same truth value. pq(pq)(qp)p \leftrightarrow q \equiv (p \rightarrow q) \wedge (q \rightarrow p).
  • Derived Conditional Statements:
    • Implication: pqp \rightarrow q
    • Converse: qpq \rightarrow p
    • Inverse: ¬p¬q\neg p \rightarrow \neg q
    • Contrapositive: ¬q¬p\neg q \rightarrow \neg p (Logically equivalent to Implication).
  • Logical States:
    • Tautology: Always true regardless of variable truth values.
    • Contradiction: Always false regardless of variable truth values.
    • Contingency: Neither a tautology nor a contradiction.
    • Satisfiable: Has at least one true value in its truth table.
  • Functionally Complete Set: A set of connectives that can express any propositional function. Examples: {,¬}\{\wedge, \neg\} and {,¬}\{\vee, \neg\}.
  • Canonical Normal Forms:
    • Canonical SOP (PDNF): Sum of Product where each AND term contains all literals.
    • Canonical POS (PCNF): Product of Sum where each OR term contains all literals.

First Order Predicate Logic (FOPL)

  • Subject and Predicate: Logic used to extract more information than propositional logic. In "11 is a natural number", "11" is the subject and "natural number" is the predicate (NatNo(1)NatNo(1)).
  • Quantifiers:
    • Universal ($\forall x P(x)$): Assert that P(x)P(x) is true for all values of xx in the universe of discourse.
    • Existential ($\exists x P(x)$): Assert that P(x)P(x) is true for at least one value of xx in the universe of discourse.
  • Quantification Logic Examples:
    • "Every Indian likes cricket": x[Indian(x)Cricket(x)]\forall x [\text{Indian}(x) \rightarrow \text{Cricket}(x)]
    • "Some Indians like samosa": x[Indian(x)Samosa(x)]\exists x [\text{Indian}(x) \wedge \text{Samosa}(x)]
  • Negation of Quantifiers:
    • ¬[xP(x)]x[¬P(x)]\neg [\forall x P(x)] \equiv \exists x [\neg P(x)]
    • ¬[xP(x)]x[¬P(x)]\neg [\exists x P(x)] \equiv \forall x [\neg P(x)]
  • Rules of Inference:
    • Universal Specification: xP(x)P(c)\forall x P(x) \therefore P(c)
    • Universal Generalization: P(c) for all cxP(x)P(c) \text{ for all } c \therefore \forall x P(x)
    • Existential Specification: xP(x)P(c)\exists x P(x) \therefore P(c)
    • Existential Generalization: P(c)xP(x)P(c) \therefore \exists x P(x)
    • Universal Modus Ponens: x(P(x)Q(x)),P(c)Q(c)\forall x (P(x) \rightarrow Q(x)), P(c) \therefore Q(c)

Algebraic Structures

  • Binary Operation Properties:
    • Closure: For set AA and operation *, a,bA,abA\forall a, b \in A, a*b \in A.
    • Associativity: a,b,cA,(ab)c=a(bc)\forall a, b, c \in A, (a*b)*c = a*(b*c).
    • Identity: There exists eAe \in A such that aA,ae=ea=a\forall a \in A, a*e = e*a = a.
    • Inverse: For each aAa \in A, there exists a1Aa^{-1} \in A such that aa1=a1a=ea*a^{-1} = a^{-1}*a = e.
    • Commutativity: a,bA,ab=ba\forall a, b \in A, a*b = b*a.
  • Hierarchical Structures:
    • Algebraic Structure: Satisfies Closure.
    • Semi-Group: Satisfies Closure and Associativity.
    • Monoid: Satisfies Closure, Associativity, and Identity.
    • Group: Satisfies Closure, Associativity, Identity, and Inverse.
    • Abelian Group: A Group that also satisfies Commutativity.
  • Properties of Groups:
    • If the group order is even, there is at least one element that is its own inverse.
    • (ab)1=b1a1(a*b)^{-1} = b^{-1} * a^{-1}.
    • Cancellation law: ab=acb=ca*b = a*c \rightarrow b=c.
  • Finite Groups and Modulo Operators:
    • Addition Modulo (+m+_m): a+mb=(a+b)(modm)a +_m b = (a+b) \pmod m.
    • Multiplication Modulo (m*_m): amb=(a×b)(modm)a *_m b = (a \times b) \pmod m.
    • Examples: {0,1,2,,p1},+p\langle \{0, 1, 2, \dots, p-1\}, +_p \rangle is always a group. {1,2,,p1},p\langle \{1, 2, \dots, p-1\}, *_p \rangle is a group if pp is prime.
  • Subgroup: A subset of a group that is itself a group under the same operation.
    • Lagrange's Theorem: The order of a subgroup must exactly divide the order of the group (O(G)(modO(H))=0O(G) \pmod{O(H)} = 0).
  • Cyclic Group: A group containing at least one generator 'aa' such that every element can be expressed as an integral power of 'aa'.
    • Number of generators for a cyclic group of order nn is given by ϕ(n)=n×(p11)(p21)(pk1)p1p2pk\phi(n) = n \times \frac{(p_1-1)(p_2-1)\dots(p_k-1)}{p_1 p_2 \dots p_k}, where pkp_k are distinct prime factors of nn.
  • Cosets:
    • Left Coset: aH={ahhH}aH = \{ah \mid h \in H\}.
    • Right Coset: Ha={hahH}Ha = \{ha \mid h \in H\}.
  • Advanced Structures:
    • Ring: An algebraic system R,+,\langle R, +, \cdot \rangle where R,+\langle R, + \rangle is an abelian group, R,\langle R, \cdot \rangle is a semigroup, and \cdot distributes over ++.
    • Integral Domain: A commutative ring with unity and no zero divisors (ab=0a=0 or b=0a \cdot b = 0 \rightarrow a=0 \text{ or } b=0).
    • Field: A commutative ring where every non-zero element has a multiplicative inverse (R{0},\langle R \setminus \{0\}, \cdot \rangle is an abelian group).

Graph Theory

  • Basic Definitions:
    • Graph G(V, E): Consists of vertices (VV) and edges (EE).
    • Self-Loop: Edge (vi,vi)(v_i, v_i) connecting a vertex to itself.
    • Parallel Edges: Multiple edges between the same two vertices.
    • Adjacent Vertices: Vertices connected by the same edge.
    • Complete Graph (KnK_n): A simple graph with an edge between every pair of vertices. Total edges: n(n1)2\frac{n(n-1)}{2}.
  • Degree and Theorems:
    • Degree: Number of edges incident to a vertex.
    • Hand-shaking Theorem: deg(vi)=2E\sum \text{deg}(v_i) = 2|E|.
    • The number of vertices with odd degree in a graph must be even.
  • Memory Representations:
    • Adjacency Matrix: Symmetric V×VV \times V matrix for undirected graphs.
    • Incidence Matrix: V×EV \times E matrix where rows are vertices and columns are edges.
    • Adjacency List: An array of lists representing adjacent vertices for each node.
  • Popular Graphs:
    • Bipartite Graph: Vertices can be partitioned into two disjoint sets V1,V2V_1, V_2 such that all edges connect a vertex in V1V_1 to one in V2V_2.
    • Complete Bipartite Graph (Km,nK_{m,n}): Every vertex in V1V_1 is connected to every vertex in V2V_2.
    • Planar Graph: A graph that can be drawn on a plane without edges crossing.
      • Euler's Formula: r=ev+2r = e - v + 2 (for connected planar graphs, where rr is regions, ee edges, vv vertices).
      • Disconnected Euler Formula: ve+rk=1v - e + r - k = 1 (where kk is number of components).
    • Kuratowski's Non-Planar Graphs: K5K_5 and K3,3K_{3,3} are the simplest non-planar graphs.
  • Graph Coloring: Vertex coloring assigns colors such that no adjacent vertices share a color. The minimum colors required is the Chromatic Number (χ(G)\chi(G)).
  • Traversals:
    • Path: Open walk with no repeated vertices.
    • Connectivity: Minimum edges required for connectivity is n1n-1. Guaranteed for all graphs if edges exceed (n1)(n2)2\frac{(n-1)(n-2)}{2}.
    • Euler Graph: Connected graph with a closed walk containing all edges. Exists iff all vertices have even degree.
    • Hamiltonian Graph: Contains a circuit visiting every vertex exactly once.

Combinatorics

  • Permutation (P(n,r)P(n, r)): Arrangement of items where order matters. P(n,r)=n!(nr)!P(n, r) = \frac{n!}{(n-r)!}.
  • Combination (C(n,r)C(n, r)): Selection of items where order does not matter. C(n,r)=n!r!(nr)!C(n, r) = \frac{n!}{r!(n-r)!}.
  • Pigeonhole Principle: If nn items are put into mm containers and n>mn > m, then at least one container must contain more than one item (nm\lceil \frac{n}{m} \rceil elements).
  • Principle of Inclusion-Exclusion (PIE): Used to find the size of the union of sets.
    • ABC=A+B+CABBCAC+ABC|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |B \cap C| - |A \cap C| + |A \cap B \cap C|

Questions & Discussion

  • Proposition Validity Example:
    • "If the labor market is perfect then wages are equal. Wages are not equal. Therefore the labor market is not perfect." - This is a valid argument (Modus Tollens).
  • Logic Problem:
    1. "If it does not rain or if it is not foggy, then the sailing race will be held."
    2. "If the sailing race is held, then the trophy will be awarded."
    3. "The trophy was not awarded."
    • Conclusion: It must have rained. (Reasoning via contrapositive through the chain).
  • Pigeonhole Application: In a class of 3030 students, at least 30/12=3\lceil 30/12 \rceil = 3 students must share the same birthday month.
  • PIE Problem: Finding integers between 11 and 500500 divisible by 33 or 55 or 77:
    • A=500/3=166|A| = \lfloor 500/3 \rfloor = 166
    • B=500/5=100|B| = \lfloor 500/5 \rfloor = 100
    • C=500/7=71|C| = \lfloor 500/7 \rfloor = 71
    • AB=500/15=33|A \cap B| = \lfloor 500/15 \rfloor = 33
    • BC=500/35=14|B \cap C| = \lfloor 500/35 \rfloor = 14
    • AC=500/21=23|A \cap C| = \lfloor 500/21 \rfloor = 23
    • ABC=500/105=4|A \cap B \cap C| = \lfloor 500/105 \rfloor = 4
    • Result: 166+100+71331423+4=271166 + 100 + 71 - 33 - 14 - 23 + 4 = 271.