পরীক্ষা আর্কাইভ

৪৯তম বিসিএস ⎯ তথ্য ও যোগাযোগ প্রযুক্তি [২৮১]

পরীক্ষা৪৯তম বিসিএস ⎯ তথ্য ও যোগাযোগ প্রযুক্তি [২৮১]তারিখতারিখ অনির্ধারিতসময়34 minutes
মোট প্রশ্ন৪৯
সিলেবাস
Exam 14 Discrete Mathematics, Theory of Computation and Basic Graph Theory — Mathematical reasoning, Algebraic structures, Graphs. Theory of Computation, Finite automata, Turing Machines. [Source: Class-12 and relevant books]
ঘনত্ব
উত্তর
উত্তরিতবর্তমানপুনরায় দেখুনঅসম্পূর্ণ

৪৯তম বিসিএস ⎯ তথ্য ও যোগাযোগ প্রযুক্তি [২৮১]

৪৯তম বিসিএস ⎯ তথ্য ও যোগাযোগ প্রযুক্তি [২৮১] · তারিখ অনির্ধারিত · ৪৯ প্রশ্ন

.
Which of the following is a valid function from set A = {1,2,3} to B = {a,b} ?
  1. f = {(1,a),(2,a),(3,b)}
  2. f = {(1,a),(2,b),(2,a)}
  3. f = {(1,a),(2,a),(3,a),(4,b)}
  4. f = {(1,a),(2,b),(3,c)}
ব্যাখ্যা

A function from a set A (domain) to a set B (codomain) must satisfy two conditions:

Every element of set A must have an image in set B. 

That means for each element of A, there must be exactly one ordered pair (a,b) where a∈A and b∈B.

No element of A can be mapped to more than one element of B.
That means if (a,b1) and (a,b2) both exist, then b1=b2.

Now, f={(1,a),(2,a),(3,b)}
• Each element of A={1,2,3} appears once only.
• All are mapped to elements in B={a,b}.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen.

.
Let R = {(1,1),(2,2),(3,3)} on A = {1,2,3}. Which properties does R satisfy ?
  1. Reflexive only
  2. Symmetric only
  3. Reflexive, symmetric, and transitive
  4. Transitive only
ব্যাখ্যা

Check Reflexivity:
A relation R on A is reflexive if for every a∈A, (a,a)∈R.

Here, 
A={1,2,3}.
R contains (1,1),(2,2),(3,3).
All reflexive pairs are present.
So, R is reflexive.

Check Symmetry:
A relation R is symmetric if whenever (a,b)∈R, then (b,a)∈R.
In R, only pairs of the form (a,a) exist.

For example, 
(1,1) implies (1,1) (already in R).
Symmetry holds trivially because no cross pairs exist.
So,R is symmetric.

Check Transitivity:
A relation R is transitive if whenever (a,b)∈R and (b,c)∈R, then (a,c)∈R.
Example: 
(1,1) and (1,1) give (1,1) which is in R.

Similarly, 
(2,2) and (2,2) give (2,2).
(3,3) and (3,3) give (3,3).
All transitive conditions are satisfied.
So, R is transitive.

Final R is Reflexive, symmetric, and transitive

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

.
Which of the following languages is regular?
  1. L = {a^n b^n | n ≥ 0}
  2.  L = {a^n b^m | n,m ≥ 0}
  3. L = {ww | w ∈ {0,1}*}
  4. L = {a^p | p is prime}
ব্যাখ্যা

A regular language is one that can be expressed using a regular expression or recognized by a finite automaton (DFA/NFA).
Finite automata have no memory beyond their finite states, so they cannot “count” arbitrarily.

Example:
Strings: ε, a, b, aa, ab, aab → all accepted

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

.
Which of the following can be accepted by a DFA ?
  1. Strings over {0,1} with even number of 0s
  2. L = {a^n b^n | n ≥ 0}
  3. Palindromes over {0,1}
  4. {a^p | p is prime}
ব্যাখ্যা

• DFA can maintain finite state count, e.g., even/odd parity
• Other languages require unbounded memory → not DFA-recognizable

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

.
If a language can be accepted by a Pushdown Automaton (PDA), it is:
  1. Regular
  2. Context-Free
  3. Context-Sensitive
  4. Recursive
ব্যাখ্যা

