Unit 1
1. Disclose the definition proposition with an example.
A proposition is a declarative sentence that is either true or false but not both.
Example: "The sky is blue" is a proposition because it can be either true or false.
2. Define tautology. Explain with an example.
A tautology is a logical statement that is always true, regardless of the truth values of its
components.
Example: P∨¬P (where PPP is a proposition) is a tautology because it's always true,
regardless of the truth value of PPP.
3. Define Well Formed Formula.
A Well-Formed Formula (WFF) is a string of symbols that is grammatically correct
according to the rules of logical syntax.
Example: (P∧Q)→R is a WFF, whereas P∧→Q is not.
4. Without constructing the Truth Table, prove that
Without specific logical expressions or formulas provided, the proof is not possible. A
truth table is typically needed to prove logical equivalencies or validity.
5. Explain logical equivalence with an example.
Logical equivalence occurs when two propositions have the same truth value in every
possible situation.
Example: P→Q is logically equivalent to ¬P∨Q.
6. Translate the statement in symbolic form ‘Some rationales are not reals’.
The statement can be written as:
∃x(R(x)∧¬S(x))
Where R(x)represents "x is a rationale" and S(x) represents "x is a real".
7. Construct a truth table for
Without a specific logical expression provided, it’s not possible to construct a truth
table. The expression needs to be given.
8. List all implications in statement calculus.
The basic implication in propositional calculus is the material conditional, represented
as P→Q, which means "if P then Q".
Other forms of implications include:
• Converse: Q→P
• Inverse: ¬P→¬Q
• Contrapositive: ¬Q→¬P
9. Write the definition of predicate calculus.
Predicate calculus (or first-order logic) extends propositional logic by including
quantifiers and predicates, allowing statements about objects and their properties.
Example: ∀x(P(x)→Q(x)) where P(x) and are predicates.
10. Define Duality law.
The Duality Law in Boolean algebra states that every Boolean expression remains valid if
we swap AND (∧) with OR (∨) and 0 with 1.
Example: The dual of A ∧ B is A ∨B.
Unit 2
1. State Principle of Inclusion-Exclusion for three sets.
The Principle of Inclusion-Exclusion for three sets AAA, BBB, and CCC is given by:
∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣B∩C∣−∣C∩A∣+∣A∩B∩C|
This formula calculates the size of the union of three sets by including the individual
sizes and excluding the overlaps.
2. State Pigeonhole Principle.
The Pigeonhole Principle states that if n objects are placed into mmm containers, where
n>m then at least one container must hold more than one object.
3. Define Composition of Functions.
The composition of two functions f:A→Band g:B→C is a new function g∘f:A→C defined by:
(g∘f)(x)=g(f(x))
for every x∈A
4. Define Relation.
A relation on a set A is a subset of the Cartesian product A×A. It is a set of ordered pairs
where each pair represents a connection between two elements of A.
5. Define symmetric and transitive relation.
• Symmetric Relation: A relation Ron a set A is symmetric if for all a,b∈A,
whenever (a,b)∈R, it follows that (b,a)∈R.
• Transitive Relation: A relation Ron a set A is transitive if for all a,b,c∈A,
whenever (a,b)∈R and (b,c)∈R, it follows that (a,c)∈R.
6. Define equivalence relation.
An equivalence relation on a set AAA is a relation that is reflexive, symmetric, and
transitive.
• Reflexive: For every a∈Aa \in Aa∈A, (a,a)∈R(a, a) \in R(a,a)∈R.
• Symmetric: If (a,b)∈R(a, b) \in R(a,b)∈R, then (b,a)∈R(b, a) \in R(b,a)∈R.
• Transitive: If (a,b)∈R(a, b) \in R(a,b)∈R and (b,c)∈R(b, c) \in R(b,c)∈R, then
(a,c)∈R(a, c) \in R(a,c)∈R.
7. Define POSET.
A Partially Ordered Set (POSET) is a set P equipped with a binary relation ≤ that is
reflexive, antisymmetric, and transitive. That is, for all a,b,c∈P
• Reflexive: a≤a
• Antisymmetric: If a≤b and b≤a , then a=b
• Transitive: If a≤b and b≤c, then a≤c
8. Discuss about finite and infinite sets.
• Finite Set: A set is finite if it contains a specific, countable number of elements.
For example, {1,2,3} is finite.
• Infinite Set: A set is infinite if it contains an uncountably infinite number of
elements. For example, N (the set of natural numbers) is infinite.
9. Write about lattice.
A lattice is a partially ordered set (POSET) in which every pair of elements has both a
supremum (least upper bound) and an infimum (greatest lower bound). In a lattice, for
any two elements a and b both a∨b (join) and a∧b (meet) exist.
10. Show that A∪B=A∩B.
This is incorrect as stated. The union A∪B represents all elements in either A or B, while
the intersection A∩B represents only the elements common to both sets. Thus,
A∪B≠A∩B in general.
1. Write Newton’s identity and Pascal identity.
• Newton’s Identity:
Newton's identities relate the power sums of the roots of a polynomial to its
coefficients. They are used to express elementary symmetric polynomials in
terms of power sums. For example, for a cubic polynomial, the identities give
relations between the sums of the powers of the roots and the coefficients.
• Pascal’s Identity:
Pascal’s identity states that for non-negative integers n and k,
( ) ( ) ( )
N = n-1 + n-1
K k-1 k
( ) ( ) ( )
This identity is useful in combinatorics and can be visualized in Pascal's Triangle.
2. What is Homogeneous recurrence relation?
A homogeneous recurrence relation is one in which every term is a linear combination
of previous terms, and there are no constant or non-homogeneous terms.
Example:
an=3an−1−2an−2
Here, the relation is homogeneous because it involves only terms of an and no
constants.
3. Write the second order linear homogeneous recurrence relation and its auxiliary
equation.
A second-order linear homogeneous recurrence relation has the form:
an=pan−1+qan−2
The corresponding auxiliary equation is:
r2−pr−q=0
This quadratic equation helps solve the recurrence relation.
4. Define sum rule.
The sum rule in combinatorics states that if one event can occur in mm ways and a
second event can occur in n ways, and the two events are mutually exclusive, then there
are m+n ways for either event to occur.
Example: If there are 3 ways to choose a red shirt and 4 ways to choose a blue shirt,
there are 3 + 4 = 7 ways to choose one shirt.
5. Define permutation and combination.
• Permutation: A permutation is an arrangement of objects in a specific order. The
number of permutations of nn distinct objects taken rr at a time is given by:
P(n,r)=n!/(n−r)!
• Combination: A combination is a selection of objects where the order does not
matter. The number of combinations of nn objects taken rr at a time is given by:
C(n,r)=n/!r!(n−r)
6. State Principle of Inclusion-Exclusion for three sets.
The Principle of Inclusion-Exclusion for three sets AA, BB, and CC is:
∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣B∩C∣−∣C∩A∣+∣A∩B∩C∣
This principle helps in calculating the cardinality of the union of three sets by adjusting
for overlapping areas.
7. State Pigeonhole Principle.
The Pigeonhole Principle states that if nn items are put into mm containers, with n>m,
then at least one container must contain more than one item.
Example: If 11 people are sitting in 10 chairs, at least one chair must have more than
one person.
8. Determine the number of terms in the expression (x−7y+3z−w)25(x - 7y + 3z -
w)^{25}.
The number of terms in the expansion of a multinomial expression (x+y+z+w)25(x + y + z
+ w)^{25} is given by the formula:
(25+4−1 )= (28) = 3276
( 4−1 ) (3)
So, there are 3276 terms in the expansion of (x−7y+3z−w)25(x - 7y + 3z - w)^{25}.
9. Explain generating function.
A generating function is a formal power series whose coefficients encode information
about a sequence. For a sequence an the generating function is:
G(x)=a0+a1x+a2x2+a3x3+…
Generating functions are useful in combinatorics for solving recurrence relations and
counting problems.
10. Write the auxiliary equation for the recurrence relation an=3an−1+2an−2.
For the recurrence relation an=3an−1+2an−2 the auxiliary equation is obtained by
replacing an with rn , yielding:
r2−3r−2=0
This quadratic equation can be solved to find the characteristic roots of the recurrence
relation.
Unit 4
1. Write the statement of Handshaking theorem.
The Handshaking Theorem states that in any undirected graph, the sum of the degrees
of all the vertices is twice the number of edges. In other words,
∑(degrees of all vertices)=2×(number of edges)
This is because each edge contributes to the degree of two vertices.
2. Write the types of graphs.
The main types of graphs are:
• Undirected Graph: A graph in which edges have no direction.
• Directed Graph (Digraph): A graph in which edges have a direction (represented
by arrows).
• Weighted Graph: A graph in which each edge has a weight or cost associated
with it.
• Complete Graph: A graph in which every pair of vertices is connected by an
edge.
• Bipartite Graph: A graph whose vertex set can be divided into two disjoint sets
such that every edge connects a vertex from one set to the other.
3. Explain Eulerian graph with example.
An Eulerian graph is a graph in which there exists a path (called an Eulerian path) that
visits every edge exactly once. If an Eulerian path exists and starts and ends at the same
vertex, it is called an Eulerian circuit.
• Condition for Eulerian graph: A connected graph has an Eulerian circuit if and
only if every vertex has an even degree.
• Example: A square with edges connecting all four corners is an Eulerian graph
because all vertices have an even degree (degree 2).
4. Define Hamiltonian path and cycle.
• Hamiltonian Path: A path in a graph that visits every vertex exactly once.
• Hamiltonian Cycle: A cycle (closed path) in a graph that visits every vertex
exactly once and returns to the starting vertex.
5. What is in degree and out degree of a graph?
• In-degree: The number of edges coming into a vertex in a directed graph.
• Out-degree: The number of edges leaving a vertex in a directed graph.
6. Define Homographic.
A homograph in graph theory refers to two graphs that are equivalent in structure,
meaning that there is a one-to-one correspondence between their vertices and edges,
but they may be represented differently.
7. Define directed graph with example.
A directed graph (or digraph) is a graph in which the edges have a direction, indicated
by arrows. The edges represent a one-way relationship between the vertices.
• Example: A directed graph representing a social media network, where the
directed edge from vertex A to vertex B indicates that user A follows user B.
8. What is Isomorphic graph?
Two graphs are isomorphic if there is a one-to-one correspondence between their
vertices and edges such that the adjacency relationships are preserved. In other words,
one graph can be transformed into the other by re-labeling the vertices.
9. Differentiate between Eulerian graph and Hamiltonian graph.
• Eulerian Graph: A graph that has an Eulerian path (or circuit), i.e., a path that
visits every edge exactly once. For a graph to be Eulerian, all vertices must have
an even degree, and the graph must be connected.
• Hamiltonian Graph: A graph that has a Hamiltonian path or cycle, i.e., a path
that visits every vertex exactly once. There are no simple conditions like for
Eulerian graphs, and finding a Hamiltonian path is generally harder.
10. What is sub graph?
A subgraph of a graph is a graph that consists of a subset of the vertices and edges of
the original graph. If the subgraph is formed by deleting some vertices and edges from
the original graph, the remaining edges must be those that connect the remaining
vertices in the original graph.
Unit-5
1. Define Binary tree with example.
A binary tree is a tree data structure where each node has at most two children,
commonly referred to as the left and right child.
Example:
/\
2 3
/\
4 5
In this binary tree, node 1 is the root, with nodes 2 and 3 as its children. Node 2 has two
children, 4 and 5.
2. Define Bipartite graph with example.
A bipartite graph is a graph whose vertices can be divided into two disjoint sets such
that no two graph vertices within the same set are adjacent.
Example:
In a graph representing relationships between students and courses, one set represents
students, and the other set represents courses. An edge connects a student to a course
if they are enrolled in that course.
3. Define Spanning tree with example.
A spanning tree of a graph is a subgraph that includes all the vertices of the original
graph and is a tree (i.e., connected and has no cycles).
Example:
For a graph with vertices A,B,C,D and edges AB,AC,AD,BC,BD, a spanning tree could
include the edges AB,AC,AD, forming a tree that connects all vertices without any cycles
4. State Euler's formula for planar graph.
Euler’s formula for a planar graph states that for any connected planar graph,
V−E+F=2
where V is the number of vertices, E is the number of edges, and F is the number of
faces (including the outer region).
5. Define Chromatic number.
The chromatic number of a graph is the smallest number of colors needed to color the
vertices of the graph such that no two adjacent vertices share the same color.
Example:
In a triangle graph, the chromatic number is 3 because each vertex must be a different
color.
6. Define Spanning tree.
A spanning tree of a graph is a subgraph that connects all the vertices in the graph with
the minimum number of edges and no cycles.
Example:
For a graph with vertices A,B,C,D a spanning tree could include the edges AB,BC,CD
7. Define Rank and Nullity.
• Rank: The rank of a matrix (or graph) is the dimension of the row or column
space, i.e., the maximum number of linearly independent rows or columns. In
graph theory, it can refer to the rank of the adjacency matrix.
• Nullity: The nullity of a matrix is the dimension of the null space, or the number
of linearly independent solutions to the equation Ax=0 In graphs, nullity often
refers to the number of components that are disconnected.
8. Differentiate Prim’s and Kruskal’s algorithm.
• Prim’s Algorithm: Builds the Minimum Spanning Tree (MST) by starting from a
vertex and adding the shortest edge that connects a new vertex to the tree.
• Kruskal’s Algorithm: Builds the MST by sorting all the edges in increasing order
and adding edges to the tree if they do not form a cycle.
9. What is Minimal Spanning Tree?
A minimal spanning tree (MST) is a spanning tree of a graph with the minimum possible
total edge weight. This ensures that all vertices are connected with the least cost or
weight.
10. Define Minimally connected Graph.
A minimally connected graph is a graph that is connected, and if any edge is removed,
the graph becomes disconnected. In other words, every edge is necessary for the graph
to remain connected. A tree is an example of a minimally connected graph.