Discrete Structures Exam Questions 2023
Discrete Structures Exam Questions 2023
A tautology is a statement that is always true regardless of truth values of its constituent propositions, such as 'p OR NOT p'. For predicate logic, translate 'Not all employees are loyal' as ∃x (Employee(x) AND ¬Loyal(x)), meaning there exists at least one employee who is not loyal. Transform natural language into logical predicates leveraging quantifiers (existence, universality) alongside logical operators (AND, OR, NOT) to map linguistic assertions to formal logic frameworks, providing clarity and logical processing.
To determine if the function f(x) = x² is injective, we need to check if different inputs always produce different outputs. Since f(a) = f(b) implies a² = b², which leads to a = b or a = -b, the function is not injective unless restricted to non-negative values. For surjectivity, every real number must be an output of the function, but negative numbers are not squares of any real numbers, hence f(x) = x² is not surjective over the reals. Therefore, it is not bijective since being bijective requires both injectivity and surjectivity.
Euler paths exist in a graph if exactly zero or two vertices have an odd degree. An Euler circuit requires all vertices to have even degrees. For a connected graph with Eulerian path, the path will start and end at the vertices with odd degrees. If it has an Euler circuit, it must start and finish at the same vertex. For conditions, use degree parity checks and ensure connectivity (each part must be traversed without lifting the pencil). Edge traversal practicality validates both paths and circuits in line with graph theory.
Kruskal's algorithm finds the Minimum Spanning Tree (MST) by sorting all graph edges by weight, then iteratively adding edges to the MST from the sorted list while avoiding cycles. Start with an acyclic forest, initially separate nodes, and systematically add edges. For each edge addition, use Union-Find for cycle checks, joining disjoint sets only if edges create no cycle. Continue until the MST includes exactly n-1 edges for n vertices, ensuring minimum total weight. Practical application on sort-and-join confirms effective MST derivation using connected acyclic tree sets.
Two graphs are isomorphic if there is a one-to-one correspondence between their vertex sets that preserves the edge connectivity. The necessary conditions include having the same number of vertices, the same number of edges, and the same degree sequence. Additionally, there must be a bijection between vertices of the two graphs such that if there is an edge between any two vertices in one graph, there is a corresponding edge between matching vertices in the other graph. Furthermore, cycles of the same length must exist in both graphs.
To solve x ≡ 0 (mod 2), x ≡ 2 (mod 3), and x ≡ 3 (mod 5) using the Chinese Remainder Theorem, first note that 2, 3, and 5 are pairwise coprime. Compute the product N = 2 × 3 × 5 = 30. Find individual terms: N1 = 15, N2 = 10, N3 = 6 such that Ni ≡ 0(mod mj), where mj are the moduli. Find the corresponding modular inverses M1 = 1, M2 = 1, M3 = 1. Construct x = m1N1M1 + m2N2M2 + m3N3M3 = 0 + 20 + 18 = 38. The solution x ≡ 38 (mod 30) simplifies to x ≡ 8 (mod 30)
The division and remainder algorithm finds q and r such that integer a = dq + r where d is not zero, a = integer, q = quotient, r = remainder, 0 ≤ r < |d|. To express a proposition with integers 0 through 4, consider the set a mod d = r. Proposition ∃x P(x): at least one satisfies P(x). Use disjunctions where conditions hold (e.g., mod = 0), conjunctions for shared properties (e.g., universally true conditions for all x), and negations for conditions equating to 0. Expand decomposed forms with division outcomes for clearer logical expression.
To solve the recurrence relation an = 6an-1 - 9an-2 with initial conditions a0 = 1 and a1 = 6, we start by finding the characteristic equation: r² = 6r - 9, which simplifies to (r-3)² = 0. The repeated root is r = 3. Thus, the general solution is an = (c1 + c2n)3^n. Using the initial conditions, a0 = 3(c1) = 1 gives c1 = 1/3, and a1 = 3(c1 + c2)3 = 6 gives c2 = 1/9. Hence, the specific solution is an = 3^n((1/3) + (1/9)n)
The Extended Euclidean Algorithm finds the greatest common divisor (GCD) by repeatedly applying the division algorithm. Begin by expressing 32 = 24 × 1 + 8, then 24 = 8 × 3 + 0. The remainder sequence reaches zero, terminating the algorithm. The GCD is the non-zero remainder from the last complete division, which is 8. For the extended version, track quotients and remainders through backwards substitution to express 8 as a linear combination of 24 and 32. Solve 8 = 32 - 1×(32 - 1×24) = 1×24 - 1×32. This combination confirms GCD authenticity.
To prove the formula 1³ + 2³ + ... + n³ = (n²(n+1)²)/4 using induction, the base case n=1 gives 1³ = (1²(1+1)²)/4, which is true since both are 1. Assume it holds for n=k, i.e., 1³ + 2³ + ... + k³ = (k²(k+1)²)/4. For n=k+1, show 1³ + 2³ + ... + k³ + (k+1)³ = ((k+1)²(k+2)²)/4. By inductive hypothesis, substitute and simplify the left side and equate it to the right side. Maintaining equality proves the step, confirming the original formula by induction.