A Pushdown Automaton (PDA) is exactly the machine model for context-free languages (CFLs).
• NPDA ⇔ Context-Free Grammar (CFG): Every language accepted by a (non-deterministic) PDA is context-free, and every context-free language can be generated by a CFG and accepted by some PDA.
• Deterministic PDAs (DPDA) accept a strict subset called deterministic CFLs (DCFLs).

Example:
L = {a^n b^n | n ≥ 0} → context-free, accepted by PDA

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

.
Which of the following defines a tree?
  1. Connected graph with n vertices and n edges
  2. Connected graph with n vertices, n-1 edges, no cycles
  3. Graph with cycles only
  4. Graph with n vertices and n+1 edges
ব্যাখ্যা

For a finite simple graph G with n≥1 vertices, the following are equivalent and define a tree:
i. Connected and acyclic.
ii. Connected with exactly n−1 edges.
iii. Acyclic with exactly n−1 edges.
iv. Minimal connected: removing any edge disconnects it.
v. Maximal acyclic: adding any edge creates exactly one cycle.

States (2)+(acyclic), which is a standard definition.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

.
A connected graph has all vertices of even degree. What can we conclude?
  1. It has an Eulerian circuit
  2. It has a Hamiltonian circuit
  3. It is a tree
  4. It is bipartite
ব্যাখ্যা

Euler’s Theorem: A connected graph has an Eulerian circuit (a closed walk using every edge exactly once) iff every vertex has even degree.
Here, all degrees are even ⇒ the graph is Eulerian ⇒ (a) is true.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

.
The number of edges in a complete graph with n vertices (K_n) is:
  1. n
  2. 2n
  3. n(n+1)/2
  4. n(n-1)/2
ব্যাখ্যা

In a complete graph Kn, every pair of distinct vertices is connected by exactly one edge.
• The number of unordered pairs of n vertices is n(n−1).
• Equivalently (Handshaking Lemma): each vertex has degree n−1, so ∑degrees=n(n−1)=2∣E∣ ⇒ ∣E∣= n(n−1)/ 2. 

Example:
K1: 0 edges (1.0/2 = 0)
K2:1 edge  (2.1/2 = 1)
K3: 3 edges  (3.2/2 = 3)
K4: 6 edges (4.3/2 = 6)

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

.
Which of the following is a valid grammar for generating the language {an bn | n ≥ 0}?
  1. S → aSb | ε
  2. S → aS | bS | ε
  3. S → aSb | ab
  4. S → aSb | aS
ব্যাখ্যা

This grammar generates strings where the number of 'a's is equal to the number of 'b's. The production S → aSb adds an 'a' at the beginning and a 'b' at the end, maintaining the balance. The production S → ε allows the empty string, which corresponds to the case where there are zero 'a's and zero 'b's.

Example:
• If n = 1, the grammar generates ab.
• If n = 2, the grammar generates aabb.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

১০.
What is the pumping lemma used to prove in the context of formal languages?
  1. That every regular language is context-free.
  2. That every context-free language is regular.
  3. That a language is regular.
  4. That a language is not regular.
ব্যাখ্যা

The pumping lemma for regular languages is used to prove that certain languages are not regular. The pumping lemma states that for any regular language, there exists a pumping length such that strings longer than this length can be "pumped" (i.e., parts of the string can be repeated) without leaving the language. If no such pumping length can be found, the language is not regular.

Example:
The language {a^n b^n | n ≥ 0} is not regular, and the pumping lemma can be used to prove this.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

১১.
Which of the following sets is an example of a power set?
  1. The set of all even numbers.
  2. The set of all subsets of a set.
  3. The set of all natural numbers.
  4. The set of prime numbers.
ব্যাখ্যা

The power set of a set S, denoted P(S), is the set of all subsets of S, including the empty set and S itself. If S = {1, 2}, then the power set P(S) = {∅, {1}, {2}, {1, 2}}.

Example:
If S = {a, b}, then P(S) = {∅, {a}, {b}, {a, b}}.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

১২.
Which of the following represents the intersection of two sets A and B?
  1. The set of elements that are in either A or B.
  2. The set of elements that are in both A and B.
  3. The set of elements that are in A but not in B.
  4. The set of elements that are in neither A nor B.
ব্যাখ্যা

The intersection of two sets A and B, denoted by A ∩ B, consists of all elements that are common to both sets. In other words, it includes only the elements that appear in both sets.

Example:
Let A = {1, 2, 3} and B = {3, 4, 5}.
Then, A ∩ B = {3}.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

