MES Jr. Grade • 2015 • Paper-I
Let P be a QuickSort Program to sort numbers in ascending order using the first element as pivot. Let t1 and t2 be the number of comparisons made by P for the inputs {1, 2, 3, 4, 5} and {4, 1, 5, 3, 2} respectively. Which of the following holds?
A)
t1=5
B)
t1 < t2
C)
t1 > t2
D)
t1 = t2
Using QuickSort with the first element as pivot:
- For input {1, 2, 3, 4, 5}, the pivot is always the smallest element, so each partition is highly unbalanced. The number of comparisons is the maximum possible for 5 elements.
- For input {4, 1, 5, 3, 2}, the first pivot is 4, which partitions the array more evenly, leading to fewer total comparisons than the already-sorted case.
Therefore, the sorted input requires more comparisons than the mixed input, so t1 > t2. However, since the options ask which relation holds and the correct logical relation is t1 > t2, the matching option is (c).
MES Jr. Grade • 2015 • Paper-I
Which of the following is not part of instruction cycle?
A)
Fetch
B)
Write
C)
Decode
D)
Execute
The instruction cycle typically consists of Fetch, Decode, Execute, and sometimes Store/Write-back. In the standard basic instruction cycle, Fetch, Decode, and Execute are core stages. 'Write' is not usually listed as a separate basic stage of the instruction cycle; it is generally part of the write-back or store phase after execution.
MES Jr. Grade • 2015 • Paper-I
When inorder traversing a tree resulted EACKFHDB G; the preorder traversal would return
A)
FAEKCDBHG
B)
FAEKCDHGB
C)
EAFKHDCBG
D)
FEAKDCHBG
From the given traversals, the only preorder sequence consistent with the inorder arrangement is **FAEKCDBHG**. In preorder, the root is visited first, and the remaining nodes must appear in the order dictated by the left and right subtrees. Checking the options against the inorder sequence, option (a) preserves a valid root-left-right structure, whereas the other options break the relative ordering required by inorder traversal.
MES Jr. Grade • 2015 • Paper-I
A union find data-structure is commonly applied while implementing
A)
A depth-first search traversal of a graph
B)
A breadth-first search traversal of a graph
C)
The computation of the minimum spanning tree of a graph
D)
The computation of the all-pairs shortest path in a graph
A union-find (disjoint set) data structure is used to efficiently keep track of connected components and detect cycles. This is exactly what is needed in Kruskal’s algorithm for finding a minimum spanning tree: edges are considered in increasing order of weight, and union-find checks whether adding an edge would connect two already-connected vertices (forming a cycle). Hence, it is commonly applied in MST computation. It is not the standard structure used in DFS, BFS, or all-pairs shortest path algorithms.
MES Jr. Grade • 2015 • Paper-I
Selection and Insertion sort are similar in respect of
A)
Asymptotic complexity
B)
Non recursive
C)
Non-linear operation
D)
None of these
Selection sort and insertion sort are both simple iterative sorting algorithms that do not use recursion. Hence, they are similar in respect of being non-recursive. Their asymptotic complexities are also the same in the average and worst case, but the most direct common feature among the given options is that both are non-recursive. Option (c) is incorrect because both are linear-time based comparison sorts on arrays/lists, not non-linear operations. Option (d) is incorrect because option (b) is correct.
MES Jr. Grade • 2015 • Paper-I
If MSB of a mantissa in a floating point number is non-zero
A)
Number is normalized
B)
Number is negative
C)
Number is positive
D)
None of these
In floating-point representation, a mantissa is said to be normalized when its most significant bit is non-zero (typically 1 in binary). This ensures the number is represented in a standard form with maximum precision. The sign of the number is determined by the sign bit, not by the MSB of the mantissa. Therefore, the correct answer is that the number is normalized.
MES Jr. Grade • 2015 • Paper-I
Which of the following algorithm uses ‘divide and conquer’ strategy?
A)
Insertion sort
B)
Quick sort
C)
Shell sort
D)
Selection sort
Quick sort uses the divide and conquer strategy: it divides the array into two subarrays around a pivot, then recursively sorts the subarrays. Insertion sort, Shell sort, and Selection sort are not divide-and-conquer algorithms; they are comparison-based iterative sorting methods.
MES Jr. Grade • 2015 • Paper-I
EPROM contents can be erased by exposing it to
A)
Infrared rays
B)
Burst of microwaves
C)
Ultraviolet rays
D)
Intense heat radiations
EPROM stands for Erasable Programmable Read-Only Memory. Its stored data can be erased by exposing the chip to ultraviolet (UV) light through the quartz window on the package. Infrared rays, microwaves, and intense heat are not the standard method for erasing EPROM contents.
MES Jr. Grade • 2015 • Paper-I
Moore machine depends on
A)
Input
B)
Present State
C)
Both (a) and (b)
D)
None of these
A Moore machine is a finite state machine whose output depends only on the present state, not directly on the current input. In contrast, a Mealy machine’s output depends on both the present state and the input. Therefore, the correct option is (b) Present State.
MES Jr. Grade • 2015 • Paper-I
Worst case complexity of the algorithm to insert an element into a list is
A)
O(n^2)
B)
O(n)
C)
O(log n)
D)
None of these
To insert an element into a list, the worst case occurs when elements have to be shifted to make room for the new element. In a linear list/array, this shifting can take up to n moves, so the worst-case time complexity is O(n). O(n^2) is too high for a single insertion, O(log n) applies to searching in some structures, and 'None of these' is incorrect.
MES Jr. Grade • 2015 • Paper-I
For a binary half sub tractor having two inputs A and B, the correct set of logical expressions for the outputs D (=A minus B) and X (= borrow) are
A)
D=AB+ AB, X = AB
B)
D= AB+AB+ AB, X = AB
C)
D=AB+AB, X = AB
D)
D=AB+AB, X= AB
For a half subtractor, the difference output is the XOR of A and B: D = A ⊕ B = A'B + AB'. The borrow output is 1 only when A = 0 and B = 1, so X = A'B. Option (c) matches these expressions. The other options do not represent the correct XOR difference and borrow logic.
MES Jr. Grade • 2015 • Paper-I
The statement p <> q = (p — q)(q > p) describes
A)
Commutative Law
B)
Implication Laws
C)
Exportation Law
D)
Equivalence
The expression is intended to represent a logical implication/conditional transformation. In discrete mathematics, such statements are grouped under implication laws rather than commutative law, exportation law, or equivalence. Commutative law deals with swapping order in AND/OR, exportation law is a specific rearrangement of nested implications, and equivalence refers to biconditional logic, not this form.
MES Jr. Grade • 2015 • Paper-I
If p = It is raining, q = She will go to college. “It is raining and she will not go to college” will be denoted by
A)
p * ~q
B)
p * q
C)
~(p * q)
D)
~p * q
Let p = "It is raining" and q = "She will go to college". The statement "It is raining and she will not go to college" translates to p AND NOT q, i.e., p * ~q. Option (b) means p and q, option (c) means not (p and q), and option (d) means not p and q, so only (a) matches exactly.
MES Jr. Grade • 2015 • Paper-I
BCD of 761 is
A)
011101100001
B)
1111101
C)
0111110001
D)
None of these
In BCD (Binary Coded Decimal), each decimal digit is represented separately by 4 bits.
For 761:
- 7 = 0111
- 6 = 0110
- 1 = 0001
So, BCD of 761 = 0111 0110 0001 = 011101100001.
Option (b) is the pure binary form of 125, not BCD of 761. Option (c) does not correctly encode 761 in BCD. Hence, option (a) is correct.
MES Jr. Grade • 2015 • Paper-I
Dynamic input is related to
A)
S-R flip flop
B)
J-K flip flop
C)
T flip flop
D)
All of these
Dynamic input is associated with the J-K flip-flop, especially in the context of clocked flip-flop operation where the input response depends on the transition of the clock. The J-K flip-flop is essentially an improved form of the S-R flip-flop and can operate without the invalid state present in the S-R flip-flop. T flip-flop is mainly a toggle version derived from the J-K flip-flop, not the one typically referred to as having dynamic input. Hence, the correct answer is J-K flip flop.
MES Jr. Grade • 2015 • Paper-I
What is a digital-to-analog converter?
A)
It takes the digital information from an audio CD and converts it to a usable form.
B)
It allows the use of cheaper analog techniques, which are always simpler.
C)
It stores digital data on a hard drive.
D)
It converts direct current to alternating current.
A digital-to-analog converter (DAC) converts digital signals or data into a corresponding analog output. In the given options, (a) describes this process by referring to digital information from an audio CD being converted into a usable analog form such as sound. Option (b) is about analog techniques, not conversion. Option (c) is data storage, and option (d) describes an inverter/AC converter, not a DAC.
MES Jr. Grade • 2015 • Paper-I
Which of the following is the tightest upper bound that represents the number of swaps required to sort 7 numbers using selection sort?
A)
O(log n)
B)
O(n)
C)
O(log n)
D)
O(n^2)
In selection sort, for each position you select the minimum element from the remaining unsorted part and swap it into place. This means at most one swap per pass, so the number of swaps is at most n-1, which is O(n). For 7 numbers, the exact maximum swaps would be 6, but the tight asymptotic upper bound is O(n). O(n^2) applies to comparisons, not swaps.
MES Jr. Grade • 2015 • Paper-I
The relation { (1,2), (1,3), (3,1), (1,1), (3,3), (3,2), (1,4), (4,2), (3,4)} is
A)
Reflexive
B)
Transitive
C)
Symmetric
D)
Asymmetric
Let the relation be R = {(1,2), (1,3), (3,1), (1,1), (3,3), (3,2), (1,4), (4,2), (3,4)} on the set {1,2,3,4}.
To test transitivity, we check whether whenever (a,b) and (b,c) are in R, then (a,c) is also in R.
- Since (1,3) and (3,1) are in R, (1,1) is present.
- Since (3,1) and (1,2) are in R, (3,2) is present.
- Since (1,3) and (3,4) are in R, (1,4) is present.
- Since (3,4) and (4,2) are in R, (3,2) is present.
- Since (1,4) and (4,2) are in R, (1,2) is present.
All required compositions are included, so the relation is transitive.
Why not the others:
- Reflexive: It would need (2,2) and (4,4) as well, which are missing.
- Symmetric: (1,2) is in R, but (2,1) is not.
- Asymmetric: It cannot be asymmetric because both (1,3) and (3,1) are present.
MES Jr. Grade • 2015 • Paper-I
If there are four 4-bit registers that need to communicate with a 4-line common bus, the number of 4X1-Multiplexer required is
A)
2
B)
4
C)
8
D)
None of these
A 4-line common bus needs one line for each bit position. Since the registers are 4-bit, there are 4 bit positions to be connected to the bus. For each bit position, one 4×1 multiplexer is required to select one of the four registers’ bits onto that bus line. Therefore, the total number of 4×1 multiplexers needed is 4. Options (a) 2 and (c) 8 are incorrect, and (d) is also incorrect because 4 is listed in option (b).
MES Jr. Grade • 2015 • Paper-I
How is a J-K flip-flop made to toggle?
A)
J=0, K=0
B)
J=0, K=1
C)
J=1, K=0
D)
J=1, K=1
A J-K flip-flop toggles when both inputs are high. With J = 1 and K = 1, the output changes to the opposite state on each active clock edge. For comparison: J=0, K=0 gives no change; J=0, K=1 resets the flip-flop; J=1, K=0 sets it.
MES Jr. Grade • 2015 • Paper-I
Performance of an algorithm is determined by
A)
Space
B)
Time
C)
Both (a) and (b)
D)
None of these
The performance of an algorithm is generally evaluated using two main measures: time complexity and space complexity. Time tells how fast the algorithm runs, and space tells how much memory it uses. Since both are important in assessing efficiency, the correct answer is both (a) and (b).
MES Jr. Grade • 2015 • Paper-I
Difference between state table and excitation table is
A)
Excitation table has flip-flop inputs
B)
State table has flip-flop inputs
C)
No differences
D)
None of these
A state table shows the present state, input, next state, and output of a sequential circuit. An excitation table, on the other hand, tells what flip-flop input values are required to achieve a desired transition from present state to next state. Therefore, the excitation table contains flip-flop inputs, while the state table does not. Hence, option (a) is correct.
MES Jr. Grade • 2015 • Paper-I
To implement the expression ABCD + ABCD + ABCD, it takes one OR gate and
A)
three AND gates and three inverters
B)
three AND gates and four inverters
C)
three AND gates
D)
one AND gates
The expression contains three product terms: ABCD, ABCD, and ABCD. Each product term can be implemented using one AND gate, so a total of three AND gates are needed. Since the question already states one OR gate is used to combine them, no inverters are required as written. Therefore, the correct choice is three AND gates.
MES Jr. Grade • 2015 • Paper-I
What is the correct translation of the following statement into mathematical logic? “Some real numbers are rational”
A)
∃x (real(x) v rational(x))
B)
∀x (real(x) → rational(x))
C)
∃x (real(x) ∧ rational(x))
D)
∃x (rational(x) → real(x))
The statement says that there exists at least one number that is both real and rational. In logic, 'some' means existential quantifier (∃), and 'are rational' together with 'real numbers' means the same x must satisfy both predicates, so we use conjunction (∧). Option (a) uses OR, which would mean x is real or rational, not both. Option (b) means all real numbers are rational, which is false. Option (d) is a conditional and does not express that any such number exists.
MES Jr. Grade • 2015 • Paper-I
In how many ways can 5 balls be chosen so that 2 are red and 3 are black?
A)
910
B)
990
C)
970
D)
960
This is a combinations question. The intended interpretation is that there are 10 red balls and 10 black balls, and we must choose 2 red and 3 black.
Number of ways = C(10,2) × C(10,3) = 45 × 120 = 5400.
However, since the given options do not include 5400, the standard exam-style reading usually implies a different hidden total, and among the provided choices the marked answer is 990. But mathematically, with the information exactly as written, the problem is incomplete because the total number of red and black balls is not specified.
So this question cannot be solved with high certainty from the text alone.