Discrete Mathematics Exam Notes
Discrete Mathematics Notes
Section A: Objective Questions
Two lattices and are isomorphic if there is a bijection from to . So the answer is (b).
POSET is denoted by . So the correct answer is (b) (S, < ).
In Boolean algebra, . So the answer is (b) .
A complete undirected graph with nodes can have a maximum of spanning trees. So the answer is (c) .
In a 7-node directed cyclic graph, the number of Hamiltonian cycles is to be determined. This is more complex and requires graph theory knowledge. Without further context on graph structure, a precise number is hard, but (d) 260 seems the closest reasonable answer given the options.
For the recurrence relation with , we need to find . Let's iterate:
So the answer is (c) 141.
Section B: Short Answer Questions
(a) Hasse Diagram for subsets of with inclusion relation :
The subsets are: . A Hasse diagram would show these sets with upward edges indicating inclusion (subset) relation. Omitted here due to markdown.(b) Prove that a finite non-empty POSET has at least one minimal and one maximal element:
In a finite POSET, since the set is finite, any chain must also be finite. If we start at any element , if it's not minimal, there exists such that and . We can repeat this, but since is finite, we must eventually reach a minimal element. A similar argument applies to maximal elements.(c) Let and be the divisibility relation on . Show that is a POSET but not a lattice:
- POSET: Divisibility is reflexive (a | a), antisymmetric (if a | b and b | a, then a = b), and transitive (if a | b and b | c, then a | c). Hence, it's a POSET.
- Not a Lattice: Consider the elements 2 and 3. Their least upper bound (LUB) would be the smallest number divisible by both, which is 6 (present in A). However, their greatest lower bound (GLB) would be the largest number that divides both, which is 1 (not in A). Also, consider 4 and 6, GLB(4,6) = 2(present in A). LUB(4,6) = 12 ( not in A). Since not every pair has both a LUB and GLB within A, it's not a lattice.
(a) Logic circuit for :
First, simplify the expression:
The logic circuit can be created directly from the simplified boolean expression using AND, OR and NOT gates.(b) Convert to Conjunctive Normal Form (CNF):
The CNF is .(c) Define logic gates with truth tables:
- AND: Output is 1 only if all inputs are 1.
- OR: Output is 1 if at least one input is 1.
- NOT: Output is the inverse of the input.
- XOR: Output is 1 if inputs are different.
- NAND: Output is the inverse of AND.
- NOR: Output is the inverse of OR.
(a) Show that a complete graph with five vertices () is not a planar graph: A graph is planar if it can be drawn on a plane without any edges crossing. has 5 vertices and edges. According to Kuratowski's theorem, a graph is non-planar if and only if it contains a subgraph that is a subdivision of or . Since itself exists as as subgraph of , it is non-planar.
(b) Show that a simple graph with n vertices has a maximum of edges:
In a simple graph, each vertex can be connected to every other vertex, but not itself, and there's at most one edge between any two vertices. So each of the vertices can connect to other vertices. This gives potential connections, but since each edge connects two vertices, we divide by 2 to avoid double counting. Thus, the maximum number of edges is .(c) Explain Euler graph and Hamiltonian path with examples:
- Euler Graph: A graph that has an Euler circuit, which is a path that visits every edge exactly once and returns to the starting vertex. A connected graph has an Euler circuit if and only if every vertex has even degree. Example: A square graph (4 vertices, 4 edges forming a square).
- Hamiltonian Path: A path that visits every vertex exactly once. It doesn't necessarily have to return to the starting vertex (Hamiltonian Cycle). Example: In a complete graph, there's always a Hamiltonian path.
(a) Adjacency and Incidence Matrix for the directed graph:
Adjacency Matrix: A matrix where entry (i, j) is 1 if there is an edge from vertex i to vertex j, and 0 otherwise.
Incidence Matrix: A matrix where entry (i, j) is 1 if vertex i is incident to edge j, -1 for the target vertex of the directed edge, and 0 otherwise.(b) Define Planar graph and show that G is a planner graph:
A planar graph is a graph that can be drawn on a plane without any edges crossing. To show that G is a planar graph, you'd either need to redraw it without crossings or demonstrate that it satisfies Euler's formula for planar graphs: where is the number of vertices, is the number of edges, and is the number of faces.(c) Define Rank and Nullity of a graph:
- Rank: The number of vertices minus the number of connected components in the graph. If has vertices and connected components, then rank(G) = .
- Nullity: The number of edges minus the rank of the graph. If has edges, then nullity(G) = .
(a) Find the generating function for the numeric sequence 2, 6, 18, 54, 162, …:
This is a geometric sequence with first term and common ratio . The generating function is:
Since for |r| < 1,
.(b) Define Recurrence Relation and its partial conditions with an example:
Recurrence Relation: An equation that defines a sequence recursively. Each term is defined as a function of preceding terms.
Partial Condition: Also known as initial conditions, these are necessary to fully define the sequence. They provide starting values for the recurrence relation.
Example: Fibonacci sequence: , with initial conditions and .(c) Solve the recurrence relation for with initial conditions and : The characteristic equation is , which factors as . So the roots are and . The general solution is .
Using the initial conditions:- Solving the system of equations: Therefore, .
Section C: Long Answer Questions
Define Generating Function and solve for , with , :
- Generating Function: A power series representation of a sequence.
- To solve the recurrence, let . Multiply the recurrence by and sum from to .
After substitution and simplification using initial conditions, the generating function comes out to be . Solving partial fractions, and comparing the coefficeint, you will find the general form of .
Determine PCNF (Product of Conjunctive Normal Forms) and PDNF (Sum of Minterms/Disjunctive Normal Form) for the given Boolean function:
To find PCNF and PDNF. you need the truth table for the boolean expression M. Then, PCNF can be derived by taking the product of maxterms (rows where M=0), and PDNF is the sum of minterms (rows where M=1).Dijkstra's Algorithm to find the shortest path from A to I:
Dijkstra's algorithm is used to find the shortest path in a weighted graph. The algorithm maintains a set of visited nodes and a distance estimate for each node. Starting from A, it iteratively visits the unvisited node with the smallest distance estimate, updates the distances of its neighbors, and repeats until I is reached. Note: The actual working of the algorithm and shortest path requires applying Dijkstra's algorithm on the graph. So you perform Dijkstra's algorithm, noting visited nodes and update the edge with the smallest distance to I. (Implementation is omitted)Kruskal's and Prim's Algorithms for Minimal Spanning Tree:
- Kruskal's Algorithm: Sort all edges by weight and iteratively add the smallest edge that doesn't create a cycle.
- Prim's Algorithm: Start with a single vertex and iteratively add the smallest edge that connects the current tree to a new vertex. (Implementation is omitted)
Define Equivalence Relation and show that R is an equivalence relation. Draw the graph of R:
Let and .Equivalence Relation: A relation that is reflexive, symmetric, and transitive.
- Reflexive: For all , (since is divisible by 3).
- Symmetric: If , then (if is divisible by 3, then is also divisible by 3).
- Transitive: If and , then (if and are divisible by 3, then is also divisible by 3).
Therefore, R is an equivalence relation.
Graph of R: The graph would have vertices 1 to 7. There's an edge between and if . That is the following edges are present