১৩.
What is the cardinality of a set?
  1. The number of subsets of the set.
  2. The number of elements in the set.
  3. The number of distinct elements in the power set.
  4. The largest element in the set.
ব্যাখ্যা

The cardinality of a set, denoted |A|, is the number of elements in the set. It indicates the size or volume of the set.
If A = {1, 2, 3}, then the cardinality of A is |A| = 3.

Example:
For the set A = {a, b, c}, the cardinality |A| = 3.

Source: Discrete Mathematics with Applications by Susanna S. Epp.

১৪.
If A = {1, 2, 3} and B = {2, 3, 4}, what is A ∪ B?
  1. {1, 2, 3, 4}
  2. {2, 3}
  3. {1, 2, 3}
  4. {1, 2, 3, 4, 5}
ব্যাখ্যা

The union of sets A and B, denoted A ∪ B, includes all elements that are in either A, B, or both. In this case, the union of A = {1, 2, 3} and B = {2, 3, 4} results in {1, 2, 3, 4}.

Example:
A = {1, 2, 3}
B = {2, 3, 4}
A ∪ B = {1, 2, 3, 4}

Source: Discrete Mathematics and Its Applications by Kenneth H. Rosen

১৫.
Which of the following relations on the set of integers is symmetric but not transitive?
  1. The "is equal to" relation.
  2. The "is divisible by" relation.
  3. The "is a friend of" relation.
  4. The "is congruent modulo 3" relation.
ব্যাখ্যা

A relation is symmetric if, for every pair (a, b) in the relation, (b, a) is also in the relation. However, it is not necessarily transitive.

Example:
if person A is a friend of person B, and person B is a friend of person C, it doesn't necessarily mean that person A is a friend of person C, so the relation "is a friend of" is symmetric but not transitive.

Source: Discrete Mathematics with Applications by Susanna S. Epp.

১৬.
What is the domain and codomain of the function f(x)=x2 ?
  1. Domain: R, Codomain: R+
  2. Domain: R+, Codomain: R
  3. Domain: R, Codomain: R
  4. Domain: R+, Codomain: R+
ব্যাখ্যা

The function f(x)=x2 is defined for all real numbers, so its domain is R (the set of all real numbers).
For the codomain, f(x)=x2 produces real values, including both positive numbers and zero (i.e., f(x)≥0). However, the function is commonly considered to have the codomain as the set of all real numbers R, since it can output any real number, even though only non-negative numbers are produced for real inputs.

Example:
f(2) = 4, f(-2) = 4; both are real numbers, so the codomain is R.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

১৭.
Which of the following is the correct representation of a negation of the proposition "If it rains, then the ground is wet"?
  1. If it does not rain, then the ground is not wet.
  2. The ground is wet, but it does not rain.
  3. It does not rain, and the ground is not wet.
  4. It rains, and the ground is not wet.
ব্যাখ্যা

The statement "If it rains, then the ground is wet" is a conditional statement, represented as P → Q where P is "it rains" and Q is "the ground is wet." The negation of a conditional statement P → Q is P ∧ ¬Q

Example:
If P = "It rains" and Q = "The ground is wet", the negation is P ∧ ¬Q, which means "It rains, and the ground is not wet."

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

১৮.
Which of the following is a tautology?
  1. P∧¬P
  2. P∨¬P
  3. P→¬P
  4. ¬P→P
ব্যাখ্যা

A tautology is a logical expression that is always true. The expression P∨¬P is a tautology because it states that either P is true, or P is not true, which covers all possible cases. This is always true, regardless of the truth value of P.

Example:
If P is true, then P∨¬P is true.
If P is false, then ¬P is true, and thus P∨¬P is still true.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

১৯.
What is the base case for proving the formula 1+2+3+⋯+n= n(n+1)/2 by induction?
  1. n=0
  2. n=1
  3. n=2
  4. n=3
ব্যাখ্যা

In mathematical induction, we begin by proving the statement for n = 1. For this problem, we check if the formula holds when n = 1: 
 n(n+1)/2 = 1(1+1)/2 =1
Since both sides are equal, the base case holds.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

২০.
Which of the following is an example of a statement that can be proven by induction?
  1. The sum of the first n odd numbers is n2
  2. The sum of the first n even numbers is 2n
  3. The product of the first n numbers is n!
  4. All of the above
ব্যাখ্যা

Each of the statements listed can be proven using mathematical induction:
  i. The sum of the first n odd numbers is n2.
  ii. The sum of the first n even numbers is 2n.
  iii. The product of the first n numbers is n!.

