Mathematcial Foundations of Computer Science
Mathematcial Foundations of Computer Science
OR
4 a) A total of 1232 students have taken a course in Spanish, 879 have taken a course [7M]
in French, and 114 have taken a course in Russian. Further, 103 have taken
courses in both Spanish and French, 23 have taken courses in both Spanish and
Russian, and 14 have taken courses in both French and Russian. If 2092 students
have taken at least one of Spanish, French, and Russian, how many students have
taken a course in all three languages?
b) Does the following table define a semi group or a monoid? [7M]
* a b c
a c b a
b b c b
c a b c
UNIT-III
5 a) How many permutations of the letters ABCDEFGH contain the string ABC ? [7M]
b) Suppose that a department contains 10 men and 15 women. How many ways are [7M]
there to form a committee with six members if it must have more women than
men?
OR
1 of 3
|''|'||||''|'''|||'|
Code No: R2021054 R20 SET - 1
6 a) Find the prime factorization of each of these integers i) 143, ii) 289 and iii ) 899. [7M]
b) Find the greatest common divisor of 414 and 662 using the Euclidean algorithm. [7M]
UNIT-IV
7 a) Build a generating function for ar, the number of integral solutions to the [7M]
equation e1 + e2 + e3 = r if 0 ≤ ei ≤ 3 for each i .
b) Write an expression for ar which is the coefficient of X r in the following [7M]
1 4 13 9
generating function A ( X ) : − + + .
1 − X 3 ( X + 1) 12 ( X − 2 ) 4 ( 2 + X )
OR
8 a) Solve the following recurrence relation using generating function [7M]
an − 5an −1 + 6an − 2 = 0 for n ≥ 2, a0 = 0 , a1 = −2 .
b) Solve the recurrence relation a − 3a + 2a = 3n . [7M]
n n −1 n−2
UNIT-V
9 a) Find the number of vertices, the number of edges, and the degree of each vertex [7M]
in the given undirected graph. Identify all isolated and pendant vertices.
OR
2 of 3
|''|'||||''|'''|||'|
Code No: R2021054 R20 SET - 1
b) Use Kruskal’s algorithm to find a minimum spanning tree in the weighted graph [7M]
given.
3 of 3
|''|'||||''|'''|||'|
Code No: R2021054 R20 SET - 2
1 of 3
|''|'||||''|'''|||'|
Code No: R2021054 R20 SET - 2
UNIT-III
5 a) How many ways are there to select a first-prize winner, a second-prize winner, [7M]
and a third-prize winner from 100 different people who have entered a contest?
b) Suppose that a department contains 10 men and 15 women. How many ways are [7M]
there to form a committee with six members if it must have the same number of
men and women?
OR
6 a) Find the prime factorization of each of these integers i) 88 , ii) 126 and iii) 729. [7M]
b) Find the greatest common divisor of 123 and 277 using the Euclidean algorithm. [7M]
UNIT-IV
7 a) Build a generating function for ar = the number of integral solutions to the [7M]
equation e1 + e2 + e3 = r if 2 ≤ ei ≤ 5 for each i .
b) Write an expression for ar is the coefficient of X r in the following generating [7M]
8 1
function A ( X ) : 2
+ 3
.
(3 + 2 X ) (5 + X )
OR
8 a) Solve the following recurrence relation using generating function [7M]
an − 3an− 2 + 2an −3 = 0 for n ≥ 3, a0 = 1 , a1 = 0 , a2 = 0 .
b) Solve the recurrence relation [7M]
an − 6an −1 + 8an − 2 = n 4n where a0 = 8 and a1 = 22 .
UNIT-V
9 a) Are the graphs G and H bipartite [7M]
OR
2 of 3
|''|'||||''|'''|||'|
Code No: R2021054 R20 SET - 2
10 a) Use depth-first search to find a spanning tree for the graph G. [7M]
b) Use Prim’s algorithm to find a minimum spanning tree in the graph [7M]
3 of 3
|''|'||||''|'''|||'|
Code No: R2021054 R20 SET - 3
|''|'||||''|'''|||'| 1 of 3
Code No: R2021054 R20 SET - 3
6 a) Determine whether each of these integers is prime i) 97, ii) 111 and iii ) 143. [7M]
b) Find the greatest common divisor of 1001 and 1331 using the Euclidean [7M]
algorithm.
UNIT-IV
7 a) Find a generating function for ar = the number of integral solutions to the [7M]
equation e1 + e2 + e3 = r if 0 < ei for each i .
b) Write an expression for ar is the coefficient of X r in the following generating [7M]
3 7 8
function A ( X ) : 2
− 3
+ .
(1 − X ) (1 − 2 X ) 3 + 2 X
OR
8 a) Solve the following recurrence relation using generating function [7M]
an − 4an− 2 = 0 for n ≥ 2, a0 = 0 , a1 = 1 .
b) Solve the recurrence relation a − 6a + 8a = 3n where a = 3 and a = 7 . [7M]
n n −1 n−2 0 1
UNIT-V
9 a) Find the in-degree and out-degree of each vertex in the graph G with directed [7M]
edges .
OR
2 of 3
|''|'||||''|'''|||'|
Code No: R2021054 R20 SET - 3
10 a) Use breadth-first search to find a spanning tree for the graph. [7M]
b) Use Kruskal’s algorithm to find a minimum spanning tree in the weighted graph. [7M]
3 of 3
|''|'||||''|'''|||'|
Code No: R2021054 R20 SET - 4
UNIT-I
1 a) Construct the truth table of the compound proposition ( p → q ) ↔ (¬ q → ¬ p ). [7M]
b) Translate the given statement into propositional logic using the propositions [7M]
provided. You can graduate only if you have completed the requirements of your
major and you do not owe money to the university and you do not have an overdue
library book. Express your answer in terms of g: “You can graduate,” m: “You
owe money to the university,” r: “You have completed the requirements of your
major,” and b: “You have an overdue library book.”
OR
2 a) Show that ¬ ( p ∨ (¬ p ∧ q )) and ¬ p ∧ ¬ q are logically equivalent. [7M]
b) Show that the premises “A student in this class has not read the book,” and [7M]
“Everyone in this class passed the first exam” imply the conclusion “Someone
who passed the first exam has not read the book.”
UNIT-II
3 a) Prove that if A and B are sets, then A ∪ B = A ∩ B . [7M]
b) Let g be the function from the set {a, b, c} to itself such that g(a) = b, g(b) = c, and [7M]
g(c) = a. Let f be the function from the set {a, b, c} to the set {1, 2, 3} such that f
(a) = 3, f (b) = 2, and f (c) = 1. What is the composition of f and g, and what is the
composition of g and f ?
OR
4 a) In a discrete mathematics class every student is a major in computer science or [7M]
mathematics, or both. The number of students having computer science as a major
(possibly along with mathematics) is 25; the number of students having
mathematics as a major (possibly along with computer science) is 13; and the
number of students majoring in both computer science and mathematics is 8. How
many students are in this class?
b) What is an algebraic system? How to represent it? Give its properties. [7M]
UNIT-III
5 a) How many permutations of the letters ABCDEFGH contain the string ED? [7M]
b) How many ways are there to select five players from a 10-member tennis team to [7M]
make a trip to a match at another school?
OR
1 of 3
|''|'||||''|'''|||'|
Code No: R2021054 R20 SET - 4
6 a) Determine whether each of these integers is prime i) 21 , ii) 29 and iii) 71 . [7M]
b) Find the greatest common divisor of 1000 and 5040 using the Euclidean algorithm. [7M]
UNIT-IV
7 a) Build a generating function for ar = the number of integral solutions to the [7M]
equation e1 + e2 + e3 = r if 0 ≤ ei ≤ 6 and ei is even ; 2 ≤ ei ≤ 7 and ei is odd ;
5 ≤ ei ≤ 7 .
b) Write an expression for ar is the coefficient of X r in the following generating [7M]
1 5 7
function A ( X ) : + + .
1 − X 1 + 2 X (1 − X )5
OR
8 a) Solve the following recurrence relation using generating function [7M]
an − 9an −1 + 20an − 2 = 0 for n ≥ 2, a0 = −3 , a1 = −10 .
b) Solve the recurrence relation an − 6an−1 + 8an − 2 = 9 where a0 = 10 and a1 = 25 . [7M]
UNIT-V
9 a) What are the degrees and what are the neighbourhoods of the vertices in the graphs [7M]
G and H?
OR
2 of 3
|''|'||||''|'''|||'|
Code No: R2021054 R20 SET - 4
10 a) Use depth-first search to find a spanning tree for the graph G. [7M]
b) Use Prim’s algorithm to find a minimum spanning tree in the graph. [7M]
3 of 3
|''|'||||''|'''|||'|