Discrete Mathematics
GATE CS180 min read
Discrete mathematics is about finite structures, precise statements, and counting. A reliable solution starts by choosing the right representation: truth values for logic, set notation for membership, diagrams or adjacency lists for graphs, and recurrences for repeated processes. Short proofs are useful when they explain why a rule can be trusted; long formal derivations are rarely needed for routine calculations.
Propositional logic and equivalences
Idea. A proposition has a truth value. Negation reverses it; conjunction is true only when both inputs are true; disjunction is inclusive unless stated otherwise. Implication is false only when is true and false, and is equivalent to . Equivalences apply to propositions, not to vague similarities.
Solved examples.
- Question. Evaluate when . Solution. (1) An implication is false only for a true antecedent and false consequent. (2) This assignment matches that case. Answer. False. Trap. “If p then q” does not assert that p is true.
- Question. Simplify . Solution. (1) De Morgan's law distributes negation and changes AND to OR. (2) Thus . Answer. . Shortcut. Negate each component and swap the connective.
- Question. Is equivalent to its converse ? Solution. (1) Test . (2) is false. (3) is true because its antecedent is false. Answer. No. Trap. The contrapositive , not the converse, is equivalent.
- Question. Simplify . Solution. (1) Replace implication with . (2) Obtain . (3) Distribute: . (4) First term is false. Answer. . Shortcut. Modus ponens appears algebraically as eliminating the impossible term.
- Question. Determine whether is a tautology. Solution. (1) Assume the two implications in the antecedent are true. (2) If p is false, is true. (3) If p is true, first implication gives q; second gives r. (4) In either case the consequent holds. Answer. Tautology. Trap. A chain of implications composes in the same direction.
Predicate logic and quantifiers
Idea. A predicate becomes a proposition after variables are assigned or quantified. For a domain , means every member satisfies P, while means at least one does. Negation swaps quantifiers: and .
Solved examples.
- Question. Over integers, negate “Every multiple of 4 is even.” Solution. (1) The statement is . (2) Negation changes universal to existential and negates the property. (3) The counterexample condition is multiple of 4 and not even. Answer. “There exists an integer divisible by 4 that is not even.” Trap. Negate the whole implication: is .
- Question. Over the real numbers, is true? Solution. (1) The equation simplifies to x=0. (2) x=0 works for every real y. (3) The required existential witness exists. Answer. True, with witness x=0. Shortcut. Find a candidate independent of the universally quantified variable.
- Question. Negate “Some student solved every problem.” Solution. (1) Write . (2) Negating the existential gives universal; negating the universal gives existential. (3) Negate S. Answer. “Every student failed to solve at least one problem,” formally . Trap. Quantifier order is important.
- Question. Over positive integers, evaluate . Solution. (1) Choose any positive integer n. (2) Set m=n+1. (3) This m is positive and greater than n. Answer. True. Shortcut. For , the choice of m may depend on n.
- Question. Compare and over integers. Solution. (1) The first permits a different y for each x; choose x+1. (2) It is true. (3) The second asks for one integer larger than every integer. (4) For any proposed y, x=y violates x<y. Answer. First true, second false. Trap. Swapping quantifiers changes meaning.
Sets, relations, and functions
Idea. A set is determined by its members. The power set contains all subsets and has size for finite A. A relation on A is a subset of . A function assigns each domain element exactly one codomain element; injective means distinct inputs have distinct outputs, and surjective means every codomain element is reached.
Solved examples.
- Question. If , list the size of and identify the empty set and A as members. Solution. (1) A set with 3 elements has subsets. (2) The empty set is a subset. (3) A is also a subset of itself. Answer. ; both and A belong. Trap. The empty set is one subset, not “no subset.”
- Question. For , let R contain when x divides y. List R. Solution. (1) 1 divides every member: (1,1),(1,2),(1,3). (2) 2 divides only 2 among these: (2,2). (3) 3 divides only 3: (3,3). Answer. . Trap. Divisibility here is restricted to pairs in A.
- Question. On integers define iff is even. Show the relation is an equivalence relation. Solution. (1) Reflexive: is even. (2) Symmetric: if x-y is even, its negative y-x is even. (3) Transitive: is even. Answer. R is reflexive, symmetric, and transitive. Useful proof. Closure of even integers under negation and addition gives the last two steps.
- Question. Is , , injective? Is it surjective? Solution. (1) with distinct inputs, so it is not injective. (2) No negative integer is a square, so negative codomain elements are missed. Answer. Neither. Trap. Domain and codomain are part of the function specification.
- Question. Let , . Find its inverse and state bijectivity. Solution. (1) Set y=3x-2 and solve x=(y+2)/3. (2) Every real y has exactly one preimage. Answer. ; g is bijective. Shortcut. A nonzero-slope affine map on the reals is one-to-one and onto.
Partial orders and lattices
Idea. A partial order is reflexive, antisymmetric, and transitive. Distinct elements may be incomparable. A lattice is a partially ordered set in which every pair has a greatest lower bound (meet) and least upper bound (join). In the subset order, meet is intersection and join is union.
Solved examples.
- Question. Is divisibility a partial order on positive integers? Solution. (1) Every n divides itself. (2) If a|b and b|a for positive integers, then a=b. (3) If a|b and b|c, then a|c. Answer. Yes. Trap. On all integers, divisibility is not antisymmetric because 1 divides -1 and vice versa.
- Question. In , find meet and join of and . Solution. (1) Greatest common subset is their intersection, . (2) Least containing subset is union, . Answer. Meet , join . Shortcut. Under subset order use and .
- Question. In divisors of 12 ordered by divisibility, find meet and join of 4 and 6. Solution. (1) Lower bounds are common divisors; the greatest under divisibility is gcd(4,6)=2. (2) Upper bounds among divisors of 12 are common multiples that divide 12; the least is lcm(4,6)=12. Answer. Meet 2; join 12. Trap. The ambient poset restricts allowed upper bounds.
- Question. In a set ordered by divisibility, are 4 and 9 comparable? Solution. (1) 4 does not divide 9. (2) 9 does not divide 4. Answer. No; they are incomparable. Trap. A partial order does not require every pair to compare.
- Question. A finite poset has a unique least element 0 and a unique greatest element 1. Does every pair necessarily have a meet and join? Solution. (1) Having global bottom and top supplies some lower and upper bounds. (2) It does not guarantee a greatest lower bound or least upper bound for each pair. (3) Two incomparable maximal common lower bounds can prevent a meet. Answer. No. Trap. A bounded poset need not be a lattice.
You have read the free 23% of this note
Sign in with Google to keep reading. It is free, takes one tap, and you also get:
- 22 practice questions from this note
- Every note in full, plus the PDF library
- Official past papers as timed tests, with explanations
- An AI tutor for doubts, in Hindi or English
- Your progress, mistakes and study plan saved on every device