These are typical examples where induction can be applied.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

২১.
Which of the following best describes proof by contradiction?
  1. Assuming the statement is true and proving it directly
  2. Assuming the statement is false and deriving a contradiction
  3. Using examples to verify the statement
  4. Using induction to prove the statement
ব্যাখ্যা

In a proof by contradiction, we assume that the statement we want to prove is false. If this assumption leads to a logical contradiction (something known to be false or impossible), then the original statement must be true.

Example:
Prove that √2 is irrational.
Assume √2 is rational → can be expressed as p/q in lowest terms → leads to contradiction that both p and q are even. Therefore, √2 is irrational.

Source: Discrete Mathematics and Its Applications by Kenneth H. Rosen

২২.
Which of the following is an example of a statement that can be proven by contradiction?
  1. The sum of two even numbers is even
  2. There is no largest prime number
  3. 2 + 2 = 4
  4. The sum of the first n natural numbers is n(n+1)/2
ব্যাখ্যা

Proof by contradiction is a proof technique where you assume the opposite of the statement you want to prove, and show that this assumption leads to a contradiction, thereby proving the original statement.

Assume the opposite: there exists a largest prime p. Consider N=p1p2…pn+1. 
N is not divisible by any primes in the list → contradiction. Hence, there is no largest prime.

To prove "There is no largest prime number" by contradiction, you assume the opposite, that there is a largest prime number. Then, you can derive a contradiction by constructing a number that cannot be divisible by any prime number, showing that your assumption is false

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

২৩.
In recursion, what is the essential component that ensures termination?
  1. Recursive case only
  2. Base case
  3. Infinite loop
  4. Step case
ব্যাখ্যা

Recursion defines a function in terms of itself. To prevent infinite recursion, there must be a base case that terminates the recursion. The base case provides the simplest instance of the problem, for which the answer is known directly.

Source: Discrete Mathematics with Applications by Susanna S. Epp.

২৪.
Consider the recursive definition: a0 = 1, an = 3an−1 + 2 for n≥1. What is a2 ?
  1. 85
  2. 11
  3. 5
  4. 17
ব্যাখ্যা

Considering the recursive formula,
i.  a0=1,
ii.  an=3an−1 + 2 for n≥1
Now, using the recursive formula when n=1,
 a= 3a1−1 + 2 
= 3a0 + 2
= 3 × 1 + 2  [ a0 = 1]
= 3 +2
= 5
∴ a1 = 5

Again using the recursive formula when n=2,
a2 = 3a2-1 + 2
= 3a1 + 2 
= 3  × 5 + 2
= 15+2
= 17
∴ a2 = 17

The answer is 17.

Source: Discrete Mathematics with Applications by Susanna S. Epp.

২৫.
How many ways can you arrange the letters of the word "COMPUTER"?
  1. 6,628,800
  2. 1260
  3. 5040
  4. 3,628,800
ব্যাখ্যা

The number of ways to arrange the letters of the word "COMPUTER" can be calculated as the factorial of the number of letters.
Since "COMPUTER" has 8 distinct letters, the number of arrangements is 8!=8×7×6×5×4×3×2×1=3628800.

Example:
For the word "BOOK", there are 4 letters, and since "O" repeats, the formula is:
Number of arrangements = 4! / 2! = 24/2 =12.

Source: Discrete Mathematics & Its Applications (Eighth Edition) by Kenneth H. Rosen

২৬.
How many ways are there to select 3 students from a group of 10 students?
  1. 120
  2. 740
  3. 30
  4. 90
ব্যাখ্যা

This is a combination problem, as the order of selection doesn't matter. The number of ways to select 3 students from 10 is given by:
10! /{3!(10−3)!}= 10! /(3! × 7!) = (10×9×8)/(3×2×1)  =120.

Source: Discrete Mathematics and Its Applications by Kenneth H. Rosen.

২৭.
How many different ways can 5 people sit in a row of 5 chairs?
  1. 120
  2. 740
  3. 25
  4. 50
ব্যাখ্যা

The number of ways to arrange n distinct people in n chairs is given by the factorial of n, i.e.
5!=5×4×3×2×1=120.

Example:
If you have 3 people, the number of ways to arrange them in 3 chairs is: 
3!=3×2×1=6.

Source: Discrete Mathematics with Applications by Susanna S. Epp.

