Discrete MathematicsDiscrete Mathematics
Logic, sets, counting, recurrences, graphs, and number theory — the math language of computer science.Logic, sets, counting, recurrences, graphs আর number theory — computer science-এর math ভাষা।
1. Propositional Logic1. Propositional Logic
A proposition is a statement that is either true (T) or false (F). It cannot be both.
- "5 is a prime number." — This is a proposition. It is true.
- "2 + 2 = 5." — This is a proposition. It is false.
- "What time is it?" — Not a proposition. A question has no truth value.
- "x + 1 = 3" — Not a proposition by itself. It depends on x.
We use small letters like \( p, q, r \) to name propositions.
Proposition হলো এমন একটি statement যা হয় true (T) না হয় false (F)। দুটো একসাথে হতে পারে না।
- "5 একটি prime number।" — এটি একটি proposition। এটি true।
- "2 + 2 = 5।" — এটি একটি proposition। এটি false।
- "এখন কয়টা বাজে?" — এটি proposition না। প্রশ্নের কোনো truth value নেই।
- "x + 1 = 3" — এটি নিজে proposition না। এটা x-এর উপর নির্ভর করে।
Proposition-এর নাম দিতে আমরা ছোট হাতের letter ব্যবহার করি, যেমন \( p, q, r \)।
Logical connectivesLogical connectives
We join propositions with connectives. These are the main ones:
Connective দিয়ে আমরা proposition জোড়া লাগাই। প্রধান connective গুলো হলো:
| Nameনাম | Symbol | Meaningঅর্থ | True when...কখন true... |
|---|---|---|---|
| Negation (NOT) | \( \neg p \) | not pp না | p is falsep false হলে |
| Conjunction (AND) | \( p \land q \) | p and qp এবং q | both are trueদুটোই true হলে |
| Disjunction (OR) | \( p \lor q \) | p or q (or both)p অথবা q (বা দুটোই) | at least one is trueঅন্তত একটি true হলে |
| Exclusive OR (XOR) | \( p \oplus q \) | exactly one of themঠিক একটি true | they are differentদুটো ভিন্ন হলে |
| Implication | \( p \rightarrow q \) | if p then qযদি p হয় তবে q | always, except when p is T and q is Fসবসময়, শুধু p true আর q false হলে ছাড়া |
| Biconditional | \( p \leftrightarrow q \) | p if and only if qp if and only if q | both have the same valueদুটোর value একই হলে |
Truth tablesTruth tables
A truth table lists every possible combination of truth values. With 2 variables there are \( 2^2 = 4 \) rows. With \( n \) variables, \( 2^n \) rows.
Truth table-এ truth value-এর সব possible combination থাকে। 2টি variable হলে \( 2^2 = 4 \) টি row। \( n \) টি variable হলে \( 2^n \) টি row।
| \( p \) | \( q \) | \( \neg p \) | \( p \land q \) | \( p \lor q \) | \( p \oplus q \) | \( p \rightarrow q \) | \( p \leftrightarrow q \) |
|---|---|---|---|---|---|---|---|
| T | T | F | T | T | F | T | T |
| T | F | F | F | T | T | F | F |
| F | T | T | F | T | T | T | F |
| F | F | T | F | F | F | T | T |
Tautology, contradiction, contingencyTautology, contradiction, contingency
- Tautology: always true. Example: \( p \lor \neg p \).
- Contradiction: always false. Example: \( p \land \neg p \).
- Contingency: sometimes true, sometimes false. Example: \( p \rightarrow q \).
- Tautology: সবসময় true। উদাহরণ: \( p \lor \neg p \)।
- Contradiction: সবসময় false। উদাহরণ: \( p \land \neg p \)।
- Contingency: কখনো true, কখনো false। উদাহরণ: \( p \rightarrow q \)।
| \( p \) | \( q \) | \( p \rightarrow q \) | \( p \land (p \rightarrow q) \) | whole formula |
|---|---|---|---|---|
| T | T | T | T | T |
| T | F | F | F | T |
| F | T | T | F | T |
| F | F | T | F | T |
| \( p \) | \( q \) | \( p \rightarrow q \) | \( p \land (p \rightarrow q) \) | পুরো formula |
|---|---|---|---|---|
| T | T | T | T | T |
| T | F | F | F | T |
| F | T | T | F | T |
| F | F | T | F | T |
Logical equivalence and De Morgan's lawsLogical equivalence এবং De Morgan's laws
Two formulas are logically equivalent (written \( \equiv \)) if they have the same truth table. The most important laws:
দুটি formula logically equivalent (লেখা হয় \( \equiv \)) যদি তাদের truth table একই হয়। সবচেয়ে গুরুত্বপূর্ণ law গুলো:
| LawLaw | EquivalenceEquivalence |
|---|---|
| De Morgan's law 1 | \( \neg(p \land q) \equiv \neg p \lor \neg q \) |
| De Morgan's law 2 | \( \neg(p \lor q) \equiv \neg p \land \neg q \) |
| Double negation | \( \neg(\neg p) \equiv p \) |
| Implication as OR | \( p \rightarrow q \equiv \neg p \lor q \) |
| Contrapositive law | \( p \rightarrow q \equiv \neg q \rightarrow \neg p \) |
| Distributive | \( p \land (q \lor r) \equiv (p \land q) \lor (p \land r) \) |
| Absorption | \( p \lor (p \land q) \equiv p \) |
Step 1: replace the implication: \( p \rightarrow q \equiv \neg p \lor q \).
Step 2: negate it: \( \neg(\neg p \lor q) \).
Step 3: apply De Morgan: \( \neg(\neg p) \land \neg q \).
Step 4: double negation: \( p \land \neg q \). Done.
In words: "if p then q" is false exactly when p happens but q does not.
Step 1: implication বদলাও: \( p \rightarrow q \equiv \neg p \lor q \)।
Step 2: negate করো: \( \neg(\neg p \lor q) \)।
Step 3: De Morgan apply করো: \( \neg(\neg p) \land \neg q \)।
Step 4: double negation: \( p \land \neg q \)। শেষ।
সহজ কথায়: "যদি p তবে q" তখনই false যখন p ঘটে কিন্তু q ঘটে না।
Converse, inverse, contrapositiveConverse, inverse, contrapositive
Start with the implication \( p \rightarrow q \):
- Converse: \( q \rightarrow p \) — swap the two sides.
- Inverse: \( \neg p \rightarrow \neg q \) — negate both sides.
- Contrapositive: \( \neg q \rightarrow \neg p \) — swap AND negate.
Key fact: only the contrapositive is equivalent to the original. The converse and inverse are equivalent to each other, but NOT to the original.
Implication \( p \rightarrow q \) থেকে শুরু করি:
- Converse: \( q \rightarrow p \) — দুই পাশ অদল-বদল।
- Inverse: \( \neg p \rightarrow \neg q \) — দুই পাশ negate।
- Contrapositive: \( \neg q \rightarrow \neg p \) — অদল-বদল এবং negate দুটোই।
মূল কথা: শুধু contrapositive মূল statement-এর equivalent। Converse আর inverse একে অপরের equivalent, কিন্তু মূলটার সাথে NOT equivalent।
Converse: "If the road is wet, it rains." (Not always true — maybe someone washed the road.)
Inverse: "If it does not rain, the road is not wet." (Same problem.)
Contrapositive: "If the road is not wet, it did not rain." (Always matches the original.)
Converse: "যদি রাস্তা ভেজা থাকে, তাহলে বৃষ্টি হয়েছে।" (সবসময় true না — কেউ হয়তো রাস্তা ধুয়েছে।)
Inverse: "যদি বৃষ্টি না হয়, রাস্তা ভেজা না।" (একই সমস্যা।)
Contrapositive: "যদি রাস্তা ভেজা না থাকে, বৃষ্টি হয়নি।" (মূল statement-এর সাথে সবসময় মেলে।)
Quantifiers: ∀ and ∃Quantifiers: ∀ এবং ∃
- \( \forall x \, P(x) \) — "for all x, P(x) is true" (universal quantifier).
- \( \exists x \, P(x) \) — "there exists at least one x for which P(x) is true" (existential quantifier).
Example: over integers, \( \forall x \, (x^2 \ge 0) \) is true. \( \exists x \, (x^2 = 2) \) is false over integers (no integer squared gives 2).
Negating quantified statements — the negation flips the quantifier and moves inside:
- \( \forall x \, P(x) \) — "সব x-এর জন্য P(x) true" (universal quantifier)।
- \( \exists x \, P(x) \) — "অন্তত একটি x আছে যার জন্য P(x) true" (existential quantifier)।
উদাহরণ: integer-এর উপর \( \forall x \, (x^2 \ge 0) \) true। কিন্তু \( \exists x \, (x^2 = 2) \) integer-এর উপর false (কোনো integer-এর square 2 হয় না)।
Quantified statement-এর negation — negation করলে quantifier উল্টে যায় আর negation ভিতরে ঢোকে:
Negation: "There exists at least one student who did NOT pass." \( \exists x \, \neg\text{Passed}(x) \)
Wrong answer (common mistake): "All students failed." That is too strong. One failing student is enough to break "all passed".
Negation: "অন্তত একজন student আছে যে pass করেনি।" \( \exists x \, \neg\text{Passed}(x) \)
ভুল উত্তর (common mistake): "সব student fail করেছে।" এটা অতিরিক্ত strong। "সবাই pass" ভাঙতে একজন fail করলেই যথেষ্ট।
Knights and Knaves — Liar/Truth-teller Riddles (Real Exam!)Knights and Knaves — Liar/Truth-teller Riddles (Real Exam!)
In these riddles, every person is one of two types: a knight (always tells the truth) or a knave (always lies). Your job: find who is who, or get correct information out of them.
The famous two-roads trick: You reach a fork. One road leads to the village, the other to danger. Two people stand there: one always truthful, one always a liar — but you do not know who is who. You may ask only ONE question to ONE of them.
Magic question: "If I asked the other person which road leads to the village, what would they say?" Then take the opposite road.
Why it works — both people give the same (wrong) answer:
- You asked the truth-teller: he truthfully reports the liar's lie → you hear the wrong road.
- You asked the liar: he lies about the truth-teller's true answer → you hear the wrong road.
One truth passed through one lie is always a lie. So the answer you hear is guaranteed wrong — just flip it. The same trick works with one person of unknown type: ask "If I asked YOU whether the left road leads to the village, what would you say?" A lie about a lie becomes the truth, so this answer is always correct.
এই riddle-গুলোতে প্রতিটি মানুষ দুই type-এর একটি: knight (সবসময় সত্যি বলে) অথবা knave (সবসময় মিথ্যা বলে)। তোমার কাজ: কে কী তা বের করা, অথবা তাদের কাছ থেকে সঠিক তথ্য আদায় করা।
বিখ্যাত two-roads trick: তুমি একটি মোড়ে পৌঁছালে। একটি রাস্তা village-এ যায়, অন্যটি বিপদে। সেখানে দুইজন মানুষ: একজন সবসময় সত্যবাদী, একজন সবসময় liar — কিন্তু কে কোনটা তুমি জানো না। তুমি শুধু একজনকে একটি প্রশ্ন করতে পারবে।
Magic question: "আমি যদি অন্যজনকে জিজ্ঞেস করতাম কোন রাস্তা village-এ যায়, সে কী বলত?" তারপর উল্টো রাস্তা নাও।
কেন কাজ করে — দুজনই একই (ভুল) উত্তর দেয়:
- সত্যবাদীকে জিজ্ঞেস করলে: সে liar-এর মিথ্যাটা সত্যি করে জানায় → তুমি ভুল রাস্তা শুনবে।
- Liar-কে জিজ্ঞেস করলে: সে সত্যবাদীর সত্যি উত্তর নিয়ে মিথ্যা বলে → তুমি ভুল রাস্তা শুনবে।
একটি সত্যি একটি মিথ্যার ভিতর দিয়ে গেলে ফলাফল সবসময় মিথ্যা। তাই যে উত্তর শুনবে সেটা নিশ্চিত ভুল — শুধু উল্টে নাও। অজানা type-এর একজন মানুষ থাকলেও একই trick: জিজ্ঞেস করো "আমি যদি তোমাকেই জিজ্ঞেস করতাম বাম রাস্তা village-এ যায় কি না, তুমি কী বলতে?" মিথ্যার উপর মিথ্যা হয়ে যায় সত্যি, তাই এই উত্তর সবসময় সঠিক।
Check every case, truth-table style:
| A | B | A's statement "both knaves" | Consistent? |
|---|---|---|---|
| knight | knight | false | ✗ a knight cannot say a false thing |
| knight | knave | false | ✗ same problem |
| knave | knight | false | ✓ a knave says a false thing — OK |
| knave | knave | true | ✗ a knave cannot say a true thing |
Shortcut logic: if A were truthful, his own statement would make him a liar — contradiction. So A lies. Then "we are both knaves" is false, so at least one of them is truthful — it is not A, so it must be B.
Truth table-এর মতো প্রতিটি case check করি:
| A | B | A-এর statement "both knaves" | Consistent? |
|---|---|---|---|
| knight | knight | false | ✗ knight মিথ্যা বলতে পারে না |
| knight | knave | false | ✗ একই সমস্যা |
| knave | knight | false | ✓ knave মিথ্যা বলে — ঠিক আছে |
| knave | knave | true | ✗ knave সত্যি বলতে পারে না |
Shortcut logic: A সত্যবাদী হলে তার নিজের statement-ই তাকে liar বানায় — contradiction। তাই A মিথ্যা বলে। তাহলে "আমরা দুজনেই knave" false, অর্থাৎ অন্তত একজন সত্যবাদী — সেটা A না, তাই অবশ্যই B।
Strong Induction — the Stamp Problem (Real Exam!)Strong Induction — the Stamp Problem (Real Exam!)
Mathematical induction proves a statement \( P(n) \) for all \( n \) from some start: first prove the base case, then the inductive step — "if it holds before \( n \), it holds at \( n \)". In strong induction, the step may assume \( P(k) \) for ALL earlier values \( k \) (start \( \le k < n \)), not just for \( n-1 \). Stamp (postage) problems are the classic use.
Problem: Prove that every postage amount \( n \ge 56 \) cents can be formed using only 8-cent and 9-cent stamps.
Base cases — we need one full block of 8 numbers, from 56 to 63:
- \( 56 = 7 \times 8 \), \( 57 = 6 \times 8 + 9 \), \( 58 = 5 \times 8 + 2 \times 9 \), \( 59 = 4 \times 8 + 3 \times 9 \)
- \( 60 = 3 \times 8 + 4 \times 9 \), \( 61 = 2 \times 8 + 5 \times 9 \), \( 62 = 8 + 6 \times 9 \), \( 63 = 7 \times 9 \)
Inductive step: take any \( n \ge 64 \). Then \( n - 8 \ge 56 \), so by the strong induction hypothesis \( n - 8 \) can already be formed. Add one more 8-cent stamp to that formation — now we have \( n \). Done: the statement holds for every \( n \ge 56 \).
Mathematical induction দিয়ে কোনো statement \( P(n) \) একটি start থেকে সব \( n \)-এর জন্য প্রমাণ করা হয়: আগে base case, তারপর inductive step — "\( n \)-এর আগে সত্যি হলে \( n \)-এও সত্যি"। Strong induction-এ step-এর সময় শুধু \( n-1 \) না, আগের সব \( k \)-এর (start \( \le k < n \)) জন্য \( P(k) \) ধরে নেওয়া যায়। Stamp (postage) problem হলো এর classic ব্যবহার।
Problem: প্রমাণ করো, প্রতিটি postage amount \( n \ge 56 \) cent শুধু 8-cent আর 9-cent stamp দিয়ে বানানো যায়।
Base case — 8টি সংখ্যার একটি পুরো block লাগবে, 56 থেকে 63:
- \( 56 = 7 \times 8 \), \( 57 = 6 \times 8 + 9 \), \( 58 = 5 \times 8 + 2 \times 9 \), \( 59 = 4 \times 8 + 3 \times 9 \)
- \( 60 = 3 \times 8 + 4 \times 9 \), \( 61 = 2 \times 8 + 5 \times 9 \), \( 62 = 8 + 6 \times 9 \), \( 63 = 7 \times 9 \)
Inductive step: যেকোনো \( n \ge 64 \) নাও। তাহলে \( n - 8 \ge 56 \), তাই strong induction hypothesis অনুযায়ী \( n - 8 \) আগেই বানানো যায়। সেই বানানোর সাথে আরেকটি 8-cent stamp যোগ করো — \( n \) পাওয়া গেল। শেষ: প্রতিটি \( n \ge 56 \)-এর জন্য statement সত্যি।
2. Sets2. Sets
A set is a collection of distinct objects, called elements. Order does not matter, and repeats do not count. We write \( A = \{1, 2, 3\} \), and \( 2 \in A \) means "2 is an element of A".
- Cardinality \( |A| \): the number of elements. \( |\{1,2,3\}| = 3 \).
- Subset \( A \subseteq B \): every element of A is also in B.
- Empty set \( \emptyset \): the set with no elements. \( |\emptyset| = 0 \). It is a subset of every set.
- Universal set \( U \): the set of everything under discussion.
Set হলো আলাদা আলাদা object-এর একটি collection, object গুলোকে বলে element। Order কোনো ব্যাপার না, আর repeat গণনা হয় না। আমরা লিখি \( A = \{1, 2, 3\} \), আর \( 2 \in A \) মানে "2 হলো A-এর element"।
- Cardinality \( |A| \): element সংখ্যা। \( |\{1,2,3\}| = 3 \)।
- Subset \( A \subseteq B \): A-এর প্রতিটি element B-তেও আছে।
- Empty set \( \emptyset \): কোনো element নেই। \( |\emptyset| = 0 \)। এটি সব set-এর subset।
- Universal set \( U \): আলোচনার সব কিছুর set।
Set operationsSet operations
| Operation | Symbol | Meaningঅর্থ | Example with A={1,2,3}, B={3,4}উদাহরণ: A={1,2,3}, B={3,4} |
|---|---|---|---|
| Union | \( A \cup B \) | in A or B (or both)A বা B (বা দুটোতেই) | \( \{1,2,3,4\} \) |
| Intersection | \( A \cap B \) | in both A and BA এবং B দুটোতেই | \( \{3\} \) |
| Difference | \( A - B \) | in A but not in BA-তে আছে কিন্তু B-তে নেই | \( \{1,2\} \) |
| Complement | \( \overline{A} \) | everything in U not in AU-এর যা A-তে নেই | depends on UU-এর উপর নির্ভর করে |
| Symmetric difference | \( A \oplus B \) | in exactly one of themঠিক একটিতে আছে | \( \{1,2,4\} \) |
De Morgan's laws work for sets too: \( \overline{A \cup B} = \overline{A} \cap \overline{B} \) and \( \overline{A \cap B} = \overline{A} \cup \overline{B} \). This is the same idea as in logic — union acts like OR, intersection acts like AND.
De Morgan's law set-এর জন্যও কাজ করে: \( \overline{A \cup B} = \overline{A} \cap \overline{B} \) এবং \( \overline{A \cap B} = \overline{A} \cup \overline{B} \)। Logic-এর মতোই — union হলো OR-এর মতো, intersection হলো AND-এর মতো।
Power setPower set
The power set \( P(S) \) is the set of ALL subsets of S, including \( \emptyset \) and S itself.
Power set \( P(S) \) হলো S-এর সব subset-এর set, যার মধ্যে \( \emptyset \) এবং S নিজেও আছে।
Cartesian productCartesian product
\( A \times B \) is the set of all ordered pairs \( (a, b) \) where \( a \in A \) and \( b \in B \). Order matters here: \( (1,2) \ne (2,1) \).
\( A \times B \) হলো সব ordered pair \( (a, b) \)-এর set যেখানে \( a \in A \) এবং \( b \in B \)। এখানে order গুরুত্বপূর্ণ: \( (1,2) \ne (2,1) \)।
Inclusion-exclusion principleInclusion-exclusion principle
If we just add \( |A| + |B| \), the elements in both sets get counted twice. So we subtract the overlap once:
শুধু \( |A| + |B| \) যোগ করলে, দুই set-এই থাকা element গুলো দুইবার গোনা হয়। তাই overlap একবার বিয়োগ করি:
\( |M \cup P| = 30 + 25 - 12 = 43 \).
Bonus: students who like neither = \( 50 - 43 = 7 \).
\( |M \cup P| = 30 + 25 - 12 = 43 \)।
Bonus: কোনোটাই পছন্দ করে না = \( 50 - 43 = 7 \) জন।
\( |A_2| = \lfloor 100/2 \rfloor = 50 \), \( |A_3| = \lfloor 100/3 \rfloor = 33 \), \( |A_5| = \lfloor 100/5 \rfloor = 20 \).
Pairs: divisible by 6: \( \lfloor 100/6 \rfloor = 16 \); by 10: \( \lfloor 100/10 \rfloor = 10 \); by 15: \( \lfloor 100/15 \rfloor = 6 \).
All three (by 30): \( \lfloor 100/30 \rfloor = 3 \).
Answer: \( 50 + 33 + 20 - 16 - 10 - 6 + 3 = 74 \).
\( |A_2| = \lfloor 100/2 \rfloor = 50 \), \( |A_3| = \lfloor 100/3 \rfloor = 33 \), \( |A_5| = \lfloor 100/5 \rfloor = 20 \)।
Pair গুলো: 6 দিয়ে divisible: \( \lfloor 100/6 \rfloor = 16 \); 10 দিয়ে: \( \lfloor 100/10 \rfloor = 10 \); 15 দিয়ে: \( \lfloor 100/15 \rfloor = 6 \)।
তিনটি দিয়েই (30 দিয়ে): \( \lfloor 100/30 \rfloor = 3 \)।
উত্তর: \( 50 + 33 + 20 - 16 - 10 - 6 + 3 = 74 \)।
Trick: first count the opposite (divisible by at least one), then subtract from 100.
Singles: \( |A| = \lfloor 100/3 \rfloor = 33 \), \( |B| = \lfloor 100/5 \rfloor = 20 \), \( |C| = \lfloor 100/7 \rfloor = 14 \).
Pairs: by 15: \( \lfloor 100/15 \rfloor = 6 \); by 21: \( \lfloor 100/21 \rfloor = 4 \); by 35: \( \lfloor 100/35 \rfloor = 2 \).
All three (by 105): \( \lfloor 100/105 \rfloor = 0 \).
\( |A \cup B \cup C| = 33 + 20 + 14 - 6 - 4 - 2 + 0 = 55 \).
NOT divisible by any of them: \( 100 - 55 = \mathbf{45} \).
Trick: আগে উল্টোটা গোনো (অন্তত একটি দিয়ে divisible), তারপর 100 থেকে বিয়োগ করো।
Single: \( |A| = \lfloor 100/3 \rfloor = 33 \), \( |B| = \lfloor 100/5 \rfloor = 20 \), \( |C| = \lfloor 100/7 \rfloor = 14 \)।
Pair: 15 দিয়ে: \( \lfloor 100/15 \rfloor = 6 \); 21 দিয়ে: \( \lfloor 100/21 \rfloor = 4 \); 35 দিয়ে: \( \lfloor 100/35 \rfloor = 2 \)।
তিনটি দিয়েই (105 দিয়ে): \( \lfloor 100/105 \rfloor = 0 \)।
\( |A \cup B \cup C| = 33 + 20 + 14 - 6 - 4 - 2 + 0 = 55 \)।
কোনোটা দিয়েই divisible না: \( 100 - 55 = \mathbf{45} \)।
3. Relations and Functions3. Relations এবং Functions
A relation R on a set A is a subset of \( A \times A \). It is just a set of ordered pairs. If \( (a,b) \in R \) we write \( a \, R \, b \) and say "a is related to b".
Example: on \( A = \{1,2,3\} \), the relation "less than" is \( R = \{(1,2), (1,3), (2,3)\} \).
Set A-এর উপর একটি relation R হলো \( A \times A \)-এর একটি subset। এটা শুধু ordered pair-এর একটি set। যদি \( (a,b) \in R \) হয়, আমরা লিখি \( a \, R \, b \) আর বলি "a is related to b"।
উদাহরণ: \( A = \{1,2,3\} \)-এর উপর "less than" relation হলো \( R = \{(1,2), (1,3), (2,3)\} \)।
Properties of relationsRelation-এর properties
| Property | Conditionশর্ত | Simple meaningসহজ অর্থ | Example that has itযে relation-এ আছে |
|---|---|---|---|
| Reflexive | \( \forall a: (a,a) \in R \) | everyone relates to itselfপ্রত্যেকে নিজের সাথে related | "=", "≤", "divides""=", "≤", "divides" |
| Symmetric | \( (a,b) \in R \implies (b,a) \in R \) | works both waysদুই দিকেই কাজ করে | "is sibling of", "=""is sibling of", "=" |
| Transitive | \( (a,b), (b,c) \in R \implies (a,c) \in R \) | chains pass throughchain ধরে এগোয় | "<", "≤", "ancestor of""<", "≤", "ancestor of" |
| Antisymmetric | \( (a,b), (b,a) \in R \implies a = b \) | both directions only if equalদুই দিক থাকলে অবশ্যই সমান | "≤", "⊆", "divides" (on positives)"≤", "⊆", "divides" (positive-এ) |
Reflexive? Yes — (1,1), (2,2), (3,3) are all there.
Symmetric? Yes — (1,2) is there and (2,1) is there too.
Transitive? Check (1,2) and (2,1): need (1,1) — yes it is there. Check (2,1) and (1,2): need (2,2) — yes. So transitive.
Antisymmetric? No — (1,2) and (2,1) are both in R but \( 1 \ne 2 \).
Reflexive? হ্যাঁ — (1,1), (2,2), (3,3) সবই আছে।
Symmetric? হ্যাঁ — (1,2) আছে এবং (2,1)-ও আছে।
Transitive? (1,2) আর (2,1) check করি: (1,1) দরকার — আছে। (2,1) আর (1,2): (2,2) দরকার — আছে। তাই transitive।
Antisymmetric? না — (1,2) আর (2,1) দুটোই R-এ আছে কিন্তু \( 1 \ne 2 \)।
Equivalence relationEquivalence relation
A relation that is reflexive + symmetric + transitive is an equivalence relation. It splits the set into disjoint groups called equivalence classes — every element belongs to exactly one class.
যে relation একসাথে reflexive + symmetric + transitive, সেটি একটি equivalence relation। এটি set-কে আলাদা আলাদা group-এ ভাগ করে, যাদের বলে equivalence class — প্রতিটি element ঠিক একটি class-এ থাকে।
Reflexive: \( a - a = 0 \) is divisible by 3. ✓
Symmetric: if \( 3 \mid (a-b) \) then \( 3 \mid (b-a) \). ✓
Transitive: if \( 3 \mid (a-b) \) and \( 3 \mid (b-c) \), then \( 3 \mid (a-b)+(b-c) = (a-c) \). ✓
The equivalence classes are: \( [0] = \{\ldots,-3,0,3,6,\ldots\} \), \( [1] = \{\ldots,-2,1,4,7,\ldots\} \), \( [2] = \{\ldots,-1,2,5,8,\ldots\} \). Three classes, no overlap.
Reflexive: \( a - a = 0 \), যা 3 দিয়ে divisible। ✓
Symmetric: \( 3 \mid (a-b) \) হলে \( 3 \mid (b-a) \)। ✓
Transitive: \( 3 \mid (a-b) \) এবং \( 3 \mid (b-c) \) হলে, \( 3 \mid (a-b)+(b-c) = (a-c) \)। ✓
Equivalence class গুলো: \( [0] = \{\ldots,-3,0,3,6,\ldots\} \), \( [1] = \{\ldots,-2,1,4,7,\ldots\} \), \( [2] = \{\ldots,-1,2,5,8,\ldots\} \)। তিনটি class, কোনো overlap নেই।
Partial orderPartial order
A relation that is reflexive + antisymmetric + transitive is a partial order. Classic examples: "≤" on numbers, "⊆" on sets, "divides" on positive integers. It is called "partial" because some pairs may not be comparable — for example, under "divides", 4 and 6 are not comparable (4 does not divide 6, and 6 does not divide 4).
যে relation reflexive + antisymmetric + transitive, সেটি একটি partial order। Classic উদাহরণ: number-এ "≤", set-এ "⊆", positive integer-এ "divides"। একে "partial" বলা হয় কারণ কিছু pair comparable না-ও হতে পারে — যেমন "divides"-এর অধীনে 4 আর 6 comparable না (4, 6-কে ভাগ করে না, আবার 6-ও 4-কে করে না)।
Functions: injective, surjective, bijectiveFunctions: injective, surjective, bijective
A function \( f: A \to B \) sends every element of A (domain) to exactly one element of B (codomain).
- Injective (one-to-one): different inputs give different outputs. \( f(a_1) = f(a_2) \implies a_1 = a_2 \).
- Surjective (onto): every element of B is hit by at least one input.
- Bijective: both injective and surjective. Perfect pairing — a bijection has an inverse function \( f^{-1} \).
একটি function \( f: A \to B \), A-এর (domain) প্রতিটি element-কে B-এর (codomain) ঠিক একটি element-এ পাঠায়।
- Injective (one-to-one): আলাদা input দিলে আলাদা output। \( f(a_1) = f(a_2) \implies a_1 = a_2 \)।
- Surjective (onto): B-এর প্রতিটি element অন্তত একটি input থেকে আসে।
- Bijective: injective এবং surjective দুটোই। Perfect জোড়া — bijection-এর একটি inverse function \( f^{-1} \) থাকে।
\( f(x) = 2x + 1 \): injective (different x give different results) and surjective (every real y comes from \( x = (y-1)/2 \)). So bijective.
\( f(x) = x^2 \) as \( f: \mathbb{R} \to \mathbb{R} \): NOT injective (\( f(2) = f(-2) = 4 \)) and NOT surjective (nothing maps to −1).
\( f(x) = e^x \) as \( f: \mathbb{R} \to \mathbb{R} \): injective, but not surjective (never gives 0 or negatives).
\( f(x) = 2x + 1 \): injective (আলাদা x-এ আলাদা result) এবং surjective (প্রতিটি real y আসে \( x = (y-1)/2 \) থেকে)। তাই bijective।
\( f(x) = x^2 \), যেখানে \( f: \mathbb{R} \to \mathbb{R} \): injective NOT (\( f(2) = f(-2) = 4 \)) এবং surjective-ও NOT (−1-এ কিছুই map হয় না)।
\( f(x) = e^x \), যেখানে \( f: \mathbb{R} \to \mathbb{R} \): injective, কিন্তু surjective না (কখনো 0 বা negative দেয় না)।
Composition of functionsFunction-এর composition
\( (g \circ f)(x) = g(f(x)) \) — apply f first, then g. Order matters!
\( (g \circ f)(x) = g(f(x)) \) — আগে f apply করো, তারপর g। Order গুরুত্বপূর্ণ!
\( (g \circ f)(x) = g(x+1) = (x+1)^2 \). At \( x = 2 \): \( 3^2 = 9 \).
\( (f \circ g)(x) = f(x^2) = x^2 + 1 \). At \( x = 2 \): \( 4 + 1 = 5 \).
Different results — so \( g \circ f \ne f \circ g \) in general.
\( (g \circ f)(x) = g(x+1) = (x+1)^2 \)। \( x = 2 \) হলে: \( 3^2 = 9 \)।
\( (f \circ g)(x) = f(x^2) = x^2 + 1 \)। \( x = 2 \) হলে: \( 4 + 1 = 5 \)।
ভিন্ন result — তাই সাধারণভাবে \( g \circ f \ne f \circ g \)।
Counting functions between finite setsFinite set-এর মধ্যে function গোনা
Let \( |A| = m \) and \( |B| = n \). Each of the m elements of A independently picks one of n targets.
ধরি \( |A| = m \) এবং \( |B| = n \)। A-এর m টি element-এর প্রত্যেকে স্বাধীনভাবে n টি target থেকে একটি বেছে নেয়।
Total functions: \( 4^3 = 64 \).
Injective functions: \( 4 \times 3 \times 2 = 24 \) (first element has 4 choices, next 3, next 2).
Bijective: 0, because sizes differ.
If \( |A| = |B| = 4 \): bijections = \( 4! = 24 \).
মোট function: \( 4^3 = 64 \)।
Injective function: \( 4 \times 3 \times 2 = 24 \) (প্রথম element-এর 4টি choice, পরেরটির 3টি, তারপর 2টি)।
Bijective: 0, কারণ size আলাদা।
যদি \( |A| = |B| = 4 \) হয়: bijection = \( 4! = 24 \)।
4. Combinatorics (Counting)4. Combinatorics (Counting)
Sum rule and product ruleSum rule এবং product rule
- Sum rule: if a task can be done in \( m \) ways OR in \( n \) other ways (no overlap), total = \( m + n \).
- Product rule: if a task has two steps, first step \( m \) ways AND second step \( n \) ways, total = \( m \times n \).
Quick check: "OR" means add, "AND then" means multiply.
- Sum rule: কোনো কাজ \( m \) ভাবে OR অন্য \( n \) ভাবে করা গেলে (overlap নেই), মোট = \( m + n \)।
- Product rule: কাজের দুটি step থাকলে, প্রথম step \( m \) ভাবে AND দ্বিতীয় step \( n \) ভাবে, মোট = \( m \times n \)।
সহজ নিয়ম: "OR" মানে যোগ, "AND তারপর" মানে গুণ।
Choose one dish (rice OR noodle): \( 4 + 6 = 10 \) ways.
Choose one rice AND one noodle: \( 4 \times 6 = 24 \) ways.
Another: how many 3-character passwords use one letter (26) then two digits (10 each)? \( 26 \times 10 \times 10 = 2600 \).
একটি dish বাছাই (rice OR noodle): \( 4 + 6 = 10 \) ভাবে।
একটি rice AND একটি noodle বাছাই: \( 4 \times 6 = 24 \) ভাবে।
আরেকটি: একটি letter (26) তারপর দুটি digit (প্রতিটি 10) দিয়ে কতগুলো 3-character password হয়? \( 26 \times 10 \times 10 = 2600 \)।
Permutations and combinationsPermutations এবং combinations
Permutation = arrangement, order matters. Combination = selection, order does not matter.
Permutation = সাজানো, order গুরুত্বপূর্ণ। Combination = বাছাই, order গুরুত্বপূর্ণ না।
Arranging letters of a word (repetition inside)শব্দের letter সাজানো (ভিতরে repetition)
If a word has \( n \) letters where one letter repeats \( n_1 \) times, another \( n_2 \) times, and so on, the number of distinct arrangements is:
যদি একটি শব্দে \( n \) টি letter থাকে যেখানে একটি letter \( n_1 \) বার, আরেকটি \( n_2 \) বার repeat হয়, তাহলে distinct arrangement-এর সংখ্যা:
Committee selection problemsCommittee selection problem
Choose 2 women: \( \binom{4}{2} = 6 \). Choose 3 men: \( \binom{6}{3} = 20 \).
Product rule: \( 6 \times 20 = 120 \) committees.
Variation — "at least 1 woman": easier by complement. All committees: \( \binom{10}{5} = 252 \). Committees with 0 women (all men): \( \binom{6}{5} = 6 \). Answer: \( 252 - 6 = 246 \).
2 জন নারী বাছাই: \( \binom{4}{2} = 6 \)। 3 জন পুরুষ বাছাই: \( \binom{6}{3} = 20 \)।
Product rule: \( 6 \times 20 = 120 \) টি committee।
Variation — "অন্তত 1 জন নারী": complement দিয়ে সহজ। সব committee: \( \binom{10}{5} = 252 \)। 0 নারীর committee (সব পুরুষ): \( \binom{6}{5} = 6 \)। উত্তর: \( 252 - 6 = 246 \)।
Pigeonhole principlePigeonhole principle
If you put more than \( n \) pigeons into \( n \) holes, some hole gets at least 2 pigeons. General form: with \( N \) objects in \( k \) boxes, some box has at least \( \lceil N/k \rceil \) objects.
\( n \) টি hole-এ \( n \)-এর বেশি pigeon রাখলে, কোনো একটি hole-এ অন্তত 2টি pigeon পড়বেই। General form: \( k \) টি box-এ \( N \) টি object রাখলে, কোনো box-এ অন্তত \( \lceil N/k \rceil \) টি object থাকে।
Another: how many people do we need so that at least 5 were born on the same weekday? Boxes = 7 days. We need \( \lceil N/7 \rceil \ge 5 \), so \( N \ge 4 \times 7 + 1 = 29 \) people.
আরেকটি: কত জন মানুষ লাগবে যেন অন্তত 5 জন একই weekday-তে জন্মায়? Box = 7 দিন। দরকার \( \lceil N/7 \rceil \ge 5 \), তাই \( N \ge 4 \times 7 + 1 = 29 \) জন।
Erdős–Szekeres theorem — pigeonhole power-up (Real Exam!)Erdős–Szekeres theorem — pigeonhole power-up (Real Exam!)
Theorem (Erdős–Szekeres): any sequence of more than \( (r-1)(s-1) \) DISTINCT numbers contains an increasing subsequence of length \( r \) OR a decreasing subsequence of length \( s \). (A subsequence keeps the original order but may skip elements.)
Proof sketch (pigeonhole with label pairs):
- Give every position \( i \) a label pair \( (x_i, y_i) \): \( x_i \) = length of the longest increasing subsequence ENDING at \( i \), and \( y_i \) = length of the longest decreasing subsequence ending at \( i \).
- Suppose (for contradiction) there is no increasing subsequence of length \( r \) and no decreasing one of length \( s \). Then every \( x_i \le r-1 \) and every \( y_i \le s-1 \). So there are at most \( (r-1)(s-1) \) possible label pairs — these are the pigeonholes.
- We have more than \( (r-1)(s-1) \) elements (the pigeons), so two positions \( i < j \) must share the SAME label pair. But that is impossible: if \( a_i < a_j \), we can extend the increasing subsequence, so \( x_j \ge x_i + 1 \); if \( a_i > a_j \), then \( y_j \ge y_i + 1 \). Either way the two pairs differ. Contradiction — so a long subsequence must exist.
Theorem (Erdős–Szekeres): \( (r-1)(s-1) \)-এর বেশি DISTINCT সংখ্যার যেকোনো sequence-এ থাকবে length \( r \)-এর একটি increasing subsequence OR length \( s \)-এর একটি decreasing subsequence। (Subsequence মূল order ঠিক রাখে, কিন্তু মাঝের element বাদ দিতে পারে।)
Proof sketch (label pair দিয়ে pigeonhole):
- প্রতিটি position \( i \)-কে একটি label pair \( (x_i, y_i) \) দাও: \( x_i \) = \( i \)-তে END হওয়া longest increasing subsequence-এর length, আর \( y_i \) = \( i \)-তে end হওয়া longest decreasing subsequence-এর length।
- ধরো (contradiction-এর জন্য) length \( r \)-এর কোনো increasing subsequence নেই এবং length \( s \)-এর কোনো decreasing subsequence নেই। তাহলে প্রতিটি \( x_i \le r-1 \) এবং প্রতিটি \( y_i \le s-1 \)। তাই সম্ভাব্য label pair সর্বোচ্চ \( (r-1)(s-1) \) টি — এগুলোই pigeonhole।
- আমাদের element \( (r-1)(s-1) \)-এর বেশি (এরাই pigeon), তাই দুটি position \( i < j \)-এর label pair একই হতে হবে। কিন্তু সেটা অসম্ভব: যদি \( a_i < a_j \) হয়, increasing subsequence-টা বাড়ানো যায়, তাই \( x_j \ge x_i + 1 \); যদি \( a_i > a_j \) হয়, তাহলে \( y_j \ge y_i + 1 \)। দুই ক্ষেত্রেই pair দুটি আলাদা। Contradiction — তাই লম্বা subsequence থাকতেই হবে।
Take \( r = s = 8 \). Then \( (r-1)(s-1) = 7 \times 7 = 49 \).
We have \( 50 > 49 \) students, so by Erdős–Szekeres there is an increasing subsequence of length 8 OR a decreasing subsequence of length 8. Done.
নাও \( r = s = 8 \)। তাহলে \( (r-1)(s-1) = 7 \times 7 = 49 \)।
আমাদের student \( 50 > 49 \) জন, তাই Erdős–Szekeres অনুযায়ী length 8-এর একটি increasing subsequence OR length 8-এর একটি decreasing subsequence আছে। শেষ।
Binomial theoremBinomial theorem
General term: \( \binom{5}{r} 2^{5-r} x^r \). We need \( r = 3 \):
\( \binom{5}{3} \cdot 2^{2} = 10 \times 4 = 40 \). So the term is \( 40x^3 \).
Also useful: setting \( x = y = 1 \) in the theorem gives \( 2^n = \sum \binom{n}{r} \) — the total number of subsets again!
General term: \( \binom{5}{r} 2^{5-r} x^r \)। দরকার \( r = 3 \):
\( \binom{5}{3} \cdot 2^{2} = 10 \times 4 = 40 \)। তাই term-টি \( 40x^3 \)।
আরও দরকারি: theorem-এ \( x = y = 1 \) বসালে পাই \( 2^n = \sum \binom{n}{r} \) — আবার সেই মোট subset সংখ্যা!
Counting with repetitionRepetition সহ counting
Two "repetition allowed" formulas:
- Permutation with repetition: pick \( r \) items from \( n \) types, order matters, repeats allowed: \( n^r \).
- Combination with repetition (stars and bars): pick \( r \) items from \( n \) types, order does not matter, repeats allowed: \( \binom{n + r - 1}{r} \).
দুটি "repetition allowed" formula:
- Permutation with repetition: \( n \) ধরনের জিনিস থেকে \( r \) টি বাছাই, order গুরুত্বপূর্ণ, repeat allowed: \( n^r \)।
- Combination with repetition (stars and bars): \( n \) ধরনের জিনিস থেকে \( r \) টি বাছাই, order গুরুত্বপূর্ণ না, repeat allowed: \( \binom{n + r - 1}{r} \)।
5. Recurrence Relations5. Recurrence Relations
A recurrence relation defines a sequence using its previous terms. Example: \( a_n = 2a_{n-1} \) with \( a_0 = 1 \) gives 1, 2, 4, 8, 16, … A recurrence needs initial conditions (base cases) to pin down the sequence.
Setting up a recurrence means asking: "How does the answer for size n depend on smaller sizes?"
Recurrence relation একটি sequence-কে তার আগের term দিয়ে define করে। উদাহরণ: \( a_n = 2a_{n-1} \), \( a_0 = 1 \) হলে পাই 1, 2, 4, 8, 16, … Sequence-টা fix করতে recurrence-এর initial condition (base case) লাগে।
Recurrence বানানো মানে প্রশ্ন করা: "Size n-এর উত্তর ছোট size-এর উপর কীভাবে নির্ভর করে?"
Tower of HanoiTower of Hanoi
Move n disks from peg A to peg C, one disk at a time, never putting a bigger disk on a smaller one. Plan: move the top \( n-1 \) disks to peg B, move the biggest disk to C, then move the \( n-1 \) disks from B to C. So:
n টি disk-কে peg A থেকে peg C-তে নিতে হবে, একবারে একটি disk, বড় disk কখনো ছোট disk-এর উপরে না। Plan: উপরের \( n-1 \) টি disk B-তে নাও, সবচেয়ে বড় disk C-তে নাও, তারপর \( n-1 \) টি disk B থেকে C-তে নাও। তাহলে:
\( T(n) = 2T(n-1) + 1 = 2(2T(n-2)+1) + 1 = 4T(n-2) + 3 = 8T(n-3) + 7 = \cdots = 2^{k}T(n-k) + 2^{k}-1 \).
Stop at \( k = n-1 \): \( T(n) = 2^{n-1}T(1) + 2^{n-1} - 1 = 2^{n-1} + 2^{n-1} - 1 = 2^n - 1 \). ✓
Quick values: T(1)=1, T(2)=3, T(3)=7, T(4)=15.
\( T(n) = 2T(n-1) + 1 = 2(2T(n-2)+1) + 1 = 4T(n-2) + 3 = 8T(n-3) + 7 = \cdots = 2^{k}T(n-k) + 2^{k}-1 \)।
\( k = n-1 \)-তে থামি: \( T(n) = 2^{n-1}T(1) + 2^{n-1} - 1 = 2^{n-1} + 2^{n-1} - 1 = 2^n - 1 \)। ✓
কিছু value: T(1)=1, T(2)=3, T(3)=7, T(4)=15।
Solving linear homogeneous recurrencesLinear homogeneous recurrence solve করা
For a recurrence like \( a_n = c_1 a_{n-1} + c_2 a_{n-2} \), use the characteristic equation method:
- Guess \( a_n = r^n \). Substitute to get \( r^2 = c_1 r + c_2 \), i.e. \( r^2 - c_1 r - c_2 = 0 \).
- Find the roots \( r_1, r_2 \).
- If roots are distinct: \( a_n = \alpha \, r_1^n + \beta \, r_2^n \). If there is a repeated root r: \( a_n = (\alpha + \beta n) r^n \).
- Use the initial conditions to find \( \alpha, \beta \).
\( a_n = c_1 a_{n-1} + c_2 a_{n-2} \) ধরনের recurrence-এর জন্য characteristic equation method ব্যবহার করো:
- ধরো \( a_n = r^n \)। বসালে পাই \( r^2 = c_1 r + c_2 \), অর্থাৎ \( r^2 - c_1 r - c_2 = 0 \)।
- Root গুলো বের করো: \( r_1, r_2 \)।
- Root আলাদা হলে: \( a_n = \alpha \, r_1^n + \beta \, r_2^n \)। Root repeated হলে (r): \( a_n = (\alpha + \beta n) r^n \)।
- Initial condition দিয়ে \( \alpha, \beta \) বের করো।
Step 1: characteristic equation: \( r^2 - 5r + 6 = 0 \).
Step 2: factor: \( (r-2)(r-3) = 0 \), so \( r_1 = 2 \), \( r_2 = 3 \).
Step 3: general solution: \( a_n = \alpha \cdot 2^n + \beta \cdot 3^n \).
Step 4: use initial conditions:
\( n=0: \alpha + \beta = 1 \). \( n=1: 2\alpha + 3\beta = 4 \).
From the first: \( \alpha = 1 - \beta \). Substitute: \( 2(1-\beta) + 3\beta = 4 \Rightarrow 2 + \beta = 4 \Rightarrow \beta = 2, \alpha = -1 \).
Answer: \( a_n = -2^n + 2 \cdot 3^n \). Check \( a_2 \): recurrence gives \( 5(4) - 6(1) = 14 \); formula gives \( -4 + 18 = 14 \). ✓
Step 1: characteristic equation: \( r^2 - 5r + 6 = 0 \)।
Step 2: factor: \( (r-2)(r-3) = 0 \), তাই \( r_1 = 2 \), \( r_2 = 3 \)।
Step 3: general solution: \( a_n = \alpha \cdot 2^n + \beta \cdot 3^n \)।
Step 4: initial condition ব্যবহার:
\( n=0: \alpha + \beta = 1 \)। \( n=1: 2\alpha + 3\beta = 4 \)।
প্রথমটি থেকে: \( \alpha = 1 - \beta \)। বসাই: \( 2(1-\beta) + 3\beta = 4 \Rightarrow 2 + \beta = 4 \Rightarrow \beta = 2, \alpha = -1 \)।
উত্তর: \( a_n = -2^n + 2 \cdot 3^n \)। \( a_2 \) check: recurrence দেয় \( 5(4) - 6(1) = 14 \); formula দেয় \( -4 + 18 = 14 \)। ✓
Fibonacci and its closed formFibonacci এবং তার closed form
The Fibonacci sequence: \( F_n = F_{n-1} + F_{n-2} \), \( F_0 = 0, F_1 = 1 \): 0, 1, 1, 2, 3, 5, 8, 13, …
Its characteristic equation is \( r^2 - r - 1 = 0 \), with roots \( \varphi = \frac{1+\sqrt{5}}{2} \approx 1.618 \) (the golden ratio) and \( \psi = \frac{1-\sqrt{5}}{2} \approx -0.618 \). Applying the same method gives Binet's formula:
Fibonacci sequence: \( F_n = F_{n-1} + F_{n-2} \), \( F_0 = 0, F_1 = 1 \): 0, 1, 1, 2, 3, 5, 8, 13, …
এর characteristic equation \( r^2 - r - 1 = 0 \), root দুটি \( \varphi = \frac{1+\sqrt{5}}{2} \approx 1.618 \) (golden ratio) এবং \( \psi = \frac{1-\sqrt{5}}{2} \approx -0.618 \)। একই method apply করলে পাই Binet's formula:
Since \( |\psi| < 1 \), the \( \psi^n \) part shrinks to almost nothing. So \( F_n \approx \varphi^n / \sqrt{5} \) — Fibonacci grows exponentially, and the ratio \( F_{n+1}/F_n \) approaches the golden ratio.
যেহেতু \( |\psi| < 1 \), তাই \( \psi^n \) অংশটা প্রায় শূন্য হয়ে যায়। ফলে \( F_n \approx \varphi^n / \sqrt{5} \) — Fibonacci exponentially বাড়ে, আর \( F_{n+1}/F_n \) ratio golden ratio-র দিকে যায়।
6. Graphs and Trees6. Graphs এবং Trees
A graph \( G = (V, E) \) has a set of vertices (nodes) V and a set of edges E connecting pairs of vertices. Key terms:
- Degree deg(v): number of edges touching vertex v.
- Path: a sequence of vertices connected by edges, no vertex repeated.
- Cycle: a path that starts and ends at the same vertex.
- Connected graph: there is a path between every pair of vertices.
- Simple graph: no self-loops, no repeated edges.
- Complete graph \( K_n \): every pair of vertices is connected. It has \( \binom{n}{2} = \frac{n(n-1)}{2} \) edges.
Graph \( G = (V, E) \)-তে থাকে vertex (node)-এর set V আর vertex-এর জোড়া যুক্তকারী edge-এর set E। মূল term গুলো:
- Degree deg(v): vertex v-কে ছোঁয়া edge-এর সংখ্যা।
- Path: edge দিয়ে যুক্ত vertex-এর একটি sequence, কোনো vertex repeat হয় না।
- Cycle: যে path একই vertex-এ শুরু আর শেষ হয়।
- Connected graph: প্রতিটি vertex জোড়ার মধ্যে path আছে।
- Simple graph: কোনো self-loop নেই, repeated edge নেই।
- Complete graph \( K_n \): প্রতিটি vertex জোড়া যুক্ত। এর edge সংখ্যা \( \binom{n}{2} = \frac{n(n-1)}{2} \)।
Handshaking lemmaHandshaking lemma
Every edge touches exactly 2 vertices, so it adds 2 to the total degree:
প্রতিটি edge ঠিক 2টি vertex ছোঁয়, তাই মোট degree-তে 2 যোগ করে:
Sum of degrees = \( 2+3+3+4+4 = 16 \). So \( |E| = 16/2 = 8 \).
Useful corollary: the number of odd-degree vertices is always EVEN. A graph with degrees 1, 2, 3 (sum = 6, ok) is possible; but degrees 1, 1, 1 (sum = 3, odd) is impossible.
Degree-র যোগফল = \( 2+3+3+4+4 = 16 \)। তাই \( |E| = 16/2 = 8 \)।
দরকারি corollary: odd-degree vertex-এর সংখ্যা সবসময় EVEN। Degree 1, 2, 3 (যোগফল 6, ঠিক আছে) সম্ভব; কিন্তু degree 1, 1, 1 (যোগফল 3, odd) অসম্ভব।
Euler and Hamiltonian pathsEuler এবং Hamiltonian paths
- Euler path: uses every EDGE exactly once. Exists in a connected graph iff it has exactly 0 or 2 odd-degree vertices.
- Euler circuit: Euler path that returns to the start. Exists iff ALL vertices have even degree.
- Hamiltonian path: visits every VERTEX exactly once. No simple degree condition — checking is hard (NP-complete).
The famous Königsberg bridge problem started graph theory: can you walk crossing each of the 7 bridges exactly once? All 4 land areas have odd degree — more than 2 odd vertices — so Euler proved it is impossible.
- Euler path: প্রতিটি EDGE ঠিক একবার ব্যবহার করে। Connected graph-এ থাকে iff odd-degree vertex ঠিক 0 বা 2টি।
- Euler circuit: Euler path যা শুরুতে ফিরে আসে। থাকে iff সব vertex-এর degree even।
- Hamiltonian path: প্রতিটি VERTEX ঠিক একবার visit করে। কোনো সহজ degree শর্ত নেই — check করা কঠিন (NP-complete)।
বিখ্যাত Königsberg bridge problem থেকেই graph theory শুরু: 7টি bridge-এর প্রতিটি ঠিক একবার পার হয়ে হাঁটা যায় কি? 4টি land area-র সবগুলোর degree odd — 2টির বেশি odd vertex — তাই Euler প্রমাণ করেন এটা অসম্ভব।
Bipartite graphs and coloringBipartite graphs এবং coloring
A graph is bipartite if its vertices split into two groups, and every edge goes between the groups (never inside a group). Key fact: a graph is bipartite iff it has no odd-length cycle. The complete bipartite graph \( K_{m,n} \) has \( m \times n \) edges.
Graph coloring: assign colors to vertices so that neighbors get different colors. The minimum number of colors needed is the chromatic number \( \chi(G) \). Bipartite = 2-colorable, so \( \chi = 2 \) (if it has at least one edge). For \( K_n \), \( \chi = n \). For a cycle: even cycle needs 2 colors, odd cycle needs 3.
একটি graph bipartite যদি তার vertex দুটি group-এ ভাগ হয়, আর প্রতিটি edge দুই group-এর মাঝে যায় (কখনো group-এর ভিতরে না)। মূল fact: graph bipartite iff কোনো odd-length cycle নেই। Complete bipartite graph \( K_{m,n} \)-এর edge সংখ্যা \( m \times n \)।
Graph coloring: vertex-এ রঙ দাও যেন প্রতিবেশীরা আলাদা রঙ পায়। সর্বনিম্ন যত রঙ লাগে তা হলো chromatic number \( \chi(G) \)। Bipartite = 2-colorable, তাই \( \chi = 2 \) (অন্তত একটি edge থাকলে)। \( K_n \)-এর জন্য \( \chi = n \)। Cycle-এর জন্য: even cycle-এ 2 রঙ, odd cycle-এ 3 রঙ।
TreesTrees
A tree is a connected graph with NO cycles. Equivalent facts (any one implies the others):
- A tree with \( n \) vertices has exactly \( n - 1 \) edges.
- Between any two vertices there is exactly ONE path.
- Adding any edge creates exactly one cycle; removing any edge disconnects it.
A spanning tree of a connected graph G is a tree that contains all vertices of G. To get one, delete \( |E| - (n-1) \) edges (breaking all cycles). A rooted tree picks one vertex as root; then we can talk about parent, child, leaf (no children), height, and levels.
Tree হলো এমন connected graph যাতে কোনো cycle নেই। Equivalent fact গুলো (একটি হলে বাকিগুলোও হয়):
- \( n \) vertex-এর tree-তে ঠিক \( n - 1 \) টি edge থাকে।
- যেকোনো দুটি vertex-এর মাঝে ঠিক একটি path থাকে।
- যেকোনো edge যোগ করলে ঠিক একটি cycle তৈরি হয়; যেকোনো edge সরালে graph disconnected হয়।
Connected graph G-এর spanning tree হলো এমন একটি tree যাতে G-এর সব vertex আছে। এটি পেতে \( |E| - (n-1) \) টি edge মুছতে হয় (সব cycle ভাঙা)। Rooted tree-তে একটি vertex-কে root ধরা হয়; তখন parent, child, leaf (child নেই), height আর level নিয়ে কথা বলা যায়।
A spanning tree on 6 vertices has \( 6 - 1 = 5 \) edges. Remove \( 9 - 5 = 4 \) edges.
Another: a tree has 10 vertices. Edges? Always \( 10 - 1 = 9 \). No calculation needed.
6 vertex-এর spanning tree-তে \( 6 - 1 = 5 \) টি edge। সরাতে হবে \( 9 - 5 = 4 \) টি।
আরেকটি: একটি tree-তে 10টি vertex। Edge? সবসময় \( 10 - 1 = 9 \)। কোনো হিসাব লাগে না।
7. Basic Number Theory7. Basic Number Theory
Divisibility and primesDivisibility এবং primes
We say \( a \mid b \) ("a divides b") if \( b = ka \) for some integer k. Example: \( 3 \mid 12 \), but \( 5 \nmid 12 \).
A prime is an integer greater than 1 whose only divisors are 1 and itself: 2, 3, 5, 7, 11, 13, … The number 1 is NOT prime. The fundamental theorem of arithmetic: every integer greater than 1 has a unique prime factorization. Example: \( 360 = 2^3 \times 3^2 \times 5 \).
Quick primality check for small n: test divisibility by primes up to \( \sqrt{n} \). For 97: \( \sqrt{97} \approx 9.8 \), test 2, 3, 5, 7 — none divide it, so 97 is prime.
আমরা বলি \( a \mid b \) ("a divides b") যদি কোনো integer k-এর জন্য \( b = ka \) হয়। উদাহরণ: \( 3 \mid 12 \), কিন্তু \( 5 \nmid 12 \)।
Prime হলো 1-এর চেয়ে বড় integer যার divisor শুধু 1 আর সে নিজে: 2, 3, 5, 7, 11, 13, … সংখ্যা 1 prime NOT। Fundamental theorem of arithmetic: 1-এর চেয়ে বড় প্রতিটি integer-এর একটি unique prime factorization আছে। উদাহরণ: \( 360 = 2^3 \times 3^2 \times 5 \)।
ছোট n-এর জন্য দ্রুত primality check: \( \sqrt{n} \) পর্যন্ত prime দিয়ে ভাগ করে দেখো। 97-এর জন্য: \( \sqrt{97} \approx 9.8 \), তাই 2, 3, 5, 7 test করো — কোনোটাই ভাগ করে না, তাই 97 prime।
GCD, LCM, and the Euclidean algorithmGCD, LCM এবং Euclidean algorithm
GCD (greatest common divisor) is the largest number dividing both a and b. LCM (least common multiple) is the smallest positive number both divide. They connect by a beautiful identity:
GCD (greatest common divisor) হলো সবচেয়ে বড় সংখ্যা যা a আর b দুটোকেই ভাগ করে। LCM (least common multiple) হলো সবচেয়ে ছোট positive সংখ্যা যাকে দুটোই ভাগ করে। এদের মধ্যে সুন্দর সম্পর্ক:
The Euclidean algorithm finds gcd fast: replace the bigger number by its remainder when divided by the smaller. Repeat until the remainder is 0. The last non-zero remainder is the gcd.
Euclidean algorithm দ্রুত gcd বের করে: বড় সংখ্যাকে ছোট সংখ্যা দিয়ে ভাগের remainder দিয়ে বদলাও। Remainder 0 না হওয়া পর্যন্ত repeat করো। শেষ non-zero remainder-টিই gcd।
\( 252 = 1 \times 198 + 54 \)
\( 198 = 3 \times 54 + 36 \)
\( 54 = 1 \times 36 + 18 \)
\( 36 = 2 \times 18 + 0 \) ← remainder 0, stop.
So \( \gcd(252, 198) = 18 \). And \( \text{lcm} = \frac{252 \times 198}{18} = 2772 \).
\( 252 = 1 \times 198 + 54 \)
\( 198 = 3 \times 54 + 36 \)
\( 54 = 1 \times 36 + 18 \)
\( 36 = 2 \times 18 + 0 \) ← remainder 0, থামো।
তাই \( \gcd(252, 198) = 18 \)। আর \( \text{lcm} = \frac{252 \times 198}{18} = 2772 \)।
Modular arithmetic and congruencesModular arithmetic এবং congruences
\( a \equiv b \pmod{m} \) means m divides \( a - b \) — in other words, a and b leave the same remainder when divided by m. Example: \( 17 \equiv 2 \pmod{5} \) because both leave remainder 2.
Congruences behave nicely with + and ×: if \( a \equiv b \) and \( c \equiv d \pmod m \), then \( a + c \equiv b + d \) and \( ac \equiv bd \pmod m \). This lets us reduce numbers BEFORE multiplying — the key trick for big powers.
\( a \equiv b \pmod{m} \) মানে m, \( a - b \)-কে ভাগ করে — অর্থাৎ a আর b-কে m দিয়ে ভাগ করলে remainder একই। উদাহরণ: \( 17 \equiv 2 \pmod{5} \), কারণ দুটোরই remainder 2।
Congruence + আর ×-এর সাথে সুন্দর আচরণ করে: যদি \( a \equiv b \) এবং \( c \equiv d \pmod m \), তাহলে \( a + c \equiv b + d \) এবং \( ac \equiv bd \pmod m \)। এতে গুণ করার আগেই সংখ্যা ছোট করা যায় — বড় power-এর জন্য মূল trick।
Reduce first: \( 123 \equiv 3 \), \( 457 \equiv 7 \pmod{10} \).
So the answer is \( 3 \times 7 = 21 \equiv 1 \pmod{10} \). (This is just the last digit trick.)
আগে ছোট করো: \( 123 \equiv 3 \), \( 457 \equiv 7 \pmod{10} \)।
তাই উত্তর \( 3 \times 7 = 21 \equiv 1 \pmod{10} \)। (এটা আসলে last digit-এর trick।)
Modular exponentiationModular exponentiation
To compute \( a^n \bmod m \) for big n, look for a repeating pattern of powers, or use repeated squaring.
বড় n-এর জন্য \( a^n \bmod m \) বের করতে power-এর repeating pattern খোঁজো, অথবা repeated squaring ব্যবহার করো।
Powers of 3 mod 7: \( 3^1 = 3, \; 3^2 = 2, \; 3^3 = 6, \; 3^4 = 4, \; 3^5 = 5, \; 3^6 = 1 \). The pattern repeats every 6 steps.
\( 100 = 6 \times 16 + 4 \), so \( 3^{100} = (3^6)^{16} \cdot 3^4 \equiv 1^{16} \cdot 4 = 4 \pmod 7 \).
Answer: 4.
3-এর power mod 7: \( 3^1 = 3, \; 3^2 = 2, \; 3^3 = 6, \; 3^4 = 4, \; 3^5 = 5, \; 3^6 = 1 \)। Pattern প্রতি 6 step-এ repeat হয়।
\( 100 = 6 \times 16 + 4 \), তাই \( 3^{100} = (3^6)^{16} \cdot 3^4 \equiv 1^{16} \cdot 4 = 4 \pmod 7 \)।
উত্তর: 4।
\( 2^2 = 4, \; 2^4 = 4^2 = 16, \; 2^8 = 16^2 = 256 \).
\( 2^{10} = 2^8 \cdot 2^2 = 256 \times 4 = 1024 \equiv 24 \pmod{1000} \).
Each step squares the previous result — only \( O(\log n) \) multiplications. Computers use exactly this trick in cryptography (RSA).
\( 2^2 = 4, \; 2^4 = 4^2 = 16, \; 2^8 = 16^2 = 256 \)।
\( 2^{10} = 2^8 \cdot 2^2 = 256 \times 4 = 1024 \equiv 24 \pmod{1000} \)।
প্রতিটি step আগের result-কে square করে — মাত্র \( O(\log n) \) টি গুণ। Cryptography-তে (RSA) computer ঠিক এই trick-ই ব্যবহার করে।
Practice Questions (Admission Style)Practice Questions (Admission Style)
Show Answerউত্তর দেখুন
Show Answerউত্তর দেখুন
Show Answerউত্তর দেখুন
Show Answerউত্তর দেখুন
Original \( p \rightarrow q \): true (6 = 2×3, so any multiple of 6 is a multiple of 3).
Converse ( \( q \rightarrow p \) ): "If divisible by 3, then divisible by 6." FALSE — counterexample: 9 is divisible by 3 but not by 6.
Inverse ( \( \neg p \rightarrow \neg q \) ): "If not divisible by 6, then not divisible by 3." FALSE — same counterexample: 9.
Contrapositive ( \( \neg q \rightarrow \neg p \) ): "If not divisible by 3, then not divisible by 6." TRUE — it is equivalent to the original.
মূল \( p \rightarrow q \): true (6 = 2×3, তাই 6-এর যেকোনো multiple 3-এরও multiple)।
Converse ( \( q \rightarrow p \) ): "3 দিয়ে divisible হলে 6 দিয়ে divisible।" FALSE — counterexample: 9, যা 3 দিয়ে divisible কিন্তু 6 দিয়ে নয়।
Inverse ( \( \neg p \rightarrow \neg q \) ): "6 দিয়ে divisible না হলে 3 দিয়েও না।" FALSE — একই counterexample: 9।
Contrapositive ( \( \neg q \rightarrow \neg p \) ): "3 দিয়ে divisible না হলে 6 দিয়েও না।" TRUE — এটি মূল statement-এর equivalent।
Show Answerউত্তর দেখুন
Show Answerউত্তর দেখুন
Singles: \( \lfloor 300/3 \rfloor = 100 \), \( \lfloor 300/5 \rfloor = 60 \), \( \lfloor 300/7 \rfloor = 42 \).
Pairs: \( \lfloor 300/15 \rfloor = 20 \), \( \lfloor 300/21 \rfloor = 14 \), \( \lfloor 300/35 \rfloor = 8 \).
Triple: \( \lfloor 300/105 \rfloor = 2 \).
Inclusion-exclusion: \( 100 + 60 + 42 - 20 - 14 - 8 + 2 = 162 \).
Single: \( \lfloor 300/3 \rfloor = 100 \), \( \lfloor 300/5 \rfloor = 60 \), \( \lfloor 300/7 \rfloor = 42 \)।
Pair: \( \lfloor 300/15 \rfloor = 20 \), \( \lfloor 300/21 \rfloor = 14 \), \( \lfloor 300/35 \rfloor = 8 \)।
Triple: \( \lfloor 300/105 \rfloor = 2 \)।
Inclusion-exclusion: \( 100 + 60 + 42 - 20 - 14 - 8 + 2 = 162 \)।
Show Answerউত্তর দেখুন
Show Answerউত্তর দেখুন
Show Answerউত্তর দেখুন
Show Answerউত্তর দেখুন
Split into cases by number of women:
2 women, 2 men: \( \binom{5}{2}\binom{7}{2} = 10 \times 21 = 210 \).
3 women, 1 man: \( \binom{5}{3}\binom{7}{1} = 10 \times 7 = 70 \).
4 women, 0 men: \( \binom{5}{4}\binom{7}{0} = 5 \times 1 = 5 \).
Total: \( 210 + 70 + 5 = 285 \). (Cases are disjoint, so we add — sum rule.)
নারীর সংখ্যা অনুযায়ী case ভাগ করি:
2 নারী, 2 পুরুষ: \( \binom{5}{2}\binom{7}{2} = 10 \times 21 = 210 \)।
3 নারী, 1 পুরুষ: \( \binom{5}{3}\binom{7}{1} = 10 \times 7 = 70 \)।
4 নারী, 0 পুরুষ: \( \binom{5}{4}\binom{7}{0} = 5 \times 1 = 5 \)।
মোট: \( 210 + 70 + 5 = 285 \)। (Case গুলো আলাদা, তাই যোগ — sum rule।)
Show Answerউত্তর দেখুন
Show Answerউত্তর দেখুন
Characteristic equation: \( r^2 - 4r + 4 = 0 \Rightarrow (r-2)^2 = 0 \). Repeated root \( r = 2 \).
Repeated root form: \( a_n = (\alpha + \beta n) 2^n \).
\( n=0: \alpha = 1 \). \( n=1: (\alpha + \beta) \cdot 2 = 4 \Rightarrow \alpha + \beta = 2 \Rightarrow \beta = 1 \).
So \( a_n = (1+n)2^n \). Check \( a_2 \): recurrence: \( 4(4) - 4(1) = 12 \); formula: \( 3 \times 4 = 12 \). ✓
Common mistake: using \( \alpha \, 2^n + \beta \, 2^n \) — that collapses to one constant and cannot fit both initial conditions. The extra factor n is required.
Characteristic equation: \( r^2 - 4r + 4 = 0 \Rightarrow (r-2)^2 = 0 \)। Repeated root \( r = 2 \)।
Repeated root-এর form: \( a_n = (\alpha + \beta n) 2^n \)।
\( n=0: \alpha = 1 \)। \( n=1: (\alpha + \beta) \cdot 2 = 4 \Rightarrow \alpha + \beta = 2 \Rightarrow \beta = 1 \)।
তাই \( a_n = (1+n)2^n \)। \( a_2 \) check: recurrence: \( 4(4) - 4(1) = 12 \); formula: \( 3 \times 4 = 12 \)। ✓
Common mistake: \( \alpha \, 2^n + \beta \, 2^n \) লেখা — এটা একটাই constant হয়ে যায়, দুটো initial condition মেলানো যায় না। বাড়তি n factor-টা লাগবেই।
Show Answerউত্তর দেখুন
Show Answerউত্তর দেখুন
(i) Odd-degree vertices: the two vertices of degree 3 — exactly 2 odd vertices. So NO Euler circuit (that needs 0 odd), but YES an Euler path exists, starting at one degree-3 vertex and ending at the other.
(ii) Total edges by handshaking: \( (2+2+4+4+3+3)/2 = 18/2 = 9 \). A spanning tree on \( n = 6 \) vertices has \( n - 1 = 5 \) edges. Edges to delete: \( 9 - 5 = 4 \).
(i) Odd-degree vertex: degree 3-এর দুটি vertex — ঠিক 2টি odd vertex। তাই Euler circuit নেই (তার জন্য 0টি odd লাগে), কিন্তু Euler path আছে — এক degree-3 vertex-এ শুরু, অন্যটিতে শেষ।
(ii) Handshaking দিয়ে মোট edge: \( (2+2+4+4+3+3)/2 = 18/2 = 9 \)। \( n = 6 \) vertex-এর spanning tree-তে \( n - 1 = 5 \) টি edge। মুছতে হবে: \( 9 - 5 = 4 \) টি edge।
Show Answerউত্তর দেখুন
(i) Euclidean algorithm:
\( 1071 = 2 \times 462 + 147 \)
\( 462 = 3 \times 147 + 21 \)
\( 147 = 7 \times 21 + 0 \)
So \( \gcd = 21 \). Then \( \text{lcm} = \frac{1071 \times 462}{21} = 1071 \times 22 = 23562 \).
(ii) Powers of 7 mod 10 cycle: \( 7^1 = 7, 7^2 = 9, 7^3 = 3, 7^4 = 1 \), then repeat (cycle length 4).
\( 2026 = 4 \times 506 + 2 \), so \( 7^{2026} \equiv 7^2 \equiv 9 \pmod{10} \).
The remainder (last digit) is 9.
(i) Euclidean algorithm:
\( 1071 = 2 \times 462 + 147 \)
\( 462 = 3 \times 147 + 21 \)
\( 147 = 7 \times 21 + 0 \)
তাই \( \gcd = 21 \)। এরপর \( \text{lcm} = \frac{1071 \times 462}{21} = 1071 \times 22 = 23562 \)।
(ii) 7-এর power mod 10-এর cycle: \( 7^1 = 7, 7^2 = 9, 7^3 = 3, 7^4 = 1 \), তারপর repeat (cycle length 4)।
\( 2026 = 4 \times 506 + 2 \), তাই \( 7^{2026} \equiv 7^2 \equiv 9 \pmod{10} \)।
Remainder (last digit) হলো 9।
Show Answerউত্তর দেখুন
Careful: for the overlaps use the LCM, not the product. \( \text{lcm}(4,6) = 12 \) (NOT 24!), \( \text{lcm}(4,15) = 60 \), \( \text{lcm}(6,15) = 30 \), \( \text{lcm}(4,6,15) = 60 \).
Singles: \( \lfloor 500/4 \rfloor = 125 \), \( \lfloor 500/6 \rfloor = 83 \), \( \lfloor 500/15 \rfloor = 33 \).
Pairs: \( \lfloor 500/12 \rfloor = 41 \), \( \lfloor 500/60 \rfloor = 8 \), \( \lfloor 500/30 \rfloor = 16 \).
Triple: \( \lfloor 500/60 \rfloor = 8 \).
Divisible by at least one: \( 125 + 83 + 33 - 41 - 8 - 16 + 8 = 184 \).
Divisible by none: \( 500 - 184 = \mathbf{316} \). (Option (b) is the trap — 184 counts the divisible ones, but the question asks for NONE.)
সাবধান: overlap-এর জন্য LCM ব্যবহার করো, গুণফল নয়। \( \text{lcm}(4,6) = 12 \) (24 নয়!), \( \text{lcm}(4,15) = 60 \), \( \text{lcm}(6,15) = 30 \), \( \text{lcm}(4,6,15) = 60 \)।
Single: \( \lfloor 500/4 \rfloor = 125 \), \( \lfloor 500/6 \rfloor = 83 \), \( \lfloor 500/15 \rfloor = 33 \)।
Pair: \( \lfloor 500/12 \rfloor = 41 \), \( \lfloor 500/60 \rfloor = 8 \), \( \lfloor 500/30 \rfloor = 16 \)।
Triple: \( \lfloor 500/60 \rfloor = 8 \)।
অন্তত একটি দিয়ে divisible: \( 125 + 83 + 33 - 41 - 8 - 16 + 8 = 184 \)।
কোনোটা দিয়েই divisible না: \( 500 - 184 = \mathbf{316} \)। (Option (b) হলো trap — 184 হলো divisible-দের সংখ্যা, কিন্তু প্রশ্ন চেয়েছে NONE।)
Show Answerউত্তর দেখুন
(i) Pigeonhole principle. The holes are the possible initial pairs: \( 26 \times 26 = 676 \). With 676 students, the worst case is that ALL pairs are different — no guarantee yet. One more student must repeat some pair. Minimum: \( 676 + 1 = \mathbf{677} \) students. (BUET asked this seating-guarantee style in April 2019.)
(ii) Strong induction on \( n \).
Base cases (one full block of 4 numbers): \( 12 = 4+4+4 \), \( 13 = 4+4+5 \), \( 14 = 4+5+5 \), \( 15 = 5+5+5 \).
Inductive step: take any \( n \ge 16 \). Then \( n - 4 \ge 12 \), so by the strong induction hypothesis \( n-4 \) taka can be paid. Add one more 4-taka note — that pays \( n \) taka.
So every \( n \ge 12 \) taka can be paid. ✓
(i) Pigeonhole principle। Hole হলো সম্ভাব্য initial pair: \( 26 \times 26 = 676 \) টি। 676 জন student হলে worst case-এ সবার pair আলাদা হতে পারে — তখনো guarantee নেই। আর একজন student এলে কোনো একটি pair repeat হবেই। Minimum: \( 676 + 1 = \mathbf{677} \) জন। (BUET April 2019-এ এই seating-guarantee ধরনটাই জিজ্ঞেস করেছে।)
(ii) \( n \)-এর উপর strong induction।
Base case (4টি সংখ্যার একটি পুরো block): \( 12 = 4+4+4 \), \( 13 = 4+4+5 \), \( 14 = 4+5+5 \), \( 15 = 5+5+5 \)।
Inductive step: যেকোনো \( n \ge 16 \) নাও। তাহলে \( n - 4 \ge 12 \), তাই strong induction hypothesis অনুযায়ী \( n-4 \) taka দেওয়া যায়। আর একটি 4-taka note যোগ করো — \( n \) taka দেওয়া হয়ে গেল।
তাই প্রতিটি \( n \ge 12 \) taka দেওয়া যায়। ✓