The PYQ practice room
GATE CS 2015 Set 1
All 65 solved GATE CS 2015 Set 1 questions in exam order. Open a question, commit to an answer, and learn from the step-by-step solution. One question at a time.
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.Questions
65
Paper marks
100
Question formats
2
MCQ · NAT
Revision mode
Self-paced
No timer. Focus on understanding.
Explore the questions
General Aptitude (GA)
101
Q1MCQ1 markEasyDidn't you buy ________________ when you went shopping?Think it through. Then check your answer.Question
Didn't you buy ________________ when you went shopping?Correct answer
(A) any paper
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The sentence is a negative interrogative. In English grammar, 'any' is typically used in negative sentences and questions.- (A) 'any paper': Correct usage. 'Didn't you buy any paper?' implies the speaker expected the person to buy paper or is asking for confirmation.
- (B) 'much paper': Grammatically possible but less idiomatic in this specific context compared to 'any'.
- (C) 'no paper': 'Didn't you buy no paper' creates a double negative which is non-standard or confusing.
- (D) 'a few paper': Incorrect because 'paper' is an uncountable noun; it should be 'a little paper' or 'a few sheets of paper'.
2
Q2MCQ1 markEasyWhich of the following options is the closest in meaning to the sentence below? She enjoyed herself immensely at the party.Think it through. Then check your answer.Question
Which of the following options is the closest in meaning to the sentence below?She enjoyed herself immensely at the party.Correct answer
(C) She had a terrific time at the party
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The phrase 'enjoyed herself immensely' means she had a very good time or a great amount of fun.- (A) 'terrible' means very bad.
- (B) 'horrible' means very unpleasant.
- (C) 'terrific' means of great size, amount, or intensity; excellent. This matches the positive sentiment of 'enjoyed immensely'.
- (D) 'terrifying' means causing terror or fear.
3
Q3MCQ1 markMediumWhich one of the following combinations is incorrect?Think it through. Then check your answer.Question
Which one of the following combinations is incorrect?Correct answer
(B) Wheedle - Roundabout
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
We need to identify the pair where the words are not synonyms or related in meaning as indicated.- (A) Acquiescence means the reluctant acceptance of something without protest; Submission is a synonym. (Correct pair)
- (B) Wheedle means to use flattery or coaxing in order to persuade someone to do something or give one something. Roundabout means not following a short direct route or method. These words are unrelated in meaning. (Incorrect pair)
- (C) Flippancy means lack of respect or seriousness; Lightness (in terms of attitude) is a synonym. (Correct pair)
- (D) Profligate means recklessly extravagant or wasteful in the use of resources; Extravagant is a synonym. (Correct pair)
4
Q4MCQ1 markEasyBased on the given statements, select the most appropriate option to solve the given question. If two floors in a certain building are 9 feet apart, how many steps are there in a…Think it through. Then check your answer.Question
Based on the given statements, select the most appropriate option to solve the given question.If two floors in a certain building are 9 feet apart, how many steps are there in a set of stairs that extends from the first floor to the second floor of the building?Statements:
(I) Each step is 3/4 foot high.
(II) Each step is 1 foot wide.Correct answer
(A) Statement I alone is sufficient, but statement II alone is not sufficient.
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To determine the number of steps in the stairs extending from the first floor to the second floor, we need to relate the total vertical height between the floors to the dimensions of the steps. We are given:- The vertical distance (height) between the two floors is feet.
Analyzing Statement (I): "Each step is 3/4 foot high."
- This statement gives the height of each step: foot.
- Using the formula:
- Since we can uniquely determine the number of steps, Statement I alone is sufficient.
Analyzing Statement (II): "Each step is 1 foot wide."
- This statement gives the width (run) of each step.
- The width of a step does not affect the vertical height of the staircase. Without knowing the height of each step, we cannot determine the number of steps.
- Therefore, Statement II alone is not sufficient.
Conclusion
Statement I alone is sufficient to answer the question, but Statement II alone is not sufficient.Correct Option: A5
Q5MCQ1 markEasyGiven Set A = {2, 3, 4, 5} and Set B = {11, 12, 13, 14, 15}, two numbers are randomly selected, one from each set. What is the probability that the sum of the two numbers equals…Think it through. Then check your answer.Question
Given Set A = {2, 3, 4, 5} and Set B = {11, 12, 13, 14, 15}, two numbers are randomly selected, one from each set. What is the probability that the sum of the two numbers equals 16?Correct answer
(A) 0.20
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the probability that the sum of the two randomly selected numbers (one from Set and one from Set ) equals , we determine the total number of possible outcomes and the number of favorable outcomes.Step 1: Find the Total Number of Possible Outcomes
Let and .- The number of elements in Set is .
- The number of elements in Set is .
Step 2: Find the Number of Favorable Outcomes
We need to find the pairs such that , where and .Let us check the possible values for :- If , then (which is in ). is a valid pair.
- If , then (which is in ). is a valid pair.
- If , then (which is in ). is a valid pair.
- If , then (which is in ). is a valid pair.
Step 3: Calculate the Probability
The probability that the sum of the two numbers equals is given by:Correct Option: A6
Q6MCQ2 marksEasySelect the alternative meaning of the underlined part of the sentence. The chain snatchers took to their heels when the police party arrived.Think it through. Then check your answer.Question
Select the alternative meaning of the underlined part of the sentence.The chain snatchers took to their heels when the police party arrived.Correct answer
(C) took to flight
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the correct meaning of the underlined idiom "**took to their heels**", let us analyze its idiomatic usage:1.Idiom Definition:The phrase "to take to one's heels" is an established English idiom which means to run away rapidly, flee, or escape from a situation, especially out of fear or to avoid capture.2.Contextual Analysis:In the given sentence:
> "The chain snatchers took to their heels when the police party arrived."
The arrival of the police would naturally cause criminals (chain snatchers) to flee or run away to avoid being caught.3.Evaluating the Options:- Option A (took shelter in a thick jungle): This is too specific and not the general meaning of the idiom.
- Option B (open indiscriminate fire): This means to start shooting, which is incorrect.
- Option C (took to flight): "To take to flight" or "take flight" means to run away or flee from danger. This directly matches the meaning of "took to their heels".
- Option D (unconditionally surrendered): This means to give up, which is the opposite of running away.
7
Q7MCQ2 marksEasyThe given statement is followed by some courses of action. Assuming the statement to be true, decide the correct option. Statement: There has been a significant drop in the water…Think it through. Then check your answer.Question
The given statement is followed by some courses of action. Assuming the statement to be true, decide the correct option.
Statement:
There has been a significant drop in the water level in the lakes supplying water to the city.
Course of action:
(Ⅰ) The water supply authority should impose a partial cut in supply to tackle the situation.
(Ⅱ) The government should appeal to all the residents through mass media for minimal use of water.
(III) The government should ban the water supply in lower areas.Correct answer
(A) Statements I and II follow.
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let's analyze each course of action based on the statement that there has been a significant drop in the water level in the lakes supplying water to the city.Course of action (I): "The water supply authority should impose a partial cut in supply to tackle the situation."
This is a direct and logical response to a water shortage. Reducing supply helps conserve the remaining water and manage the crisis. Therefore, statement I follows.Course of action (II): "The government should appeal to all the residents through mass media for minimal use of water."
This is a proactive measure to raise public awareness and encourage responsible water usage. It promotes conservation through public cooperation. Therefore, statement II follows.Course of action (III): "The government should ban the water supply in lower areas."
Banning water supply in specific areas (like "lower areas") is discriminatory and unjust. It does not address the overall water shortage equitably and could lead to social unrest and hardship for residents in those areas. This is not a fair or sustainable solution. Therefore, statement III does not follow.Based on the analysis, only statements I and II follow.The final answer is8
Q8NAT2 marksMediumThe pie chart below has the breakup of the number of students from different departments in an engineering college for the year 2012. The proportion of male to female students in…Think it through. Then check your answer.Question
The pie chart below has the breakup of the number of students from different departments in an engineering college for the year 2012. The proportion of male to female students in each department is 5:4. There are 40 males in Electrical Engineering. What is the difference between the numbers of female students in the Civil department and the female students in the Mechanical department?
Correct answer
32 to 32
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let's break down the problem step-by-step:1.Calculate total students in Electrical Engineering:- Given: 40 males in Electrical Engineering.
- Male to Female ratio in each department = 5:4.
- If 5 parts (males) = 40, then 1 part = .
- Number of females in Electrical Engineering = 4 parts = .
- Total students in Electrical Engineering = Males + Females = .
- From the pie chart, Electrical Engineering represents 20% of the total students.
- If 20% of total students = 72, then 100% (total students) = students.
- From the pie chart, Civil department represents 30% of the total students.
- Total students in Civil department = .
- Male to Female ratio in Civil = 5:4. Total parts = .
- 1 part = .
- Number of females in Civil department = 4 parts = .
- From the pie chart, Mechanical department represents 10% of the total students.
- Total students in Mechanical department = .
- Male to Female ratio in Mechanical = 5:4. Total parts = .
- 1 part = .
- Number of females in Mechanical department = 4 parts = .
- Difference between female students in Civil and Mechanical departments = .
9
Q9MCQ2 marksMediumThe probabilities that a student passes in Mathematics, Physics and Chemistry are , , and respectively. Of these subjects, the student has 75% chance of passing in at…Think it through. Then check your answer.Question
The probabilities that a student passes in Mathematics, Physics and Chemistry are , , and respectively. Of these subjects, the student has 75% chance of passing in at least one, a 50% chance of passing in at least two and a 40% chance of passing in exactly two. Following relations are drawn in , , :
(I)
(II)
(III)Correct answer
(D) Relations I and III are true.
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let , , and be the events of passing in Mathematics, Physics, and Chemistry, respectively. The probabilities are , , and .We are given the following probabilities:1.2.3.Let's define:
We know that .
So, .We also know that .
So, .Now, let's evaluate the sum of individual probabilities, :
Now let's check the given relations:Relation (I):
. Since , Relation (I) is TRUE.Relation (II):
. Since , Relation (II) is FALSE.Relation (III):
In the context of such problems, often refers to the probability of passing all three subjects, i.e., . This is exactly .
We calculated .
Since , Relation (III) is TRUE (assuming represents ).Therefore, Relations I and III are true.The final answer is10
Q10MCQ2 marksMediumThe number of students in a class who have answered correctly, wrongly, or not attempted each question in an exam, are listed in the table below. The marks for each question are…Think it through. Then check your answer.Question
The number of students in a class who have answered correctly, wrongly, or not attempted each question in an exam, are listed in the table below. The marks for each question are also listed. There is no negative or partial marking.What is the average of the marks obtained by the class in the examination?Q No. Marks Answered Correctly Answered Wrongly Not Attempted 1 2 21 17 6 2 3 15 27 2 3 1 11 29 4 4 2 23 18 3 5 5 31 12 1 Correct answer
(C) 6.795
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
First, calculate the total number of students in the class. From row 1: . Checking other rows confirms the total is consistently 44.Next, calculate the total marks obtained by the entire class for each question:- Q1:
- Q2:
- Q3:
- Q4:
- Q5:
Questions
5511
Q11MCQ1 markEasyIf and , then is:Think it through. Then check your answer.Question
If and , then is:Correct answer
(A) (h(x))/(g(x))
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given and .1.Find the numerator :2.Find the denominator :3.Calculate the ratio:Now check the options:
(A) . This matches.
(B) . Incorrect.
(C) . Incorrect.
(D) . Incorrect sign.Thus, option (A) is correct.12
Q12MCQ1 markEasyisThink it through. Then check your answer.Question
isCorrect answer
(C) 1
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let .
Take the natural logarithm of both sides:
.This limit is of the form . Applying L'Hopital's Rule:
.So, , which implies .13
Q13MCQ1 markEasyMatch the following: | Algorithm | Design Paradigm | | :--- | :--- | | (P) Prim's algorithm for minimum spanning tree | (i) Backtracking | | (Q) Floyd-Warshall algorithm for all…Think it through. Then check your answer.Question
Match the following:Algorithm Design Paradigm (P) Prim's algorithm for minimum spanning tree (i) Backtracking (Q) Floyd-Warshall algorithm for all pairs shortest paths (ii) Greedy method (R) Mergesort (iii) Dynamic programming (S) Hamiltonian circuit (iv) Divide and conquer Correct answer
(C) P-ii, Q-iii, R-iv, S-i
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The correct matching is:- Prim's algorithm uses the Greedy method to build a Minimum Spanning Tree (MST).
- Floyd-Warshall algorithm uses Dynamic programming to find all-pairs shortest paths.
- Mergesort is a classic example of the Divide and conquer paradigm.
- Finding a Hamiltonian circuit is an NP-complete problem often solved using Backtracking.
14
Q14MCQ1 markEasyWhich one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting numbers? In the recurrence equations…Think it through. Then check your answer.Question
Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting numbers? In the recurrence equations given in the options below, is a constant.Correct answer
(B) T(n) = T(n-1) + T(1) + cn
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In the worst case of Quicksort, the partition function splits the array into two subarrays of size and (or , depending on implementation, but effectively one element is placed and the rest are on one side). The partitioning step takes time (represented by ).The recurrence relation is:Since is a constant time operation, this simplifies to , which solves to .Option (A) represents the best case (or Merge Sort).
Option (C) represents .
Option (D) represents a binary search-like recurrence but with linear work.15
Q15MCQ1 markEasyThe height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 areThink it through. Then check your answer.Question
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 areCorrect answer
(A) 63 and 6, respectively
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The question defines height as the length of the longest root-to-leaf path, which implies the number of edges on the path.For a binary tree of height :Maximum number of nodes:
This occurs in a full/complete binary tree.Minimum number of nodes:
This occurs in a skewed binary tree (essentially a linked list structure).Thus, the maximum and minimum number of nodes are 63 and 6 respectively.16
Q16MCQ1 markEasyMatch the following: (P) Condition coverage (Q) Equivalence class partitioning (R) Volume testing (S) Alpha testing (i) Black-box testing (ii) System testing (iii) White-box…Think it through. Then check your answer.Question
Match the following:(P) Condition coverage
(Q) Equivalence class partitioning
(R) Volume testing
(S) Alpha testing(i) Black-box testing
(ii) System testing
(iii) White-box testing
(iv) Performance testingCorrect answer
(C) P-iii, Q-i, R-iv, S-ii
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The matching is as follows:- (P) Condition coverage: This is a technique used in White-box testing (iii) where every condition in a decision takes all possible outcomes at least once.
- (Q) Equivalence class partitioning: This is a Black-box testing (i) technique that divides input data of a software unit into partitions of equivalent data from which test cases can be derived.
- (R) Volume testing: This is a type of Performance testing (iv) where the software is subjected to a large volume of data.
- (S) Alpha testing: This is a type of System testing (ii) performed to identify bugs before releasing the product to real users or to the public.
17
Q17MCQ1 markEasyWhich of the following is/are correct inorder traversal sequence(s) of binary search tree(s)? I. 3, 5, 7, 8, 15, 19, 25 II. 5, 8, 9, 12, 10, 15, 25 III. 2, 7, 10, 8, 14, 16, 20…Think it through. Then check your answer.Question
Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)?I. 3, 5, 7, 8, 15, 19, 25
II. 5, 8, 9, 12, 10, 15, 25
III. 2, 7, 10, 8, 14, 16, 20
IV. 4, 6, 7, 9, 18, 20, 25Correct answer
(A) I and IV only
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The inorder traversal of a Binary Search Tree (BST) always yields the keys in sorted (ascending) order.Let's check each sequence:- I. 3, 5, 7, 8, 15, 19, 25: This sequence is sorted in ascending order. (Correct)
- II. 5, 8, 9, 12, 10, 15, 25: This sequence is NOT sorted (). (Incorrect)
- III. 2, 7, 10, 8, 14, 16, 20: This sequence is NOT sorted (). (Incorrect)
- IV. 4, 6, 7, 9, 18, 20, 25: This sequence is sorted in ascending order. (Correct)
18
Q18MCQ1 markMediumWhich one of the following is TRUE at any valid state in shift-reduce parsing? (A) Viable prefixes appear only at the bottom of the stack and not inside (B) Viable prefixes appear…Think it through. Then check your answer.Question
Which one of the following is TRUE at any valid state in shift-reduce parsing?Correct answer
(C) The stack contains only a set of viable prefixes
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In shift-reduce parsing, the stack contents at any point must form a viable prefix of a right sentential form. A viable prefix is a prefix of a right sentential form that can appear on the stack of a shift-reduce parser. This property ensures that as long as the stack contains a viable prefix, it is possible to continue parsing to reach the start symbol. Therefore, the stack contains only a set of viable prefixes (meaning the content of the stack is always a viable prefix).19
Q19MCQ1 markEasyWhich one of the following is NOT equivalent to ?Think it through. Then check your answer.Question
Which one of the following is NOT equivalent to ?Correct answer
(C) (¬ p ∧ q) ∨ (p ∧ ¬ q)
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The biconditional is true if and only if and have the same truth value.1.Option (A): . This is equivalent.2.Option (B): . This is equivalent.3.Option (C): is the definition of the Exclusive OR (XOR) operation, . Since , this is NOT equivalent.4.Option (D): is true when both and are false or both are true. This is the definition of . This is equivalent.Therefore, option (C) is the correct answer.20
Q20MCQ1 markMediumFor a set , the power set of is denoted by . If , which of the following options are TRUE? I. II.…Think it through. Then check your answer.Question
For a set , the power set of is denoted by . If , which of the following options are TRUE?I.
II.
III.
IV.Correct answer
(C) I, II and III only
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given . The power set is the set of all subsets of .- Statement I: . Since the empty set is a subset of any set , it must be an element of the power set . Thus, I is TRUE.
- Statement II: . The empty set is a subset of every set, including . Thus, II is TRUE.
- Statement III: . For to be an element of , it must be a subset of . Since and , the set is indeed a subset of . Thus, III is TRUE.
- Statement IV: . For this to be true, every element of must be an element of . This means and . However, and are elements of , not subsets of . The subsets of are elements of (e.g., and ). Since and , IV is FALSE.
21
Q21MCQ1 markMediumConsider a 4-bit Johnson counter with an initial value of 0000. The counting sequence of this counter isThink it through. Then check your answer.Question
Consider a 4-bit Johnson counter with an initial value of 0000. The counting sequence of this counter isCorrect answer
(D) 0, 8, 12, 14, 15, 7, 3, 1, 0
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
A 4-bit Johnson counter (also known as a twisted ring counter) operates by shifting bits and feeding the complement of the last bit back into the first bit. Assuming a right-shift operation:1.Initial state: 0000 (Decimal 0)2.Complement of last bit (0) is 1. Shift right and feed 1 to MSB: 1000 (Decimal 8)3.Complement of last bit (0) is 1. Shift right and feed 1 to MSB: 1100 (Decimal 12)4.Complement of last bit (0) is 1. Shift right and feed 1 to MSB: 1110 (Decimal 14)5.Complement of last bit (0) is 1. Shift right and feed 1 to MSB: 1111 (Decimal 15)6.Complement of last bit (1) is 0. Shift right and feed 0 to MSB: 0111 (Decimal 7)7.Complement of last bit (1) is 0. Shift right and feed 0 to MSB: 0011 (Decimal 3)8.Complement of last bit (1) is 0. Shift right and feed 0 to MSB: 0001 (Decimal 1)9.Complement of last bit (1) is 0. Shift right and feed 0 to MSB: 0000 (Decimal 0)The sequence is 0, 8, 12, 14, 15, 7, 3, 1, 0. This matches option (D).22
Q22MCQ1 markMediumFor computers based on three-address instruction formats, each address field can be used to specify which of the following: (S1) A memory operand (S2) A processor register (S3) An…Think it through. Then check your answer.Question
For computers based on three-address instruction formats, each address field can be used to specify which of the following:
(S1) A memory operand
(S2) A processor register
(S3) An implied accumulator registerCorrect answer
(A) Either S1 or S2
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a three-address instruction format (e.g.,ADD dest, src1, src2), each address field explicitly specifies an operand location.1.(S1) A memory operand: In many architectures (like CISC), address fields can point to memory locations.2.(S2) A processor register: In RISC architectures, address fields typically specify registers.3.(S3) An implied accumulator register: By definition, an "implied" operand is not explicitly specified in an address field; it is inferred from the opcode itself (common in 0-address or 1-address architectures). Therefore, an address field cannot be used to specify an implied register.Thus, only S1 and S2 are correct.23
Q23MCQ1 markMediumSuppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are FALSE with respect to the TCP connection? I. If the sequence number of a…Think it through. Then check your answer.Question
Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are FALSE with respect to the TCP connection?I. If the sequence number of a segment is , then the sequence number of the subsequent segment is always .
II. If the estimated round trip time at any given point of time is sec, the value of the retransmission timeout is always set to greater than or equal to sec.
III. The size of the advertised window never changes during the course of the TCP connection.
IV. The number of unacknowledged bytes at the sender is always less than or equal to the advertised window.Correct answer
(B) I and III only
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let's evaluate each statement:- I. FALSE: TCP sequence numbers are byte-oriented, not segment-oriented. If a segment starts with sequence number and contains bytes of data, the next segment's sequence number will be .
- II. TRUE: The Retransmission Timeout (RTO) is calculated as . Since the variation () is non-negative, is always the estimated RTT (, denoted as here).
- III. FALSE: The advertised window (receiver window) is used for flow control and changes dynamically based on the available buffer space at the receiver.
- IV. TRUE: This is the fundamental rule of TCP flow control; the sender cannot have more outstanding (unacknowledged) data than the receiver's advertised window size.
24
Q24MCQ1 markEasySuppose that everyone in a group of people wants to communicate secretly with the others using symmetric key cryptographic system. The communication between any two…Think it through. Then check your answer.Question
Suppose that everyone in a group of people wants to communicate secretly with the others using symmetric key cryptographic system. The communication between any two persons should not be decodable by the others in the group. The number of keys required in the system as a whole to satisfy the confidentiality requirement isCorrect answer
(C) N(N-1)/2
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a symmetric key cryptographic system, for two people to communicate securely such that no one else can decode the message, they must share a unique secret key.
In a group of people, every possible pair of individuals needs such a unique key. The number of ways to choose a pair of 2 people from a group of is given by the combination formula:Thus, keys are required.25
Q25MCQ1 markEasyThe height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 areThink it through. Then check your answer.Question
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 areCorrect answer
(A) 63 and 6, respectively
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The height of a tree is defined as the length of the longest root-to-leaf path, which is the number of edges in that path. A tree with a single node has a height of 0.Maximum number of nodes:
A binary tree of a given height has the maximum number of nodes when it is a full binary tree. In a full binary tree of height , every level is completely filled with nodes.
The number of nodes at level is (assuming root is at level 0).
The total number of nodes for a height is the sum of nodes at all levels from 0 to :For a height of , the maximum number of nodes is:Minimum number of nodes:
A binary tree of a given height has the minimum number of nodes when it is a skewed tree (either left-skewed or right-skewed). In a skewed tree, each node has at most one child, forming a single path.
To achieve a height of , there must be a path of length , which requires nodes.
For a height of , the minimum number of nodes is:Therefore, the maximum and minimum number of nodes in a binary tree of height 5 are 63 and 6, respectively. This corresponds to option (A).26
Q26MCQ1 markEasyMatch the following: | | List I | | List II | |---|---|---|---| | (P) | Condition coverage | (i) | Black-box testing | | (Q) | Equivalence class partitioning | (ii) | System…Think it through. Then check your answer.Question
Match the following:List I List II (P) Condition coverage (i) Black-box testing (Q) Equivalence class partitioning (ii) System testing (R) Volume testing (iii) White-box testing (S) Alpha testing (iv) Performance testing Correct answer
(C) P-iii, Q-i, R-iv, S-ii
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let's analyze and match each item from List I with the appropriate item from List II.- (P) Condition coverage: This is a white-box testing technique that checks if each boolean sub-expression in the code has been evaluated to both true and false. Therefore, P matches with (iii) White-box testing.
- (Q) Equivalence class partitioning: This is a black-box testing technique where the input domain of a program is divided into partitions of equivalent data from which test cases are derived. The focus is on the input/output behavior without knowledge of the internal code structure. Therefore, Q matches with (i) Black-box testing.
- (R) Volume testing: This is a type of non-functional testing where the system is subjected to a large volume of data to check its performance and behavior under heavy load. This falls under the umbrella of performance testing. Therefore, R matches with (iv) Performance testing.
- (S) Alpha testing: This is a form of acceptance testing performed by in-house testers at the developer's site before the product is released to external customers. It is a type of system testing. Therefore, S matches with (ii) System testing.
- P → iii
- Q → i
- R → iv
- S → ii
27
Q27MCQ1 markEasyWhich of the following is/are correct inorder traversal sequence(s) of binary search tree(s)? I. 3, 5, 7, 8, 15, 19, 25 II. 5, 8, 9, 12, 10, 15, 25 III. 2, 7, 10, 8, 14, 16, 20…Think it through. Then check your answer.Question
Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)?
I. 3, 5, 7, 8, 15, 19, 25
II. 5, 8, 9, 12, 10, 15, 25
III. 2, 7, 10, 8, 14, 16, 20
IV. 4, 6, 7, 9, 18, 20, 25Correct answer
(A) I and IV only
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
A key property of a Binary Search Tree (BST) is that an inorder traversal of the tree visits the nodes in a sorted (non-decreasing) order of their keys. We need to check which of the given sequences are sorted.- Sequence I: 3, 5, 7, 8, 15, 19, 25
- Sequence II: 5, 8, 9, 12, 10, 15, 25
- Sequence III: 2, 7, 10, 8, 14, 16, 20
- Sequence IV: 4, 6, 7, 9, 18, 20, 25
28
Q28MCQ1 markMediumWhich one of the following is TRUE at any valid state in shift-reduce parsing?Think it through. Then check your answer.Question
Which one of the following is TRUE at any valid state in shift-reduce parsing?Correct answer
(C) The stack contains only a set of viable prefixes
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Statement I: is Context-Free. All Context-Free Languages (CFLs) are recursive (decidable). The complement of a recursive language is always recursive. Thus, is recursive. Statement I is TRUE.Statement II: is Recursively Enumerable (RE) but not recursive. The complement of an RE language that is not recursive is NOT RE. Thus, is not recursive. Statement II is FALSE.Statement III: is Context-Free. The class of Context-Free Languages is not closed under complementation. Thus, is not necessarily context-free. Statement III is FALSE.Statement IV: is recursive, which implies is also RE. The complement is recursive, so is RE. is RE. The union of two RE languages is always RE. Thus, is RE. Statement IV is TRUE.Since I and IV are true, the correct option is (D).29
Q29NAT1 markMediumConsider a system with byte-addressable memory, 32-bit logical addresses, 4 kilobyte page size and page table entries of 4 bytes each. The size of the page table in the system in…Think it through. Then check your answer.Question
Consider a system with byte-addressable memory, 32-bit logical addresses, 4 kilobyte page size and page table entries of 4 bytes each. The size of the page table in the system in megabytes is _________.Correct answer
4 to 4
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.Logical Address Space = bytes (since addresses are 32-bit and memory is byte-addressable).2.Page Size = 4 KB = bytes = bytes.3.Number of pages = pages.4.Page Table Entry (PTE) size = 4 bytes.5.Page Table Size = (Number of pages) (PTE size) = bytes = 4 MB.The size of the page table is 4 megabytes.30
Q30NAT1 markMediumThe following two functions and that share a variable with an initial value of 2 execute concurrently. [code] The number of distinct values that can possibly…Think it through. Then check your answer.Question
The following two functions and that share a variable with an initial value of 2 execute concurrently.The number of distinct values that can possibly take after the execution is _________.P1() { C = B - 1; B = 2 * C; } P2() { D = 2 * B; B = D - 1; }Correct answer
3 to 3
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Initial value: . Let be the read and write of in , and be the read and write of in .- : reads , calculates ; writes .
- : reads , calculates ; writes .
1. then : sets . sets . Final .2. then : sets . sets . Final .3.: reads 2 (), reads 2 (). writes , writes . Final .4.: reads 2 (), reads 2 (). writes , writes . Final .5.: reads 2 (), reads 2 (). writes , writes . Final .6.: reads 2 (), reads 2 (). writes , writes . Final .The distinct possible values for are . The number of distinct values is 3.31
Q31MCQ1 markEasySELECT operation in SQL is equivalent toThink it through. Then check your answer.Question
SELECT operation in SQL is equivalent toCorrect answer
(D) the projection operation in relational algebra, except that SELECT in SQL retains duplicates
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In Relational Algebra, the projection operation () selects specific columns from a relation and removes duplicate rows (since relations are sets). In SQL, theSELECTclause is used to specify columns to be retrieved, which corresponds to projection. However, unlike relational algebra, the standard SQLSELECTstatement retains duplicate rows in the result (multiset semantics) unless theDISTINCTkeyword is used. Therefore, the SQLSELECToperation is equivalent to the projection operation in relational algebra, except that it retains duplicates.32
Q32MCQ1 markEasyA file is organized so that the ordering of data records is the same as or close to the ordering of data entries in some index. Then that index is calledThink it through. Then check your answer.Question
A file is organized so that the ordering of data records is the same as or close to the ordering of data entries in some index. Then that index is calledCorrect answer
(C) Clustered
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
A clustered index is an index where the physical order of rows in the data file matches the order of the entries in the index. Since a file can be physically sorted in only one order, there can be at most one clustered index per file. If the data records are not ordered according to the index key, the index is called an unclustered (or secondary) index.33
Q33NAT1 markMediumIn the LU decomposition of the matrix , if the diagonal elements of are both 1, then the lower diagonal entry of is…Think it through. Then check your answer.Question
In the LU decomposition of the matrix , if the diagonal elements of are both 1, then the lower diagonal entry of is ________.Correct answer
5 to 5
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let . We are given , where is a lower triangular matrix and is an upper triangular matrix with diagonal elements equal to 1.Let and .Multiplying and :Comparing with :1.2.3.4.Substitute known values into equation (4):
The value of is 5.34
Q34NAT1 markEasyThe output of the following C program is___________. [code]Think it through. Then check your answer.Question
The output of the following C program is___________.void f1(int a, int b) { int c; c=a; a=b; b=c; } void f2(int *a, int *b) { int c; c=*a; *a=*b; *b=c; } int main() { int a=4, b=5, c=6; f1(a,b); f2(&b, &c); printf("%d", c-a-b); }Correct answer
-5 to -5
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.Initial values inmain:a = 4,b = 5,c = 6.2.Callf1(a, b): This function takes arguments by value. It swaps the local copies ofaandbinsidef1, but does not affect the variables inmain. Afterf1, values inmainremain:a = 4,b = 5,c = 6.3.Callf2(&b, &c): This function takes pointers (addresses). It swaps the values pointed to bya(which is&bof main) andb(which is&cof main).*arefers tobin main.*brefers tocin main.- The swap logic:
temp = b; b = c; c = temp; - After
f2,bbecomes 6 andcbecomes 5. - Values in
mainare now:a = 4,b = 6,c = 5.
printf("%d", c - a - b):- Calculation: .
35
Q35MCQ1 markEasyWhat are the worst-case complexities of insertion and deletion of a key in a binary search tree?Think it through. Then check your answer.Question
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?Correct answer
(B) θ(n) for both insertion and deletion
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a Binary Search Tree (BST), the time complexity for insertion and deletion depends on the height of the tree ().- In the best/average case (balanced tree), .
- In the worst case (skewed tree, e.g., strictly increasing or decreasing order), the height becomes .
36
Q36NAT2 marksMediumSuppose that the stop-and-wait protocol is used on a link with a bit rate of 64 kilobits per second and 20 milliseconds propagation delay. Assume that the transmission time for…Think it through. Then check your answer.Question
Suppose that the stop-and-wait protocol is used on a link with a bit rate of 64 kilobits per second and 20 milliseconds propagation delay. Assume that the transmission time for the acknowledgement and the processing time at nodes are negligible. Then the minimum frame size in bytes to achieve a link utilization of at least 50% is ___________.Correct answer
160 to 160
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
For Stop-and-Wait protocol, the efficiency (utilization) is given by:where is the transmission time and is the propagation delay.Given:
Bandwidth kbps bps.
Propagation delay ms s.
Target utilization .Substituting into the efficiency formula:Let be the frame size in bits. Then .Converting to bytes:Note on the Official Answer (160):
The official answer key provided in the document is 160. This result is obtained if the "20 milliseconds propagation delay" is interpreted as the total round-trip delay (or if the term in the denominator is taken as 20 ms). If ms, then ms. Following the same logic (), we would get ms, leading to . Given the answer key, this interpretation is likely intended.37
Q37MCQ2 marksEasyConsider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4. | Array Index | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |…Think it through. Then check your answer.Question
Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4.Now consider that a value 35 is inserted into this heap. After insertion, the new heap isArray Index 1 2 3 4 5 6 7 8 9 Value 40 30 20 10 15 16 17 8 4 Correct answer
(B) 40, 35, 20, 10, 30, 16, 17, 8, 4, 15
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The initial max heap array is:[40, 30, 20, 10, 15, 16, 17, 8, 4].
This corresponds to the following heap structure:40 / \ 30 20 / \ / \ 10 15 16 17 / \ 8 4
When a new value (35) is inserted into a max heap, it is first added to the end of the array, and then 'heapified up' to maintain the max heap property.1.Add 35 to the end:The array becomes[40, 30, 20, 10, 15, 16, 17, 8, 4, 35].
The new element 35 is at index 10.2.Heapify up (percolate up):- Compare 35 (index 10) with its parent (index ):
Array:[40, 30, 20, 10, 35, 16, 17, 8, 4, 15].
The value 35 is now at index 5.- Compare 35 (index 5) with its new parent (index ):
Array:[40, 35, 20, 10, 30, 16, 17, 8, 4, 15].
The value 35 is now at index 2.- Compare 35 (index 2) with its new parent (index ):
[40, 35, 20, 10, 30, 16, 17, 8, 4, 15].This matches option (B).The final heap structure:40 / \ 35 20 / \ / \ 10 30 16 17 / \ 8 438
Q38NAT2 marksMediumConsider the following C program segment. [code] The cyclomatic complexity of the program segment is ________.Think it through. Then check your answer.Question
Consider the following C program segment.while(first <= last) { if (array[middle] < search) first = middle + 1; else if (array[middle] == search) found = TRUE; else last = middle - 1; middle = (first + last)/2; } if (first > last) notPresent = TRUE;
The cyclomatic complexity of the program segment is ________.Correct answer
5 to 5
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The given C program segment implements a binary search algorithm.Cyclomatic complexity measures the number of linearly independent paths through a program's source code. It can be calculated using the formula:
where:- is the number of edges in the control flow graph.
- is the number of nodes in the control flow graph.
- is the number of connected components (usually 1 for a single program).
Let's identify the decision points in the given code segment:1.while(first <= last): This is a decision point.2.if (array[middle] < search): This is a decision point.3.else if (array[middle] == search): This is a decision point.4.There are 4 decision points in the code segment.Using the simplified formula:if (first > last): This is a decision point.
Cyclomatic Complexity = Number of decision points + 1
Cyclomatic Complexity = Thus, the cyclomatic complexity of the program segment is 5.39
Q39NAT2 marksMediumConsider a LAN with four nodes and . Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision…Think it through. Then check your answer.Question
Consider a LAN with four nodes and . Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision is said to have occurred if more than one node transmit in the same slot. The probabilities of generation of a frame in a time slot by and are 0.1, 0.2, 0.3 and 0.4, respectively. The probability of sending a frame in the first slot without any collision by any of these four stations is ________.Correct answer
0.4 to 0.46
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let be the probability that station generates a frame in a time slot.
Given:
Let be the probability that station does NOT generate a frame in a time slot.
For a frame to be sent in the first slot without any collision, exactly one station must transmit, and the other three must not transmit. We assume the events of each station transmitting are independent.There are four mutually exclusive scenarios for a successful transmission:1.Only transmits:
2.Only transmits:
3.Only transmits:
4.Only transmits:
The total probability of sending a frame in the first slot without any collision is the sum of these probabilities:
Total Probability
Total Probability The probability is 0.4404.40
Q40MCQ2 marksEasyThe binary operator is defined by the following truth table. | p | q | p q | |---|---|----------| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 0 | Which one…Think it through. Then check your answer.Question
The binary operator is defined by the following truth table.Which one of the following is true about the binary operator ?p q p q 0 0 0 0 1 1 1 0 1 1 1 0 Correct answer
(A) Both commutative and associative
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The given binary operator is defined by the truth table:This truth table corresponds to the XOR (exclusive OR) operation.p q p q 0 0 0 0 1 1 1 0 1 1 1 0 1.Commutativity: An operation is commutative if .From the table:
Since , and similarly for other pairs (e.g., , ), the operation is commutative.2.Associativity: An operation is associative if .Let's test with all possible combinations of . The XOR operation is known to be associative.
For example, let :
The results are equal.
Let :
The results are equal.
Since XOR is both commutative and associative, option A is correct.The final answer is41
Q41NAT2 marksEasyThink it through. Then check your answer.Question
Correct answer
0.99 to 0.99
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The given summation is .We can use partial fraction decomposition for the term :
Multiply by : Set :
Set : So, .Now, substitute this back into the summation:
This is a telescoping series:
For :
For :
For :
...
For : When we sum these terms, the intermediate terms cancel out:
The sum simplifies to the first term of the first parenthesis and the last term of the last parenthesis:
The final answer is42
Q42MCQ2 marksHardSuppose is a lattice represented by the following Hasse diagram: [figure] For any , not necessarily distinct, and are…Think it through. Then check your answer.Question
Suppose is a lattice represented by the following Hasse diagram:
For any , not necessarily distinct, and are join and meet of , respectively. Let be the set of all ordered triplets of the elements of . Let be the probability that an element chosen equiprobably satisfies . ThenCorrect answer
(B) pᵣ = 1
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The given condition is one of the distributive laws for lattices. A lattice is called distributive if it satisfies both distributive laws for all its elements.First, let's analyze the given Hasse diagram for the lattice :From the diagram, we can identify the order relations and thus the join () and meet () operations:t | r / \ q s \ / p- is the bottom element (least element).
- is the top element (greatest element).
- and are incomparable elements, both covering .
- covers both and . This means and .
- covers .
.The final answer is43
Q43MCQ2 marksMediumConsider the operations and . Which one of the following is correct?Think it through. Then check your answer.Question
Consider the operations and .Which one of the following is correct?Correct answer
(B) Only \f\ is functionally complete
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
A set of functions is functionally complete if it can generate all possible boolean functions (or equivalently, if it can generate NOT and AND/OR).Analyze :Since , it is simply a projection (identity) function. It cannot generate NOT or any other operation. Thus, is not functionally complete.Analyze :Check Post's Functional Completeness Theorem criteria (T0, T1, Self-Dual, Monotonic, Linear):1.T0 (Preserves 0): . Not T0.2.T1 (Preserves 1): . Not T1.Since is neither T0 nor T1, it can generate a NOT function (e.g., or similar). With NOT and the complex structure allowing AND/OR generation (it is not linear or monotonic), it is functionally complete.Therefore, only is functionally complete.44
Q44NAT2 marksEasyLet be a connected planar graph with 10 vertices. If the number of edges on each face is three, then the number of edges in is ___________.Think it through. Then check your answer.Question
Let be a connected planar graph with 10 vertices. If the number of edges on each face is three, then the number of edges in is ___________.Correct answer
24 to 24
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
For a connected planar graph, Euler's formula states:where is the number of vertices, is the number of edges, and is the number of faces.Given:
Every face is bounded by 3 edges (triangulation). The sum of degrees of the faces is equal to twice the number of edges:Since each face has 3 edges:Substitute and into Euler's formula:The number of edges in is 24.45
Q45MCQ2 marksEasyWhat are the worst-case complexities of insertion and deletion of a key in a binary search tree?Think it through. Then check your answer.Question
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?Correct answer
(B) θ(n) for both insertion and deletion
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a Binary Search Tree (BST), the worst-case scenario occurs when the tree is skewed (either left-skewed or right-skewed). In such a case, the tree effectively becomes a linked list, and its height becomes , where is the number of nodes. Since both insertion and deletion operations in a BST require traversing from the root to a leaf or a specific node, their time complexity is proportional to the height of the tree. Therefore, the worst-case complexity for both insertion and deletion is .46
Q46MCQ2 marksMediumA variable is said to be live at a statement in a program if the following three conditions hold simultaneously: i. There exists a statement that uses ii.…Think it through. Then check your answer.Question
A variable is said to be live at a statement in a program if the following three conditions hold simultaneously:i. There exists a statement that uses
ii. There is a path from to in the flow graph corresponding to the program
iii. The path has no intervening assignment to including at andThe variables which are live both at the statement in basic block 2 and at the statement in basic block 3 of the above control flow graph are
Correct answer
(C) r, u
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To determine liveness, we check which variables are used along a path from the block without being redefined.At Block 2 ():- Uses and . Since they are used immediately, they are live.
- Path : Block 4 is . Uses . Defines .
- is defined in Block 2, so it is not live-in at 2.
- is defined in Block 4, so dead.
- Path : Block 1 defines . So are dead at 2.
- Thus, live at 2: .
- Uses and . So are live.
- Path : Block 4 uses . Defines .
- is used in 4 and not defined in 3. So is live.
- is used in 4 and not defined in 3. So is live.
- is defined in 3, so dead before 3.
- Path : Block 1 defines . So is dead.
- Thus, live at 3: .
.Correct option is (C).47
Q47NAT2 marksMediumThe least number of temporary variables required to create a three-address code in static single assignment form for the expression is…Think it through. Then check your answer.Question
The least number of temporary variables required to create a three-address code in static single assignment form for the expression is ___________.Correct answer
8 to 8
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The expression is .
Static Single Assignment (SSA) form requires a new temporary variable for every assignment (result of an operation).Three-address code sequence:1.2.3.4.5.6.7.8.There are 8 operations, each producing a result. In SSA, each result must be stored in a unique variable. Thus, 8 temporary variables are required.48
Q48NAT2 marksMediumConsider an Entity-Relationship (ER) model in which entity sets and are connected by an relationship . and are connected by a (1 on the…Think it through. Then check your answer.Question
Consider an Entity-Relationship (ER) model in which entity sets and are connected by an relationship . and are connected by a (1 on the side of and on the side of ) relationship . has two single-valued attributes and of which is the key attribute. has two single-valued attributes and of which is the key attribute. has two single-valued attributes and of which is the key attribute. The relationships do not have any attributes.If a relational model is derived from the above ER model, then the minimum number of relations that would be generated if all the relations are in 3NF is ___________.Correct answer
4 to 4
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The mapping from ER to Relational model is as follows:1.Entity becomes a relation .2.Entity becomes a relation .3.Entity becomes a relation .4.Relationship is , so it requires a separate relation .5.Relationship is ( is 1-side, is n-side). This is mapped by adding the primary key of the 1-side () as a foreign key to the relation for the n-side (). So becomes . No separate table is needed for .Total relations generated: . The count is 4.49
Q49NAT2 marksMediumConsider a LAN with four nodes and . Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision…Think it through. Then check your answer.Question
Consider a LAN with four nodes and . Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision is said to have occurred if more than one node transmit in the same slot. The probabilities of generation of a frame in a time slot by and are 0.1, 0.2, 0.3 and 0.4, respectively. The probability of sending a frame in the first slot without any collision by any of these four stations is ___________.Correct answer
0.4 to 0.46
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The probability that exactly one station transmits in a given slot (no collision) is the sum of the probabilities of each station transmitting while the others do not. Let . The probability is:This value falls within the range [0.40, 0.46].50
Q50MCQ2 marksEasyThe binary operator is defined by the following truth table. | | | | |---|---|---| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 0 | Which one of…Think it through. Then check your answer.Question
The binary operator is defined by the following truth table.Which one of the following is true about the binary operator ?0 0 0 0 1 1 1 0 1 1 1 0 Correct answer
(A) Both commutative and associative
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The given truth table is for the XOR () operation. XOR is commutative because (the output is 1 if and only if the inputs are different, which is independent of order). XOR is also associative because . This can be verified by checking all 8 possible combinations of . Thus, the operator is both commutative and associative.51
Q51MCQ2 marksMediumLet be a simple undirected graph, and be a particular vertex in it called the source. For , let denote the shortest distance in from to…Think it through. Then check your answer.Question
Let be a simple undirected graph, and be a particular vertex in it called the source. For , let denote the shortest distance in from to . A breadth first search (BFS) is performed starting at . Let be the resultant BFS tree. If is an edge of that is not in , then which one of the following CANNOT be the value of ?Correct answer
(D) 2
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a BFS, for any edge in the graph , the difference in shortest path distances from the source satisfies . Specifically for non-tree edges in BFS:1.Cross edges within the same level: .2.Cross edges between adjacent levels: or or .An edge cannot skip a level (i.e., connect vertices with distance difference ) in BFS. Therefore, cannot be 2.52
Q52NAT2 marksMediumConsider a uniprocessor system executing three tasks and , each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at…Think it through. Then check your answer.Question
Consider a uniprocessor system executing three tasks and , each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3, 7 and 20 milliseconds, respectively. The priority of each task is the inverse of its period, and the available tasks are scheduled in order of priority, with the highest priority task scheduled first. Each instance of and requires an execution time of 1, 2 and 4 milliseconds, respectively. Given that all tasks initially arrive at the beginning of the millisecond and task preemptions are allowed, the first instance of completes its execution at the end of __________ milliseconds.Correct answer
12 to 12
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
We are given three tasks with periods and execution times :- . Priority: High (1/3).
- . Priority: Medium (1/7).
- . Priority: Low (1/20).
- t=0: arrive. runs (highest priority).
- t=1: finishes. runs.
- t=3: finishes (ran for 2ms). arrives again. runs.
- t=4: finishes. runs (first time).
- t=6: has run for 2ms (needs 2 more). arrives. is preempted. runs.
- t=7: finishes. arrives. runs.
- t=9: finishes (ran for 2ms). arrives. runs.
- t=10: finishes. resumes.
- t=12: runs for 2ms (total 2+2=4ms). finishes.
53
Q53MCQ2 marksMediumA positive edge-triggered D flip-flop is connected to a positive edge-triggered JK flip-flop as follows. The output of the D flip-flop is connected to both the J and K inputs…Think it through. Then check your answer.Question
A positive edge-triggered D flip-flop is connected to a positive edge-triggered JK flip-flop as follows. The output of the D flip-flop is connected to both the J and K inputs of the JK flip-flop, while the output of the JK flip-flop is connected to the input of the D flip-flop. Initially, the output of the D flip-flop is set to logic one and the output of the JK flip-flop is cleared. Which one of the following is the bit sequence (including the initial state) generated at the output of the JK flip-flop when the flip-flops are connected to a free-running common clock? Assume that J = K = 1 is the toggle mode and J = K = 0 is the state-holding mode of the JK flip-flop. Both the flip-flops have non-zero propagation delays.Correct answer
(A) 0110110...
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let be the output of the D flip-flop and be the output of the JK flip-flop.
Connections:- Inputs before edge: (Toggle), .
- New outputs: toggles . becomes .
- State: . Sequence: 0, 1.
- Inputs before edge: (Hold), .
- New outputs: holds . becomes .
- State: . Sequence: 0, 1, 1.
- Inputs before edge: (Toggle), .
- New outputs: toggles . becomes .
- State: . Sequence: 0, 1, 1, 0.
- Inputs before edge: (Toggle), .
- New outputs: toggles . becomes .
- State: . Sequence: 0, 1, 1, 0, 1.
54
Q54NAT2 marksMediumConsider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per minute (RPM). It has 600 sectors per track and each sector can store 512 bytes…Think it through. Then check your answer.Question
Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per minute (RPM). It has 600 sectors per track and each sector can store 512 bytes of data. Consider a file stored in the disk. The file contains 2000 sectors. Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is __________.Correct answer
14020 to 14020
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given:- Seek time () = 4 ms
- Rotation speed = 10,000 RPM
- Sectors per track = 600
- File size = 2000 sectors
- Condition: Every sector access requires a seek.
1.Time for one rotation ():2.Average Rotational Latency ():3.Transfer Time per Sector ():4.Total Time per Sector Access:5.Total Time for 2000 Sectors:55
Q55NAT2 marksMediumConsider a non-pipelined processor with a clock rate of 2.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a pipelined processor with five…Think it through. Then check your answer.Question
Consider a non-pipelined processor with a clock rate of 2.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a pipelined processor with five stages; but due to the internal pipeline delay, the clock speed is reduced to 2 gigahertz. Assume that there are no stalls in the pipeline. The speed up achieved in this pipelined processor is_________.Correct answer
3.2 to 3.2
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
For the non-pipelined processor:- Clock Rate
- Execution time per instruction
- Clock Rate
- Ideally, (since there are no stalls)
- Execution time per instruction
56
Q56NAT2 marksMediumSuppose the following disk request sequence (track numbers) for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W…Think it through. Then check your answer.Question
Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W head is on track 50. The additional distance that will be traversed by the R/W head when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN (Elevator) algorithm (assuming that SCAN algorithm moves towards 100 when it starts execution) is_________ tracks.Correct answer
10 to 10
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
SSTF (Shortest Seek Time First):
Initial position: 50
Requests: {10, 20, 25, 45, 50, 60, 70, 80, 90}
(Note: 50 is in the request list and is serviced immediately at start)Sequence:1.Start at 50. Closest is 45 (dist 5).2.At 45. Closest is 60 (dist 15) vs 25 (dist 20). Go to 60.3.At 60. Closest is 70 (dist 10).4.At 70. Closest is 80 (dist 10).5.At 80. Closest is 90 (dist 10).6.At 90. Closest is 25 (dist 65).7.At 25. Closest is 20 (dist 5).8.At 20. Closest is 10 (dist 10).Path:
Total Distance =
tracks.SCAN (Elevator):
Initial position: 50, Direction: Towards 100 (Up)
Requests in Up direction: 50, 60, 70, 80, 90
Requests in Down direction: 45, 25, 20, 10Path (assuming LOOK behavior as is common in such problems unless 'end' is specified as a target):1.Move Up:2.Reverse at 90 (last request in this direction).3.Move Down:Total Distance = tracks.Difference:
tracks.57
Q57MCQ2 marksMediumConsider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following is true with…Think it through. Then check your answer.Question
Consider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following is true with respect to page replacement policies First In First Out (FIFO) and Least Recently Used (LRU)?Correct answer
(A) Both incur the same number of page faults
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Reference String: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3
Frames: 5FIFO:1.3: Miss [3]2.8: Miss [3, 8]3.2: Miss [3, 8, 2]4.3: Hit5.9: Miss [3, 8, 2, 9]6.1: Miss [3, 8, 2, 9, 1] (Full)7.6: Miss (Replace 3) -> [6, 8, 2, 9, 1]8.3: Miss (Replace 8) -> [6, 3, 2, 9, 1]9.8: Miss (Replace 2) -> [6, 3, 8, 9, 1]10.9: Hit11.3: Hit12.6: Hit13.2: Miss (Replace 9) -> [6, 3, 8, 2, 1]14.1: Hit15.3: HitTotal FIFO Faults = 9LRU:1.3: Miss [3]2.8: Miss [3, 8]3.2: Miss [3, 8, 2]4.3: Hit (Order: 8, 2, 3)5.9: Miss [3, 8, 2, 9]6.1: Miss [3, 8, 2, 9, 1]7.6: Miss (Replace LRU 8? No, LRU is 8? Sequence so far: 3, 8, 2, 3, 9, 1. LRU stack: 1, 9, 3, 2, 8. 8 is LRU). -> [3, 6, 2, 9, 1]8.3: Hit9.8: Miss (Replace LRU 2) -> [3, 6, 8, 9, 1]10.9: Hit11.3: Hit12.6: Hit13.2: Miss (Replace LRU 1) -> [3, 6, 8, 9, 2]14.1: Miss (Replace LRU 8) -> [3, 6, 1, 9, 2]15.3: HitLet's re-trace LRU carefully:
Stack (Right = MRU):
3 -> M [3]
8 -> M [3, 8]
2 -> M [3, 8, 2]
3 -> H [8, 2, 3]
9 -> M [8, 2, 3, 9]
1 -> M [8, 2, 3, 9, 1]
6 -> M (Evict 8) [2, 3, 9, 1, 6]
3 -> H [2, 9, 1, 6, 3]
8 -> M (Evict 2) [9, 1, 6, 3, 8]
9 -> H [1, 6, 3, 8, 9]
3 -> H [1, 6, 8, 9, 3]
6 -> H [1, 8, 9, 3, 6]
2 -> M (Evict 1) [8, 9, 3, 6, 2]
1 -> M (Evict 8) [9, 3, 6, 2, 1]
3 -> H [9, 6, 2, 1, 3]
Total LRU Faults = 9Both policies incur 9 page faults.58
Q58NAT2 marksEasyThink it through. Then check your answer.Question
Correct answer
-1 to -1
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let .Substitute . Then , which implies .Change the limits:- Lower limit:
- Upper limit:
59
Q59MCQ2 marksEasyConsider the following matrix where two elements are unknown and are marked by and . The eigenvalues of this matrix are -1 and 7. What are the values of…Think it through. Then check your answer.Question
Consider the following matrix where two elements are unknown and are marked by and . The eigenvalues of this matrix are -1 and 7. What are the values of and ?Correct answer
(D) a=5, b=3
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given eigenvalues and .Property 1: Trace of matrix = Sum of eigenvaluesProperty 2: Determinant of matrix = Product of eigenvaluesSubstitute :Thus, and .60
Q60MCQ2 marksMediumAn algorithm performs find operations, insert operations, delete operations, and decrease-key operations on a set of data…Think it through. Then check your answer.Question
An algorithm performs find operations, insert operations, delete operations, and decrease-key operations on a set of data items with keys drawn from a linearly ordered set. For a delete operation, a pointer is provided to the record that must be deleted. For the decrease-key operation, a pointer is provided to the record that has its key decreased. Which one of the following data structures is the most suited for the algorithm to use, if the goal is to achieve the best total asymptotic complexity considering all the operations?Correct answer
(A) Unsorted array
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let's analyze the cost for each operation in an Unsorted Array:- Insert: (append to end). Total cost for inserts:
O(N). - Find:
O(N)(linear search). Total cost for finds: . - Delete: (since a pointer is provided, we can swap with the last element and decrement size). Total cost: .
- Decrease-key: (direct access via pointer). Total cost: .
- Insert: . Total cost: .
- Find:
O(N). Total cost: . - Delete: . Total cost: .
- Decrease-key: . Total cost: .
O(N)insertion cost, leading to total complexity, which is much worse.- Insert: (append to end). Total cost for inserts:
61
Q61NAT2 marksMediumConsider the following relations: Student | Roll No | Student_Name | |---|---| | 1 | Raj | | 2 | Rohit | | 3 | Raj | Performance | Roll No | Course | Marks | |---|---|---|…Think it through. Then check your answer.Question
Consider the following relations:StudentPerformanceRoll No Student_Name 1 Raj 2 Rohit 3 Raj Consider the following SQL query.Roll No Course Marks 1 Math 80 1 English 70 2 Math 75 3 English 80 2 Physics 65 3 Math 80 The number of rows that will be returned by the SQL query is ___________.SELECT S.Student_Name, sum(P.Marks) FROM Student S, Performance P WHERE S.Roll_No = P.Roll_No GROUP BY S.Student_NameCorrect answer
2 to 2
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The SQL query joins theStudentandPerformancetables onRoll_Noand then groups the results byStudent_Name.1.Join Step:- Roll No 1 (Raj) matches with Math (80) and English (70).
- Roll No 2 (Rohit) matches with Math (75) and Physics (65).
- Roll No 3 (Raj) matches with English (80) and Math (80).
- The grouping is done on
Student_Name. - The distinct student names are "Raj" and "Rohit".
- All records for "Raj" (from both Roll No 1 and Roll No 3) are grouped together into a single group.
- All records for "Rohit" are grouped into a single group.
Student_Namevalues ("Raj" and "Rohit"), the query will return 2 rows.62
Q62MCQ2 marksMediumWhat is the output of the following C code? Assume that the address of x is 2000 (in decimal) and an integer requires four bytes of memory. [code]Think it through. Then check your answer.Question
What is the output of the following C code? Assume that the address of x is 2000 (in decimal) and an integer requires four bytes of memory.int main () { unsigned int x[4][3] = {{1,2,3},{4,5,6},{7,8,9},{10,11,12}}; printf("%u, %u, %u", x+3, *(x+3), *(x+2)+3); }Correct answer
(A) 2036, 2036, 2036
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The arrayxis defined asunsigned int x[4][3]. The base address is 2000, andsizeof(int) = 4.1.x+3:xis a pointer to an array of 3 integers (typeint (*)[3]). Incrementing it by 3 moves the pointer by .- Size of one row = bytes.
- Address = .
*(x+3): This dereferences the pointer to the 3rd row, givingx[3]. In C, an array name used in an expression decays to a pointer to its first element. Sox[3]decays to a pointer tox[3][0](typeint *).- The address is the same as the start of the 3rd row: 2036.
*(x+2)+3:*(x+2)isx[2], which points to the start of the 2nd row (index 2). Address = . Adding 3 to thisint *pointer moves it by bytes.- Address = .
63
Q63NAT2 marksHardThe graph shown below has 8 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 36 and contains the edges: {(A, C), (B, C), (B, E), (E, F), (D,…Think it through. Then check your answer.Question
The graph shown below has 8 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 36 and contains the edges: {(A, C), (B, C), (B, E), (E, F), (D, F)}. The edge weights of only those edges which are in the MST are given in the figure shown below. The minimum possible sum of weights of all 8 edges of this graph is ___________.
Correct answer
69 to 69
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The graph has 8 edges. The MST has 5 edges with weights: . Sum = 36.
The 3 non-MST edges are , , and .
For the MST to be valid, every non-MST edge must create a cycle where is the strictly heaviest edge (since weights are distinct).1.Edge (A,B): Forms cycle A-C-B. Path in MST is A-C (9) - C-B (2). Max weight is 9. Thus, . Minimum integer is 10.2.Edge (C,D): Forms cycle C-B-E-F-D. Path in MST is C-B (2) - B-E (15) - E-F (4) - F-D (6). Max weight is 15. Thus, . Minimum integer is 16.3.Edge (D,E): Forms cycle D-F-E. Path in MST is D-F (6) - F-E (4). Max weight is 6. Thus, . Minimum integer is 7.We must ensure all weights are distinct. The existing weights are . The proposed new weights are . All are distinct and valid.Total sum = MST Weight +
Total sum = .64
Q64MCQ2 marksMediumConsider the following C function. [code] Which one of the following most closely approximates the return value of the functionfun1?Think it through. Then check your answer.Question
Consider the following C function.Which one of the following most closely approximates the return value of the functionint fun1(int n){ int i,j,k,p,q=0; for (i=1; i<n; ++i) { p=0; for (j=n; j>1; j=j/2) ++p; for (k=1; k<p; k=k*2) ++q; } return q; }fun1?Correct answer
(D) n log (log n)
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let's analyze the loops:1.The outer loop runs for to , i.e., iterations.2.Inside the outer loop, the first inner loopfor (j=n; j>1; j=j/2)divides by 2 repeatedly. The number of iterations is . Thus, after this loop, .3.The second inner loopfor (k=1; k<p; k=k*2)multiplies by 2 repeatedly until . The number of iterations is . Since , this loop runs times.4.The variable is incremented in the innermost loop. So for each iteration of the outer loop, increases by .Total value of .Complexity: .65
Q65MCQ2 marksEasyConsider the following pseudo code, where and are positive integers. [code] The post condition that needs to be satisfied after the program terminates isThink it through. Then check your answer.Question
Consider the following pseudo code, where and are positive integers.The post condition that needs to be satisfied after the program terminates isbegin q := 0 r := x while r >= y do begin r := r - y q := q + 1 end endCorrect answer
(B) \x = qy + r ∧ r < y\
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The code implements the division algorithm using repeated subtraction to find the quotient and remainder when is divided by .- Initially, , so holds ().
- In each iteration, is decreased by and is increased by 1. The invariant is maintained because .
- The loop terminates when the condition becomes false, i.e., .
- Since and are positive integers and we subtract only when , remains non-negative.