২৮.
In how many ways can a committee of 3 people be selected from a group of 8 men and 6 women, if the committee must have at least one woman?
  1. 120
  2. 740
  3. 260
  4. 150
ব্যাখ্যা

First, find the total number of ways to select a committee of 3 people from 14 individuals (8 men + 6 women) without any restriction:
14!/ {3! × (14-3)!} = (14×13×12​)/(3×2×1)=364.

Then, subtract the number of ways to select a committee with no women (only men). This is the number of ways to choose 3 men from 8:
8!/ {3! × (8-3)!} = (8×7×6​)/(3×2×1)=56.

Therefore, the number of ways to select a committee with at least one woman is:
364−56=260.
The answer is 260

Source: Discrete Mathematics & Its Applications (8th Edi.) by Kenneth H. Rosen

২৯.
How many different 3-digit numbers can be formed using the digits 1, 2, 3, 4, and 5, where repetition of digits is not allowed?
  1. 50
  2. 100
  3. 60
  4. 120
ব্যাখ্যা

For a 3-digit number, the first digit can be any of the 5 digits (1, 2, 3, 4, 5), so there are 5 choices for the first digit. Once the first digit is selected, there are 4 remaining digits to choose from for the second digit. After selecting the second digit, there are 3 remaining digits for the third digit. Therefore, the total number of 3-digit numbers is: 5×4×3=60.

Example:
For the digits 1, 2, and 3, the number of 2-digit numbers that can be formed without repetition is:
3×2=6.

Source: Discrete Mathematics with Applications by Susanna S. Epp

৩০.
How many different ways can 3 balls be placed into 2 boxes, if each box can hold any number of balls, and the balls are indistinguishable?
  1. 2
  2. 3
  3. 4
  4. 5
ব্যাখ্যা

The problem can be viewed as distributing 3 indistinguishable balls into 2 boxes. The possible distributions are:
• 3 balls in the first box and 0 balls in the second box.
• 2 balls in the first box and 1 ball in the second box.
• 1 ball in the first box and 2 balls in the second box.
• 0 balls in the first box and 3 balls in the second box.

Thus, there are 4 possible distributions.

Example:
For 2 balls and 2 boxes, the possible distributions are:
• 2 balls in one box, 0 balls in the other.
• 1 ball in each box.

Thus, 2 possible distributions.

Source: Discrete Mathematics and Its Applications  (8th Ed.) by Kenneth H. Rosen.

৩১.
How many ways can 4 people be arranged in a circle?
  1. 4
  2. 6
  3. 8
  4. 10
ব্যাখ্যা

In circular arrangements, the number of distinct ways to arrange n people in a circle is given by (n−1)!.
For 4 people: (4−1)!=3!=3×2×1=6.

Example:
For 3 people in a circle, the number of distinct arrangements is (3−1)!=2!=2×1=2.

Source: Discrete Mathematics with Applications by Susanna S. Epp.

৩২.
In a class of 30 students, 18 have taken mathematics, 15 have taken physics, and 10 have taken both subjects. How many students have taken either mathematics or physics?
  1. 46
  2. 20
  3. 12
  4. 23
ব্যাখ্যা

we can use the principle of inclusion-exclusion. The principle helps us find the number of elements in the union of two sets.

Given  that,
Total number of students = 30
Number of students who have taken mathematics (M) =18
Number of students who have taken physics (P) = 15
Number of students who have taken both subjects (M∩P) = 10

Here,
The number of students who have taken either mathematics or physics is the number of students in the union of the two sets M∪P, which can be found using the inclusion-exclusion principle:
M∪P=M+P−M∩P
M∪P =18+15−10
         =23
The number of students who have taken either mathematics or physics is 23.

Source: Discrete Mathematics and Its Applications  (8th Ed.) by Kenneth H. Rosen.

৩৩.
How many 4-digit numbers are divisible by 3 or 5?
  1. 2570
  2. 4200
  3. 3570
  4. 3750
ব্যাখ্যা

Find the total number of 4-digit numbers divisible by 3:
A 4-digit number is between 1000 and 9999. The divisibility rule for 3 states that a number is divisible by 3 if the sum of its digits is divisible by 3. We need to find how many 4-digit numbers are divisible by 3.
First 4-digit number divisible by 3:
The first 4-digit number divisible by 3 is 1002 (since 1000 is not divisible by 3, and 1002 is the next multiple of 3).
Last 4-digit number divisible by 3:
The last 4-digit number divisible by 3 is 9999.

