65 Discrete Mathematics (Computer Science) questions asked in DSSSB TGT / PGT previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.
In Huffman's coding, if the symbol A has probability 0.3, B has probability 0.15, C has probability 0.1, D has probability 0.25 and E has probability 0.2, then the minimum number of bits required to represent all the symbols together is
A14
B11
C12
D15
Show answerHide answer
Correct answer: (C) 12
Explanation
Huffman merges: 0.1 + 0.15 = 0.25, then 0.2 + 0.25 = 0.45, then 0.25 + 0.3 = 0.55, then 1. The code lengths are A 2, D 2, E 2, B 3, C 3, totalling 2 + 2 + 2 + 3 + 3 = 12 bits.
In unit testing of a model, it is found that for a set of test data, at the maximum 90% of the code alone were tested with the probability of success 0.9. Then the reliability of the model is
AGreater than 0.9
BEqual to 0.9
CAt most 0.81
DAt least 1/0.81
Show answerHide answer
Correct answer: (C) At most 0.81
Explanation
Only 90% of the code was tested, and the success probability is 0.9. So reliability is at most 0.9 × 0.9 = 0.81.
The term ______ refers to the use of electronics and software within a product, as opposed to a general-purpose computer, such as a laptop or desktop system.
AComplex system
BSimple system
CFuzzy logic
DEmbedded system
Show answerHide answer
Correct answer: (D) Embedded system
Explanation
An embedded system is electronics and software built into a product for a dedicated function, such as a washing machine or microwave controller, rather than a general-purpose computer.
Which of the following is not a determinant of curriculum?
APersonal talent
Bsocial aspect
CGender role
DBasic needs
Show answerHide answer
Correct answer: (C) Gender role
Explanation
Curriculum is shaped by learners' needs and abilities and by social aspects. Gender roles should not determine curriculum, which must be gender-neutral.
An image may be defined as a 2-dimensional function f(x, y) where x and y are ________ and the amplitude of the function is called ________ of the image at the point (x, y)
AIntensity; coordinates
BIntensity; brightness
CCoordinates; intensity
DBrightness; coordinates
Show answerHide answer
Correct answer: (C) Coordinates; intensity
Explanation
In f(x, y), x and y are spatial coordinates, and the amplitude of f at any point is the intensity (grey level) of the image there.
Q13DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
If the determinant of the matrix
[ 1 3 0 ]
[ 2 6 4 ]
[ -1 0 2 ]
is −p, then what is the value of the determinant of the matrix
[ 2 6 0 ]
[ 4 12 8 ]
[ -2 0 4 ] ?
A8P
B-4P
C4P
D-8P
Show answerHide answer
Correct answer: (D) -8P
Explanation
Every row of the second matrix is 2 times the corresponding row of the first. Multiplying all three rows of a 3×3 matrix by 2 multiplies the determinant by 2³ = 8, so the new determinant is 8 × (−p) = −8p.
Q14DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
An anti-air craft gun can take a maximum of 4 shots at an enemy plane moving away from it. The probabilities of hitting the plane at the first, second, third and fourth shot are 0.6, 0.5, 0.4 and 0.2 respectively. What is the probability that the gun hit the plane?
A0.904
B0.924
C0.804
D0.824
Show answerHide answer
Correct answer: (A) 0.904
Explanation
The chance that all four shots miss is 0.4 × 0.5 × 0.6 × 0.8 = 0.096. So P(at least one hit) = 1 − 0.096 = 0.904.
Q15DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
Which of the following is a impact printer?
AInkjet printer
BDot-matrix printer
CLaser printer
DThermal Printer
Show answerHide answer
Correct answer: (B) Dot-matrix printer
Explanation
A dot-matrix printer forms characters by pins striking an inked ribbon against the paper, so it is an impact printer. Inkjet, laser and thermal printers are non-impact printers.
Q16DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
Consider the following weighted digraph. What is the shortest distance between V1 to V5?
Edges (from → to, weight): V1 → V2 (30), V2 → V3 (70), V3 → V5 (30), V1 → V4 (50), V4 → V3 (40), V4 → V5 (80), V1 → V5 (120)
A140
B120
C130
D110
Show answerHide answer
Correct answer: (B) 120
Explanation
Path costs: V1→V2→V3→V5 = 130, V1→V4→V3→V5 = 120, V1→V4→V5 = 130 and V1→V5 = 120. The minimum is 120.
Q17DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
A bag L contains 2 white and 3 red balls and a bag M contains 4 white and 5 red balls. One ball is drawn at random from one of the bags and is found to be red. What is the probability that it was drawn from the bag M?
Q18DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
Which is Lagrange's interpolation polynomial for the following data?
x | 2 | 4
f(x) | 3 | 5
A2x + 6
Bx + 5
Cx + 1
D2x + 5
Show answerHide answer
Correct answer: (C) x + 1
Explanation
With two points, Lagrange's formula gives f(x) = 3(x−4)/(2−4) + 5(x−2)/(4−2) = −1.5x + 6 + 2.5x − 5 = x + 1. Check: f(2) = 3 and f(4) = 5.
Q19DSSSB TGT Computer Science (Technical), 7 Aug 2021, Shift 3
A discrete random variable X has the following probability distribution.
X | 1 | 2 | 3 | 4 | 5 | 6 | 7
P(X) | K | 2K | 2K | 3K | K² | 2K² | 7K² + K
What is the value of K?
A1/30
B1/40
C1/10
D1/20
Show answerHide answer
Correct answer: (C) 1/10
Explanation
The probabilities must add to 1: 9K + 10K² = 1, so 10K² + 9K − 1 = 0, i.e. (10K − 1)(K + 1) = 0. Since K > 0, K = 1/10.
Q20DSSSB TGT Computer Science (Technical), 7 Aug 2021, Shift 3
Two balls are drawn at random with replacement from a box containing 10 blue and 8 pink balls. What is the probability that both the balls are pink?
A4/9
B16/81
C64/81
D8/81
Show answerHide answer
Correct answer: (B) 16/81
Explanation
With replacement the draws are independent: P = (8/18) × (8/18) = (4/9)² = 16/81.
Q21DSSSB TGT Computer Science (Technical), 7 Aug 2021, Shift 2
What is the function of Ctrl + T in MS-word?
AUndo last action
BHanging indent
CRedo the last action
DJustify paragraph alignment
Show answerHide answer
Correct answer: (B) Hanging indent
Explanation
Ctrl + T applies a hanging indent in MS Word (Ctrl + Shift + T removes it). Undo is Ctrl + Z, redo is Ctrl + Y and justify is Ctrl + J.
Q22DSSSB TGT Computer Science (Technical), 7 Aug 2021, Shift 2
If the probability of winning a match is 0.7 then what is the value of variance?
A0.7
B0.3
C0.21
D0.31
Show answerHide answer
Correct answer: (C) 0.21
Explanation
For a single trial (Bernoulli), variance = p × q = 0.7 × 0.3 = 0.21.
Q23DSSSB TGT Computer Science (Technical), 7 Aug 2021, Shift 2
20 percent of the pens produced in a factory are of red colour and 4 percent are red and defective. If one pen is picked up at random, then what is the probability of its being defective if it is red?
Q24DSSSB TGT Computer Science (Technical), 7 Aug 2021, Shift 2
A bike manufacturing factory has two plants P and Q. Plant P manufactures 60 percent of bikes and plant Q manufacture 40 percent. 80 percent of the bikes at plant P and 90 percent of the bikes at plant Q are rated of standard quality. A bike is chosen at random and is found to be of standard quality. What is the probability that it has come from plant P?
Q25DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 3
What is the minimum value of function y = x² in the interval [1, 6]?
A2
B1
C3
D4
Show answerHide answer
Correct answer: (B) 1
Explanation
y = x² is increasing on [1, 6], so its minimum is at x = 1: y = 1.
Q26DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 3
Which one of the following is an impact printer?
AInkjet printer
BDot-matrix printer
CLaser printer
DThermal printer
Show answerHide answer
Correct answer: (B) Dot-matrix printer
Explanation
A dot-matrix printer forms characters by pins striking an inked ribbon against paper, so it is an impact printer. Inkjet, laser and thermal printers are non-impact.
Q27DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 3
Which of the following is an advantage of use of multiplexers?
I. Logic design is simplified
II. Minimizes IC package count
III. Simplification of logic expression is not required
AI and II
BII and III
CI and III
DI, II and III
Show answerHide answer
Correct answer: (D) I, II and III
Explanation
Multiplexers can implement any logic function directly, which simplifies design, reduces the IC package count and removes the need to minimise the expression. All three are advantages.
Q28DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 3
A module of a software is said to be logically cohesive if ________.
AAll the elements of the module perform similar operations like error handling, data input etc
BDifferent elements of the module cooperate to achieve a single function for example managing and employee's pay roll
CIf the set of functions of the module are all part of a procedure
DAll the elements of the module performs different operations alternatively
Show answerHide answer
Correct answer: (A) All the elements of the module perform similar operations like error handling, data input etc
Explanation
Logical cohesion groups elements that do logically similar operations, such as all error handling or all data input routines. B describes functional cohesion and C procedural cohesion.
Q29DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 3
A question in mathematics is given to three students P, Q and R whose chances of solving are 1/3, 1/4, 1/5 respectively. What is the probability that the problem will be solved?
A0.4
B0.6
C0.8
D0.7
Show answerHide answer
Correct answer: (B) 0.6
Explanation
P(no one solves) = (2/3)(3/4)(4/5) = 2/5. So P(solved) = 1 − 2/5 = 3/5 = 0.6.
Q30DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 3
If f(1) = 4 and f(5) = 6, then what is the value of f(3) using Lagrange's interpolation?
A5
B6.5
C4
D3
Show answerHide answer
Correct answer: (A) 5
Explanation
Lagrange's formula with two points: f(3) = 4·(3−5)/(1−5) + 6·(3−1)/(5−1) = 4×0.5 + 6×0.5 = 5.
Q31DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1
In a bulb factory, machines P, Q and R manufacture respectively 25%, 35% and 40% of the total. Of their output 5, 4 and 2 percent respectively are defective bulbs. A bulb is drawn at random and it is found to be defective. What is the probability that it was manufactured by machine Q?
Which of the following options is true for a Hermitian matrix?
Aaᵢⱼ = conj(aⱼᵢ) (aᵢⱼ equals the complex conjugate of aⱼᵢ)
Baᵢⱼ = −aⱼᵢ
Caᵢⱼ = aⱼᵢ
Daᵢⱼ = −conj(aⱼᵢ)
Show answerHide answer
Correct answer: (A) aᵢⱼ = conj(aⱼᵢ) (aᵢⱼ equals the complex conjugate of aⱼᵢ)
Explanation
A Hermitian matrix equals its conjugate transpose, so aᵢⱼ = conj(aⱼᵢ). aᵢⱼ = aⱼᵢ is the rule for a symmetric matrix, and the minus forms are for skew types.
The conjugate replaces every i by -i in each element: i becomes -i, 1+i becomes 1-i, 3-2i becomes 3+2i, 2-i becomes 2+i, -3i becomes 3i, 1-i becomes 1+i and 2i becomes -2i. Real entries 4 and 5 stay the same.
Which of the following options is a Hermitian matrix?
AA =
[ 1 2+3i ]
[ 2−3i 5 ]
BA =
[ 1 2+3i ]
[ −2+3i −1 ]
CA =
[ 1 2+3i ]
[ −2−3i 5 ]
DA =
[ 1 2+3i ]
[ 2+3i 1 ]
Show answerHide answer
Correct answer: (A) A =
[ 1 2+3i ]
[ 2−3i 5 ]
Explanation
A Hermitian matrix equals its conjugate transpose: diagonal entries are real and a_ji is the conjugate of a_ij. In A the diagonal is 1 and 5 and the off-diagonal entries 2+3i and 2-3i are conjugates.
Suppose that a biased coin is tossed such that P(H) = 2/3 and P(T) = 1/3.
If head (H) appears, a number between is selected between 1 through 9. If tail (T)
appears, then a number is selected between 1 through 5. The probability that an even
number is selected is approximately equal to:
If A =
[ 1 0 0 ]
[ 0 -1 0 ]
[ 1 0 1 ]
then the matrix for A⁶ is __________.
A[ 6 0 0 ]
[ 0 6 0 ]
[ 6 0 6 ]
B[ 1 0 0 ]
[ 0 -1 0 ]
[ 6 0 1 ]
C[ 1 0 0 ]
[ 0 -1 0 ]
[ 1 0 1 ]
D[ 1 0 0 ]
[ 0 1 0 ]
[ 6 0 1 ]
Show answerHide answer
Correct answer: (D) [ 1 0 0 ]
[ 0 1 0 ]
[ 6 0 1 ]
Explanation
Squaring gives row 3 = [2, 0, 1] and the middle entry (-1)² = 1. In general A^n has row 3 = [n, 0, 1] and middle entry (-1)^n, so A⁶ has row 3 = [6, 0, 1] and middle entry 1.
Which of the following methods is used for the function y = f(x), with the given discrete set of points (xᵢ, yᵢ), i = 0, 1, 2, 3, ..., n where xᵢ's are NOT equispaced?
ANewton's backward interpolation formula
BNewton's divided difference formula
CNewton's forward interpolation formula
DGauss's forward difference formula
Show answerHide answer
Correct answer: (B) Newton's divided difference formula
Explanation
Newton's divided difference formula works for unequally spaced xᵢ. Newton's forward/backward and Gauss formulas need equally spaced points.
How to use these DSSSB TGT / PGT Computer Science questions
Every question here was asked in a real DSSSB TGT / PGT paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full DSSSB TGT / PGT papers as timed tests to check your speed under exam conditions.