BCS303 · Discrete Structures & Theory of Logic · Unit 2
Functions
Unit Scope & Exam Weightage: This unit combines classical functions with Boolean algebra: Definition, Classification of functions, Operations on functions, Growth of Functions, Boolean Algebra: Introduction, Axioms and Theorems of Boolean algebra, Algebraic manipulation of Boolean expressions, Simplification of Boolean Functions and Karnaugh maps. The corpus records 12 PYQ clusters worth about 64 marks; K-map minimisation alone contributes 28 marks, so a student who can group cells confidently has already secured the largest block.
Front Page: Importance-Wise Topic Roadmap (2023–26 PYQs)
| Priority | Topic (Exact Syllabus) | PYQs Asked | Marks Weightage | Tag |
|---|---|---|---|---|
| 1 | Karnaugh maps | 4 (2023-24 ×2, 2024-25, 2025-26) |
7m × 4 | Survival Mode Numerical |
| 2 | Classification of functions | 2 (2023-24, 2024-25) |
7m + 2m | Core Concept |
| 3 | Operations on functions | 2 (2023-24, 2024-25) |
7m + 2m | Composition |
| 4 | Definition | 1 (2025-26) |
2m | Core Concept |
| 5 | Axioms and Theorems of Boolean algebra | 1 (2025-26) |
7m | Theory |
| 6 | Simplification of Boolean Functions | 1 (2025-26) |
7m | Counting |
| 7 | Algebraic manipulation of Boolean expressions | 1 (2023-24) |
2m | Canonical Form |
| 8 | Boolean Algebra: Introduction | integrated in #5 | — | Supporting Concept |
| 9 | Growth of Functions | 0 direct | — | Predicted |
2-Hour Last-Night Survival Checklist:
- K-maps (#1): group only in powers of two (1,2,4,8), wrap edges/corners, and use don't-cares (X) only to enlarge groups. Write the group term beside each loop before writing the final expression.
- Three memorised results: with → ; → ; → .
- Fourth K-map (same PYQ): groups into four corners and the middle block , so (XNOR of ).
- Functions (#2/#3): linear is bijective on ; is neither injective nor onto ; , , .
- Boolean theory (#5/#6/#7): four laws (identity, complement, distributive, De Morgan); number of functions of variables ; canonical SOP of is .
1. Definition, Classification and Operations on Functions
Function: a relation in which every is paired with exactly one . is the domain, the codomain, and is the image of .
1.1 Classification
| Type | Test | Example |
|---|---|---|
| Injective (one-to-one) | on | |
| Surjective (onto) | every has some with | onto |
| Bijective | injective and surjective | on |
| Neither | fails one or both | on |
Horizontal-line test: if a horizontal line cuts the graph more than once → not injective; if some horizontal line misses the codomain → not surjective.
1.2 Domain and Range
For : domain and since , with no lower bound → range .
1.3 Operations and Composition
Given :
- sum/difference/product/quotient: , etc.;
- composition: — apply first, then .
Composition is associative: , but is generally not commutative ().
Examiner Tip: For "classify" questions always name the codomain. is onto but not onto ; writing "onto" without the set is incomplete. For composition, expand step by step: inner function → substitute → simplify.
After-Topic PYQ (
2025-26 Sec A Q1c— 2 Marks): Find the domain and range of the function .
After-Topic PYQ (
2024-25 Sec C Q4b— 7 Marks): Let and . Evaluate and Classify and as one-to-one, onto, or neither.
After-Topic PYQ (
2023-24 Sec A Q1c— 2 Marks): Investigate whether the function is injective or not for .
After-Topic PYQ (
2023-24 Sec C Q4b— 7 Marks): If are defined by , , , compute the composition functions: (i) (ii) (iii) .
After-Topic PYQ (
2024-25 Sec A Q1d— 2 Marks): Calculate the composite mapping if is given by and is given by .
2. Growth of Functions
Big-O notation (predicted topic): if there exist constants and such that for all . It gives an upper bound on growth rate.
| Notation | Meaning | Example |
|---|---|---|
| upper bound | ||
| lower bound | ||
| tight bound |
Hierarchy: .
Examiner Tip: Growth of Functions has no PYQ, so any question here is predicted. To prove , explicitly exhibit and — e.g. for , so .
3. Boolean Algebra: Introduction, Axioms and Theorems
Boolean algebra: a set with two binary operations (OR) and (AND) and a unary operation (NOT) satisfying the Huntington postulates — closure, identity, commutativity, distributivity, complement and at least two distinct elements.
3.1 Fundamental Laws
| Law | OR form | AND form |
|---|---|---|
| Identity | ||
| Null | ||
| Idempotent | ||
| Complement | ||
| Commutative | ||
| Associative | ||
| Distributive | ||
| Absorption | ||
| De Morgan |
3.2 Canonical Forms and Manipulation
- A minterm contains every variable once, complemented or not; for variables there are minterms .
- A canonical SOP is a sum of selected minterms, written .
- To expand a product term, AND it with for each missing variable .
Worked: . Then and . Hence .
The truth table has rows and each row's output may be 0 or 1, so there are distinct truth tables and therefore that many functions. Each canonical SOP corresponds to choosing a subset of the minterms.
Examiner Tip: The "four laws" question wants named equations, not prose. Write identity, complement, distributive and De Morgan with both OR and AND forms — eight equations fill a 7-mark answer.
After-Topic PYQ (
2025-26 Sec B Q2b— 7 Marks): Explain the basic concepts of Boolean algebra and state any four fundamental laws of Boolean algebra.
After-Topic PYQ (
2025-26 Sec C Q4b— 7 Marks): Show that the number of minimal Boolean functions in variables is .
After-Topic PYQ (
2023-24 Sec A Q1d— 2 Marks): Express into its complete sum‑of‑products form.
4. Karnaugh Maps and Simplification
Karnaugh map (K-map): a grid of cells arranged in Gray code order (adjacent cells differ in one variable) so that logically adjacent minterms are physically adjacent. Groups of adjacent 1s eliminate variables.
4.1 Grouping Rules
- Group sizes must be 1, 2, 4, 8, 16… — never 3 or 6.
- Wrap-around is allowed: first and last columns/rows are adjacent; the four corners form a group of 4.
- A cell may be reused in several groups; cover every 1 with the fewest, largest groups.
- Don't-care entries X may be included only to enlarge a group; they need not be covered themselves.
- The term for a group keeps only the variables that do not change across the group.
4.2 Worked — Three-Variable Map With Don't Cares
, . Columns ; rows .
BC: 00 01 11 10
A=0 [ X 1 0 1 ] m0 X, m1 1, m3 0, m2 1
A=1 [ X 1 1 X ] m4 X, m5 1, m7 1, m6 X
- Group the whole row (m4,m5,m7,m6) using X's → term .
- Group m0(X) with m1 → (A fixed 0, B fixed 0, C changes).
- Group m2 with m6(X) → (B fixed 1, C fixed 0, A changes).
(Equivalent minimal form: ; both cover the four 1s and no off-minterm.)
4.3 Worked — Four-Variable Expression
. Rows ; columns .
xy \ zt: 00 01 11 10
00 1 1 1 1
01 0 0 0 1
11 0 0 0 1
10 1 1 0 1
- Row is all 1s → .
- Rows 00 and 10, columns 00 and 01 → (covers m8,m9).
- Column in all four rows → (covers m6,m14 and m2,m10).
Check: m3 is covered by ; m14 by ; m8,m9 by .
4.4 Worked — Two 4-Variable Functions From the Repeated PYQ
(i) :
AB \ CD: 00 01 11 10
00 1 1 0 1
01 1 1 0 1
11 1 1 0 1
10 1 1 0 0
- Columns 00 and 01 in all rows → octet .
- Rows 00 and 01, columns 00 and 10 → .
- Rows 01 and 11, columns 00 and 10 → .
(ii) :
AB \ CD: 00 01 11 10
00 1 0 0 1
01 0 1 1 0
11 0 1 1 0
10 1 0 0 1
- Four corners (rows 00,10; columns 00,10) → .
- Central block (rows 01,11; columns 01,11) → .
This is the XNOR of and : the value is 1 whenever .
Examiner Tip: In every K-map question draw the labelled grid, list each group with its term, then write the final SOP. If don't-cares are given, state explicitly which ones you used and which you left uncovered — examiners check this.
After-Topic PYQ (
2023-24, 2024-25 Sec C Q4a— 7 Marks): Solve the following Boolean function using K-map: and using SOP.
After-Topic PYQ (
2025-26 Sec C Q4a— 7 Marks): Use a Karnaugh map to find a minimal sum for .
After-Topic PYQ (
2024-25 Sec C Q4a— 7 Marks): Solve the following Boolean functions using K-map: (i) (ii)
After-Topic PYQ (
2023-24 Sec B Q2b— 7 Marks): Solve the following Boolean functions using K‑map: (i) (ii) .
Solved Exam-Ready Questions
Solved Q1 (2023-24, 2024-25 Sec C Q4a — 7 Marks | Survival Mode)
Q: Solve the following Boolean function using K-map: and using SOP.
Solution:
- Place 1s at m1, m2, m5, m7 and X at m0, m4, m6; m3 is 0.
- Group m4(X), m5, m7, m6(X) as the entire row → term .
- Group m0(X) with m1 → (B fixed at 0).
- Group m2 with m6(X) → (C fixed at 0).
- Check: m1 is covered by , m2 by , m5 and m7 by ; m3 is covered by none.
- Minimal SOP: . (Equivalent: .)
- Conclusion: three 2-literal product terms; the don't-cares m0, m4 and m6 allowed the largest possible groups.
Solved Q2 (2025-26 Sec C Q4a — 7 Marks)
Q: Use a Karnaugh map to find a minimal sum for .
Solution:
- Expand the terms: → m0,m2,m8,m10; → m1,m9; → m3; → m6,m14.
- Fill the map (rows , columns ) as shown in Section 4.3.
- Group row (m0,m1,m3,m2) → ; this is the only group containing m3, so it is essential.
- Group rows 00 and 10, columns 00 and 01 (m0,m1,m8,m9) → ; covers m8,m9.
- Group the entire column (m2,m6,m14,m10) → ; essential for m6 and m14.
- All nine 1s are covered with three prime implicants.
- Result: .
Solved Q3 (2024-25 Sec C Q4a — 7 Marks)
Q: Solve the following Boolean functions using K-map: (i) (ii)
Solution:
- Part (i): plot the 11 minterms; columns and rows .
- Group columns 00 and 01 across all four rows (8 cells) → . This covers m0,m1,m4,m5,m8,m9,m12,m13.
- Group rows 00,01 with columns 00,10 → (covers m2,m6); group rows 01,11 with columns 00,10 → (covers m6,m14).
- Part (i) result: .
- Part (ii): plot m0,m2,m5,m7,m8,m10,m13,m15.
- The four corners form one group (rows , columns ) → ; the central block (rows 01,11, columns 01,11) → .
- Part (ii) result: — the XNOR of and . Conclusion: both functions reduce to three or two product terms.
Solved Q4 (2023-24 Sec B Q2b — 7 Marks)
Q: Solve the following Boolean functions using K‑map: (i) (ii) .
Solution: The minterm sets are identical to the previous question (only the wording and non-breaking hyphen differ). For (i) the octet plus pairs and give ; essential groups: for m1, for m2, for m14. For (ii) the corner group gives and the central quartet gives , so . In both parts the K-map grids of Section 4.4 should be drawn and each group labelled with its term.
Solved Q5 (2024-25 Sec C Q4b — 7 Marks)
Q: Let and . Evaluate and Classify and as one-to-one, onto, or neither.
Solution:
- .
- injective: . ✓
- surjective onto : given any , choose ; then . ✓ Hence is bijective.
- not injective: ; although .
- not onto : , so negative outputs such as are never produced; range is .
- If the codomain were changed to , would be onto but still not one-to-one.
- Conclusion: is one-to-one and onto; is neither (for the stated codomain ).
Solved Q6 (2023-24 Sec C Q4b — 7 Marks)
Q: If are defined by , , , compute the composition functions: (i) (ii) (iii) .
Solution:
- Rule: ; evaluate the innermost function first.
- (iii) , valid for .
- (ii) .
- (i) , so .
- Expand: .
- Equivalent single fraction: ; domain .
- Conclusion: composition is applied right-to-left; the three answers are , and .
Solved Q7 (2025-26 Sec A Q1c — 2 Marks)
Q: Find the domain and range of the function .
Solution: is defined for all real , so the domain is . Since , , and as the value tends to . Therefore the range is .
Solved Q8 (2024-25 Sec A Q1d — 2 Marks)
Q: Calculate the composite mapping if is given by and is given by .
Solution: . The domain is and the range is contained in (in fact all of is attained as ranges over ).
Solved Q9 (2023-24 Sec A Q1c — 2 Marks)
Q: Investigate whether the function is injective or not for .
Solution: Not injective: and , but . A horizontal line at cuts the parabola twice. Restricting the domain to would make it injective.
Solved Q10 (2025-26 Sec B Q2b — 7 Marks)
Q: Explain the basic concepts of Boolean algebra and state any four fundamental laws of Boolean algebra.
Solution:
- Concept: Boolean algebra is a set with OR (), AND () and complement () satisfying closure, identity, commutativity, distributivity and complementation; its elements are usually 0 and 1.
- Identity: and .
- Complement: and .
- Distributive: and .
- De Morgan: and .
- Use: these laws simplify switching circuits and prove equivalence of expressions without truth tables.
- Conclusion: the laws mirror set operations (union/intersection/complement) and form the algebraic basis for K-map simplification.
Solved Q11 (2025-26 Sec C Q4b — 7 Marks)
Q: Show that the number of minimal Boolean functions in variables is .
Solution:
- A Boolean function of variables is fully determined by its truth table.
- The truth table contains rows (one for each assignment of the variables).
- Each row's output may independently be 0 or 1.
- Therefore the number of distinct truth tables — and hence distinct Boolean functions — is ( times) .
- Equivalently, there are minterms ; choosing any subset of them as the SOP gives one function, so there are canonical SOPs.
- Every function has at least one minimal SOP obtained by K-map grouping, so the number of distinct (minimal-representable) functions is the same count.
- Conclusion: — e.g. for there are Boolean functions.
Solved Q12 (2023-24 Sec A Q1d — 2 Marks)
Q: Express into its complete sum‑of‑products form.
Solution: Expand each product to include the missing variable: ; . Hence (variables ordered ).
Practice Questions (Self-Test)
- (2 Marks) Define injective and surjective functions with one example each.
- (7 Marks) Find and for , ; are they equal?
- (7 Marks) Prove by finding constants .
- (7 Marks) State and prove De Morgan's laws for three variables using a truth table.
- (7 Marks) Convert into canonical SOP and canonical POS.
- (7 Marks) Minimise using a K-map.
- (7 Marks) Minimise with don't-cares .
- (7 Marks) Explain why group sizes in a K-map must be powers of two.
- (2 Marks) How many Boolean functions of four variables exist?
- (7 Marks) Determine whether is injective on ; justify with a counterexample or derivative argument.