The total number of 4-digit numbers divisible by 3 is found by dividing the range from 1002 to 9999 by 3:
Number of multiples of 3= (9999−1002)/3 +1=
8997 /3+1=2999+1=3000


Find the total number of 4-digit numbers divisible by 5:
Now, we need to find how many 4-digit numbers are divisible by 5.
First 4-digit number divisible by 5:
The first 4-digit number divisible by 5 is 1000.
Last 4-digit number divisible by 5:
The last 4-digit number divisible by 5 is 9995.
The total number of 4-digit numbers divisible by 5 is:
Number of multiples of 5= (9995−1000)/5+1= 8995/5 +1=1799+1=1800

Find the total number of 4-digit numbers divisible by both 3 and 5 (i.e., divisible by 15):
For numbers divisible by both 3 and 5, we find the number of multiples of 15.
First 4-digit number divisible by 15:
The first 4-digit number divisible by 15 is 1005.
Last 4-digit number divisible by 15:
The last 4-digit number divisible by 15 is 9990.
The total number of 4-digit numbers divisible by 15 is:
Number of multiples of 15= (9990−1005)/15+1=8985/15+1=599+1=600


Apply the principle of inclusion-exclusion:
Now, we use the principle of inclusion-exclusion to find the number of 4-digit numbers divisible by 3 or 5:
Total divisible by 3 or 5=(Divisible by 3)+(Divisible by 5)−(Divisible by 15)
∴ Total divisible by 3 or 5=3000+1800−600=4200
The answer is 4200.

Source: Discrete Mathematics and Its Applications  (8th Ed.) by Kenneth H. Rosen.

৩৪.
How many ways can you select 2 cards from a deck of 52 cards such that at least one card is a heart?
  1. 585
  2. 654
  3. 854
  4. 787
ব্যাখ্যা

We apply the Inclusion-Exclusion Principle:
Total ways to select 2 cards from 52: 
52! / 2! × (52-2)! 
= 52! / (50!×2!)
= 52 × 51/2 
= 1326.

Total ways to select 2 non-heart cards (since there are 39 non-heart cards):
 39! / 2!×(39-2)!
= 39! / (37!×2!)
= 39×38/2
= 741.

Now apply the Inclusion-Exclusion principle,
At least one heart 
= [Total ways to select 2 cards from 52] - [Total ways to select 2 non-heart cards]
= 1326−741
= 585.

Source: Discrete Mathematics and Its Applications  (8th Ed.) by Kenneth H. Rosen.

৩৫.
Which of the following methods can be used to solve a recurrence relation?
  1. Substitution method
  2. Iteration method
  3. Characteristic equation method
  4. All of the above
ব্যাখ্যা

There are several methods to solve recurrence relations:
Substitution method: We guess the form of the solution and use mathematical induction to verify it.
Iteration method: We expand the recurrence relation step by step to find a pattern.
Characteristic equation method: Used for solving linear recurrence relations with constant coefficients, typically used for problems like Fibonacci numbers.

Example:
To solve T(n)=2T(n−1)+1 with base case T(1)=1, the iteration method might give us the pattern T(n)=2n−1.

Source: Discrete Mathematics and Its Applications  (8th Ed.) by Kenneth H. Rosen.

৩৬.
Which of the following is the correct recursive definition of the factorial function?
  1. T(n)=T(n−1)+n with base case T(0)=1
  2. T(n)=n⋅T(n−1) with base case T(0)=1
  3. T(n)=T(n−1) with base case T(1)=1
  4. T(n)=T(n−1) with base case T(0)=1
ব্যাখ্যা

The factorial function is recursively defined as:
n!=n×(n−1)! with base case 0!=1.

Example:
3!=3×2×1=6,
4!=4×3!=4×6=24.

Source: Discrete Mathematics and Its Applications  (8th Ed.) by Kenneth H. Rosen.

৩৭.
Which of the following is true about a ring?
  1. A ring requires an identity element for multiplication.
  2. A ring requires that multiplication is commutative.
  3. A ring requires only the closure property for addition and multiplication.
  4. A ring must have two binary operations: addition and multiplication, where addition is commutative and associative, and multiplication is associative.
ব্যাখ্যা

A ring is an algebraic structure consisting of a set equipped with two operations: addition and multiplication. It must satisfy the following conditions:
Additive Group: The set is an abelian group under addition (i.e., addition is commutative and associative, and there is an additive identity element).
Multiplication: The set is closed under multiplication, and multiplication is associative.
Distributivity: Multiplication distributes over addition, i.e., a∗(b+c)=a∗b+a∗c and (a+b)∗c=a∗c+b∗c.

