Subjects discrete mathematics

Discrete Math Exam

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Discrete Math Exam


1. **Construct a truth table for the compound proposition $(P \to R) \land (Q \lor \neg R)$**. - List all possible truth values for $P, Q, R$. - Compute $P \to R$ which is false only when $P$ is true and $R$ is false. - Compute $Q \lor \neg R$ which is true if $Q$ is true or $R$ is false. - Finally compute $(P \to R) \land (Q \lor \neg R)$. 2. **Prove the statement "The Super Eagles won their last football game or the Super Eagles did not win their last football game" as a tautology and as a contradiction with truth tables.** - The statement $S \lor \neg S$ is a tautology because it is always true regardless of $S$. - To prove contradiction, choose $S \land \neg S$, which is always false. - Construct truth tables for both to confirm. 3. **Find the expansion of $(2x - y)^4$ using Binomial expansion:** - Use formula: $$(a - b)^n = \sum_{k=0}^n \binom{n}{k} a^{n-k} (-b)^k$$ - Here, $a=2x$, $b=y$, $n=4$. - Calculate each term: $$\binom{4}{k} (2x)^{4-k} (-y)^k$$ for $k=0$ to $4$. - Terms: 1. $\binom{4}{0}(2x)^4 = 1 \times 16x^4 = 16x^4$ 2. $\binom{4}{1}(2x)^3 (-y) = 4 \times 8x^3 \times(-y) = -32x^3 y$ 3. $\binom{4}{2}(2x)^2 (-y)^2 = 6 \times 4x^2 \times y^2 = 24x^2 y^2$ 4. $\binom{4}{3}(2x)^1 (-y)^3 = 4 \times 2x \times (-y)^3 = -8x y^3$ 5. $\binom{4}{4}(2x)^0 (-y)^4 = 1 \times 1 \times y^4 = y^4$ - Summing all: $$16x^4 - 32x^3 y + 24x^2 y^2 - 8x y^3 + y^4$$ 4. **Law of Excluded Middle:** - This law states that for any proposition $P$, $P \lor \neg P$ is always true. - It means every statement is either true or false; there is no third option. 5. **Solve system using Gaussian Elimination:** System: \begin{cases} -2x + 3y - z = -1 \\ x - 2y + z = 3 \\ x + y + z = 2 \\ x + 2y + 3z = 5 \\ 2x + 3y + 4z = 11 \end{cases} - The first two are the first system (a), next three are system (b). For system (a): - Write augmented matrix: $$\begin{bmatrix}-2 & 3 & -1 & | & -1 \\ 1 & -2 & 1 & | & 3 \end{bmatrix}$$ - Multiply second row by 2 and add to first to eliminate $x$. For system (b): - Matrix: $$\begin{bmatrix}1 & 1 & 1 & | & 2 \\ 1 & 2 & 3 & | & 5 \\ 2 & 3 & 4 & | & 11 \end{bmatrix}$$ - Use row operations to achieve upper triangular form and solve by back substitution. 6. **Relation and graph problems:** i. Directed graph for $R = \{(a,b), (b,c), (c,d), (d,b)\}$ on $A=\{a,b,c,d\}$ has edges from $a \to b$, $b \to c$, $c \to d$, and $d \to b$. ii. Transitive closure $R^*$ includes original edges plus edges inferred by paths: - Since $b \to c$, $c \to d$, then $b \to d$. - Since $d \to b$, $b \to c$, $c \to d$, cycles mean $d \to c$, $d \to d$, $b \to b$ etc. 7. **Power set and elements problems:** - $A=\{1,3,5\}$, $B=\{3,4,5\}$ - $A \cup B = \{1,3,4,5\}$ size 4 - Power set $P(A \cup B)$ size is $2^4=16$. - For $A \times B = \{(x,y) | x \in A, y \in B\}$, check elements provided. 8. **Algorithm sum(n):** - It sums $j$ from 1 to $i$ for $i=1$ to $n$. - For $n=4$: - When $i=1$, sum $j=1$: $1$ - $i=2$, sum $1+2=3$ - $i=3$, sum $1+2+3=6$ - $i=4$, sum $1+2+3+4=10$ - Total $s = 1 + 3 + 6 + 10 = 20$. 9. **Chair distribution problem:** - The pigeonhole principle says distributing 50 chairs into $n$ piles means at least one pile has at least $k$ chairs if $50 > n(k-1)$. - Test each pair (n,k): - (100,3): $50 > 100*2=200$ no, false. - (3,15): $50 > 3*14=42$ yes, pile must have at least 15. - (7,8): $50 > 7*7=49$ yes, pile with at least 8. - (51,2): $50 > 51*1=51$ no. - (15,3): $50 > 15*2=30$ yes. 10. **Graph theory applications:** - Network routing (routers and connections) - Social networks (people and friendships) - Computer programs (states and transitions) - Biology (food webs) 11. **Graph Isomorphism:** - Two graphs $G$ and $H$ are isomorphic if there is a bijection between their vertices preserving adjacency. - An illustration would show identical vertex and edge structure despite different labeling. 12. **Graph theory terms:** - Multigraph: multiple edges between same vertices. - Loop: edge from a vertex to itself. - Pseudograph: multigraph allowing loops. - Pendent vertex: vertex connected by exactly one edge. - Degree of a vertex: number of edges incident to it. 13. **Vertices degree problem:** - Sum of all vertex degrees = 2 * number of edges = 2 * 35 = 70. - Known degrees: 4 vertices × 5 = 20 - 5 vertices × 4 = 20 - 4 vertices × 3 = 12 - Sum known = 20 + 20 + 12 = 52 - Remaining degree sum = 70 - 52 = 18 - Let number of vertices with degree 2 be $x$; $$2x = 18 \Rightarrow x = 9$$ 14. **Euler's theorem:** - For connected graph, Eulerian circuit exists if and only if every vertex has even degree. - Proof by induction on edges: - Base case: zero edges, no vertices with odd degree. 15. **Handshake problem:** - Number of handshakes among 6 people is number of edges in complete graph $K_6$: $$\binom{6}{2} = \frac{6 \times 5}{2} = 15$$ 16. **Matrix calculations:** Given: $$A = \begin{bmatrix}2 & -4 \\ 1 & 3\end{bmatrix}, B = \begin{bmatrix}4 & -1 \\ 2 & 0\end{bmatrix}, C = \begin{bmatrix}4 \\ 3\end{bmatrix}, D = \begin{bmatrix}3 & 1\end{bmatrix}, E = \begin{bmatrix}-3 & 2 & 0 \\ 1 & -1 & -2\end{bmatrix}$$ i. $A + B = \begin{bmatrix}2+4 & -4 + (-1) \\ 1 + 2 & 3 + 0\end{bmatrix} = \begin{bmatrix}6 & -5 \\ 3 & 3\end{bmatrix}$ ii. $3B = 3 \times \begin{bmatrix}4 & -1 \\ 2 & 0\end{bmatrix} = \begin{bmatrix}12 & -3 \\ 6 & 0\end{bmatrix}$ iii. $A E$ is $2\times 2$ times $2\times 3$, valid, result $2\times 3$: $$A E = \begin{bmatrix}2 & -4 \\ 1 & 3\end{bmatrix} \begin{bmatrix}-3 & 2 & 0 \\ 1 & -1 & -2\end{bmatrix} = \begin{bmatrix}2*(-3) + (-4)*1 & 2*2 + (-4)*(-1) & 2*0 + (-4)*(-2) \\ 1*(-3) + 3*1 & 1*2 + 3*(-1) & 1*0 + 3*(-2)\end{bmatrix} = \begin{bmatrix}-6 -4 & 4 +4 & 0 +8 \\ -3 +3 & 2 -3 & 0 -6\end{bmatrix} = \begin{bmatrix}-10 & 8 & 8 \\ 0 & -1 & -6\end{bmatrix}$$ iv. $A D$: $2\times 2$ times $1\times 2$ matrix multiplication is undefined due to dimension mismatch. v. $B + D$: adds $2\times 2$ and $1\times 2$ undefined due to dimension mismatch. vi. $B - 2A$: $$2A = \begin{bmatrix}4 & -8 \\ 2 & 6\end{bmatrix}$$ $$B - 2A = \begin{bmatrix}4-4 & -1 - (-8) \\ 2 - 2 & 0 - 6\end{bmatrix} = \begin{bmatrix}0 & 7 \\ 0 & -6\end{bmatrix}$$