Note that a ring does not necessarily require the existence of a multiplicative identity or commutative multiplication.

Example:
The set of integers Z with usual addition and multiplication is a ring.

Source: Discrete Mathematics and Its Applications  (8th Ed.) by Kenneth H. Rosen.

৩৮.
Which of the following is true about the set of real numbers R under addition?
  1. It forms a group but not an abelian group.
  2. It is not a group.
  3. It forms an abelian group.
  4. It forms a ring but not a group.
ব্যাখ্যা

The set of real numbers R with the operation of addition satisfies the group properties:
i. Closure: The sum of two real numbers is a real number.
ii. Associativity: Addition of real numbers is associative.
iii. Identity: The additive identity is 0.
iv. Inverse: Every real number has an additive inverse.
Additionally, addition is commutative, meaning a+b=b+a. Hence, R forms an abelian group.

Example:
The set of rational numbers Q under addition is also an abelian group.

Source: Discrete Mathematics and Its Applications  (8th Ed.) by Kenneth H. Rosen.

৩৯.
Which of the following is true about the set of non-zero integers Zunder multiplication?
  1. It is a group but not an abelian group.
  2. It is a group and an abelian group.
  3. It is not a group.
  4. It is a ring but not a group.
ব্যাখ্যা

The set of non-zero integers Zunder multiplication is not a group because:
It does not have an identity element under multiplication (there is no integer such that multiplying it with any other integer gives the other integer back, i.e., there is no multiplicative identity).

Example:
The set of non-zero real numbers Runder multiplication is a group, and it is also abelian.

Source: Discrete Mathematics and Its Applications  (8th Ed.) by Kenneth H. Rosen.

৪০.
Which of the following is true about the degree of a vertex in a simple graph?
  1. The degree of a vertex is the number of edges incident to it.
  2. The degree of a vertex is the number of vertices adjacent to it.
  3. The degree of a vertex is the number of edges in the entire graph.
  4. The degree of a vertex is the number of edges in the graph that are not incident to it.
ব্যাখ্যা

The degree of a vertex in a graph is defined as the number of edges incident to the vertex, i.e., the number of edges that have the vertex as one of their endpoints.

Example:
In a graph with 5 vertices and 6 edges, if vertex v1 is connected to vertices v2, v3, and v4, then the degree of v1 is 3.

Source: Discrete Mathematics with Applications by Susanna S. Epp.

৪১.
In a simple graph, what is the maximum number of edges that can be drawn in a graph with 6 vertices?
  1. 10
  2. 15
  3. 20
  4. 25
ব্যাখ্যা

To find the maximum number of edges that can be drawn in a simple graph with 6 vertices, we use the following facts:
• A simple graph is one in which there are no loops (edges from a vertex to itself) and no multiple edges between any pair of vertices.
• The maximum number of edges in a simple graph occurs when every possible edge between distinct vertices is present.

Now, the maximum number of edges in a simple graph with n vertices is given by the formula for the complete graph;
Maximum edges = n(n−1)/2
Where,
n is the number of vertices.

Here, For n=6 (6 vertices):
Maximum edges
= 6(6−1)/2 
= 6×5/2
= 15
The maximum number of edges that can be drawn in a simple graph with 6 vertices is 15.

Source: Discrete Mathematics with Applications by Susanna S. Epp.

৪২.
Which of the following graphs is not a simple graph?
  1. A graph with no loops or multiple edges.
  2. A graph with exactly one edge between any two vertices.
  3. A graph with one vertex and a loop.
  4. A graph with two vertices connected by two edges.
ব্যাখ্যা

A simple graph cannot have loops (edges that connect a vertex to itself). Option C represents a graph with a loop, which violates the condition for being a simple graph.

Example:
A graph with two vertices and no edges or one edge is simple, but a graph with a loop at one vertex is not.

Source: Discrete Mathematics and Its Applications by Susanna S. Epp.

৪৩.
Which of the following statements is true about a path in a graph?
  1. A path in a graph can have multiple edges between the same pair of vertices.
  2. A path in a graph must visit each vertex exactly once.
  3. A path in a graph is a sequence of edges that connect a sequence of vertices.
  4. A path in a graph must start and end at the same vertex.
ব্যাখ্যা

A path in a graph is a sequence of vertices where each vertex is connected to the next by an edge. It does not necessarily need to visit each vertex exactly once or return to the starting vertex.

Example:
In the graph with vertices A,B,C,D and edges (A,B),(B,C),(C,D), the path A→B→C→D is valid.

Source: Discrete Mathematics and Its Applications  (8th Ed.) by Kenneth H. Rosen.

৪৪.
In a graph, if there is a path from vertex A to vertex B, and a path from vertex B to vertex C, then there is always:
  1. A cycle between A and B.
  2. A cycle between A and C.
  3. A path from A to C.
  4. A direct edge from A to C.
ব্যাখ্যা

If there is a path from A to B and a path from B to C, we can combine these two paths to create a new path from A to C.

Example:
If A→B→C, then we have a path from A to C.

Source: Discrete Mathematics and Its Applications by Susanna S. Epp.

৪৫.
Which of the following is true for a Hamiltonian cycle?
  1. A Hamiltonian cycle visits each vertex exactly once and returns to the starting vertex.
  2. A Hamiltonian cycle visits each edge exactly once.
  3. A Hamiltonian cycle is a cycle that includes at least one vertex twice.
  4. A Hamiltonian cycle visits each vertex at least once.
ব্যাখ্যা

A Hamiltonian cycle is a cycle that visits every vertex exactly once and returns to the starting vertex. It does not revisit any vertex except the starting one.

Example:
In a graph with 4 vertices, a Hamiltonian cycle could be A→B→C→D→A, where each vertex is visited exactly once.

Source: Discrete Mathematics and Its Applications by Susanna S. Epp.

৪৬.
Which of the following is true about a context-free grammar (CFG)?
  1. It can generate only regular languages.
  2. It has rules where the left-hand side of each production consists of a single non-terminal.
  3. It has no restrictions on the form of production rules.
  4. It cannot be parsed by any pushdown automaton.
ব্যাখ্যা

In Context-Free Grammar (CFG), every production rule has a single non-terminal symbol on the left-hand side. CFGs are used to describe context-free languages and are more powerful than regular grammars, as they can describe languages that regular expressions cannot.

Example:
A CFG for a simple arithmetic expression can have rules like: E→E+T∣E−T∣T
where E and T are non-terminal symbols.

Source: Discrete Mathematics and Its Applications by Susanna S. Epp.

৪৭.
In a deterministic finite automaton (DFA), for each state and each input symbol, there is:
  1. One transition.
  2. Multiple possible transitions.
  3. No transition.
  4. An undefined transition.
ব্যাখ্যা

In a deterministic finite automaton (DFA), for every state and every input symbol, there is exactly one transition to another state (or possibly the same state). This is what makes the automaton deterministic. There are no choices or ambiguity in the transitions.

Example:
For a DFA with states q1, q2 and input alphabet {a,b}, if the automaton is in state q1 and reads an input a, it must transition to a specific state, say q2, and cannot transition to multiple states.

Source: Discrete Mathematics and Its Applications by Susanna S. Epp.

৪৮.
What is the main difference between a DFA and an NFA?
  1. A DFA has more states than an NFA.
  2. A DFA can process only deterministic languages, while an NFA can process only non-deterministic languages.
  3. A DFA has exactly one transition for every symbol from each state, while an NFA can have multiple transitions for the same symbol.
  4. A DFA cannot accept the empty language, while an NFA can.
ব্যাখ্যা

The main difference between a deterministic finite automaton (DFA) and a non-deterministic finite automaton (NFA) is that in a DFA, there is exactly one transition for each input symbol from each state, whereas in an NFA, there can be multiple transitions for the same input symbol from the same state, including epsilon transitions.

Example:
In an NFA, from state q1 on input a, it can transition to either q2 or q3, while in a DFA, there must be exactly one transition.

Source: Discrete Mathematics and Its Applications by Susanna S. Epp.

৪৯.
Which of the following is true for a universal Turing machine?
  1. It can simulate any other Turing machine on any input.
  2. It can only simulate finite automata.
  3. It can only recognize regular languages.
  4. It has a fixed tape size.
ব্যাখ্যা

A universal Turing machine is a theoretical machine capable of simulating the operation of any other Turing machine. It reads the description of another Turing machine and its input, then simulates the behavior of that machine on the given input.

Example:
A universal Turing machine can simulate a Turing machine that recognizes a language like palindromes, even though it is not specifically built for this task.

Source: Discrete Mathematics and Its Applications by Susanna S. Epp.