The PYQ practice room
GATE CS 2018 Set 1
All 65 solved GATE CS 2018 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 markEasy“From where are they bringing their books? ______ bringing ___ books from ___.” The words that best fill the blanks in the above sentence areThink it through. Then check your answer.Question
“From where are they bringing their books? ______ bringing ___ books from ___.”The words that best fill the blanks in the above sentence areCorrect answer
(B) They’re, their, there
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The sentence requires a subject and verb for the first blank, a possessive pronoun for the second, and an adverb of place for the third.1.They're (contraction of 'They are') is the subject and verb: "They're bringing..."2.their is the possessive pronoun referring to the books: "...their books..."3.there is the adverb indicating location: "...from there."Thus, the complete sentence is: "From where are they bringing their books? They're bringing their books from there."2
Q2MCQ1 markEasy“A _________ investigation can sometimes yield new facts, but typically organized ones are more successful.” The word that best fills the blank in the above sentence isThink it through. Then check your answer.Question
“A _________ investigation can sometimes yield new facts, but typically organized ones are more successful.”The word that best fills the blank in the above sentence isCorrect answer
(A) meandering
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The sentence uses the conjunction "but" to contrast the blank with "organized ones".- Meandering means following a winding course or proceeding without a specific goal/organization, which provides the necessary contrast to "organized".
- Timely, consistent, and systematic are all characteristics that align with being organized rather than contrasting with it.
3
Q3MCQ1 markEasyThe area of a square is . What is the area of the circle which has the diagonal of the square as its diameter?Think it through. Then check your answer.Question
The area of a square is . What is the area of the circle which has the diagonal of the square as its diameter?Correct answer
(D) (1)/(2) π d
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.Let the side of the square be . The area of the square is given as .2.The diagonal of the square is .3.The diameter of the circle is equal to the diagonal of the square, so .4.The radius of the circle is .5.The area of the circle is .6.Substituting , we get .4
Q4MCQ1 markEasyWhat would be the smallest natural number which when divided either by 20 or by 42 or by 76 leaves a remainder of 7 in each case?Think it through. Then check your answer.Question
What would be the smallest natural number which when divided either by 20 or by 42 or by 76 leaves a remainder of 7 in each case?Correct answer
(C) 7987
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the smallest natural number that leaves a remainder of 7 when divided by 20, 42, or 76, we first find the Least Common Multiple (LCM) of 20, 42, and 76.Prime factorization:
.The required number is .5
Q5MCQ1 markEasyWhat is the missing number in the following sequence? 2, 12, 60, 240, 720, 1440, _____, 0Think it through. Then check your answer.Question
What is the missing number in the following sequence?2, 12, 60, 240, 720, 1440, _____, 0Correct answer
(B) 1440
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The sequence is formed by multiplying each term by a decreasing integer:
The missing number is 1440.6
Q6MCQ2 marksMediumIn appreciation of the social improvements completed in a town, a wealthy philanthropist decided to gift Rs 750 to each male senior citizen in the town and Rs 1000 to each female…Think it through. Then check your answer.Question
In appreciation of the social improvements completed in a town, a wealthy philanthropist decided to gift Rs 750 to each male senior citizen in the town and Rs 1000 to each female senior citizen. Altogether, there were 300 senior citizens eligible for this gift. However, only of the eligible men and of the eligible women claimed the gift. How much money (in Rupees) did the philanthropist give away in total?Correct answer
(B) 2,00,000
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let be the number of eligible male senior citizens and be the number of eligible female senior citizens.
Given: .Number of men who claimed the gift = .
Number of women who claimed the gift = .Total money given away =
Total money =
Total money =
Total money =
Total money = Substituting :
Total money = .7
Q7MCQ2 marksEasyIf and , what is the value of the product ?Think it through. Then check your answer.Question
If and , what is the value of the product ?Correct answer
(C) 1
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given:
---(1)
---(2)
---(3)From (1) and (2):
Substitute this into (3):
Since , cannot be . Assuming and for a unique solution:8
Q8MCQ2 marksEasyIn a party, 60% of the invited guests are male and 40% are female. If 80% of the invited guests attended the party and if all the invited female guests attended, what would be the…Think it through. Then check your answer.Question
In a party, 60% of the invited guests are male and 40% are female. If 80% of the invited guests attended the party and if all the invited female guests attended, what would be the ratio of males to females among the attendees in the party?Correct answer
(B) 1:1
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let the total number of invited guests be 100.
Number of invited males = 60% of 100 = 60
Number of invited females = 40% of 100 = 40Total number of attendees = 80% of 100 = 80
It is given that all invited female guests attended, so number of female attendees = 40.
Number of male attendees = Total attendees - Female attendees = 80 - 40 = 40.Ratio of males to females among attendees = 40 : 40 = 1 : 1.9
Q9MCQ2 marksMediumIn the figure below, is equal to ____________ . [figure]Think it through. Then check your answer.Question
In the figure below, is equal to ____________ .
Correct answer
(A) BCD - BAD
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In , is an exterior angle at . Thus, .
In , is an exterior angle at . Thus, .Summing these two equations:
In quadrilateral , the sum of interior angles is :
Also, and are exterior angles at for the quadrilateral.
Substituting these into the sum equation:10
Q10MCQ2 marksMediumA six sided unbiased die with four green faces and two red faces is rolled seven times. Which of the following combinations is the most likely outcome of the experiment?Think it through. Then check your answer.Question
A six sided unbiased die with four green faces and two red faces is rolled seven times. Which of the following combinations is the most likely outcome of the experiment?Correct answer
(C) Five green faces and two red faces.
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
This is a problem of binomial distribution.
Let G be the event of getting a green face and R be the event of getting a red face.
The die has 6 faces in total.
Number of green faces = 4
Number of red faces = 2Probability of getting a green face, .
Probability of getting a red face, .The die is rolled 7 times, so the number of trials is .Let be the number of green faces obtained in 7 rolls. The number of red faces will be . The random variable follows a binomial distribution with parameters and .
The probability of getting exactly green faces is given by the formula:
The most likely outcome corresponds to the mode of the binomial distribution. The mode for a binomial distribution is the integer that satisfies .Let's calculate the value of :
So, the mode is .
This means the most likely number of green faces is 5. If there are 5 green faces, the number of red faces must be .Therefore, the most likely outcome is 5 green faces and 2 red faces.Alternatively, we can calculate the probability for each option:
(A) 3 green, 4 red ():
(B) 4 green, 3 red ():
(C) 5 green, 2 red ():
(D) 6 green, 1 red (): Comparing the probabilities:
The highest probability is for 5 green faces and 2 red faces.
COMPUTER SCIENCE AND INFORMATION TECHNOLOGY
5511
Q11MCQ1 markEasyWhich one of the following is a closed form expression for the generating function of the sequence , where for all ?Think it through. Then check your answer.Question
Which one of the following is a closed form expression for the generating function of the sequence , where for all ?Correct answer
(D) (3-x)/((1-x)²)
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The generating function for a sequence is defined as:
Given , we have:
We know the standard power series:
Differentiating both sides with respect to :
Multiplying by :
Substituting these into the expression for :
Thus, the correct option is (D).12
Q12MCQ1 markMediumConsider the following C program. [figure] The output of this program is:Think it through. Then check your answer.Question
Consider the following C program.The output of this program is:
Correct answer
(A) 0, c
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.The structureOurnodecontains threecharmembers:x,y, andz. In C,chartypically occupies 1 byte, and structure members are laid out contiguously in memory.2.struct Ournode p = {'1', '0', 'a'+2};initializesp.x = '1',p.y = '0', andp.z = 'c'(since 'a' + 2 = 'c').3.struct Ournode *q = &p;makesqpoint to the start of the structurep.4.(char*)qcasts the structure pointer to a character pointer. Now,(char*)qpoints to the first byte of the structure, which isp.x.5.*((char*)q+1)increments the pointer by 1 byte (the size of achar), so it points top.y. Dereferencing it gives the character'0'.6.*((char*)q+2)increments the pointer by 2 bytes, so it points top.z. Dereferencing it gives the character'c'.7.printf ("%c, %c", ...)prints these characters separated by a comma and a space:0, c.13
Q13MCQ1 markEasyA queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let denote the number of nodes in the…Think it through. Then check your answer.Question
A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let denote the number of nodes in the queue. Letenqueuebe implemented by inserting a new node at the head, anddequeuebe implemented by deletion of a node from the tail.Which one of the following is the time complexity of the most time-efficient implementation of
enqueueanddequeue, respectively, for this data structure?Correct answer
(B) θ(1), θ(n)
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
- Enqueue at the head: To insert a new node at the head of a singly linked list, we create the node, set its
nextpointer to the currenthead, and update theheadpointer. This operation does not depend on the number of nodes , so its time complexity is . - Dequeue from the tail: To delete a node from the tail of a singly linked list, we need to update the
nextpointer of the second-to-last node toNULLand update thetailpointer. Since it's a singly linked list, we don't have a direct pointer to the predecessor of the tail. We must traverse the list from theheadto find the -th node. This traversal takes time proportional to , so the time complexity is .
- Enqueue at the head: To insert a new node at the head of a singly linked list, we create the node, set its
14
Q14MCQ1 markEasyLet and denote the Exclusive OR and Exclusive NOR operations, respectively. Which one of the following is NOT CORRECT?Think it through. Then check your answer.Question
Let and denote the Exclusive OR and Exclusive NOR operations, respectively. Which one of the following is NOT CORRECT?Correct answer
(D) (P ⊕ P) ⊕ Q = (P P) Q
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let's evaluate each option:
(A) is the definition of XNOR, so . This is CORRECT.
(B) . This is CORRECT.
(C) . This is CORRECT.
(D) LHS: .
RHS: .
Since , option (D) is NOT CORRECT.15
Q15MCQ1 markEasyConsider the following processor design characteristics. I. Register-to-register arithmetic operations only II. Fixed-length instruction format III. Hardwired control unit Which…Think it through. Then check your answer.Question
Consider the following processor design characteristics.I. Register-to-register arithmetic operations only
II. Fixed-length instruction format
III. Hardwired control unitWhich of the characteristics above are used in the design of a RISC processor?Correct answer
(D) I, II and III
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
RISC (Reduced Instruction Set Computer) processors are designed with several key characteristics to improve performance:1.Register-to-register operations: Most instructions operate on registers, with separate Load and Store instructions for memory access. This simplifies the instruction set and allows for faster execution.2.Fixed-length instruction format: All instructions are of the same size (e.g., 32 bits), which makes decoding much faster and easier to pipeline.3.Hardwired control unit: Unlike CISC processors that often use microprogrammed control units, RISC processors use hardwired logic to execute instructions in a single clock cycle whenever possible.Therefore, all three characteristics (I, II, and III) are typical of RISC designs.16
Q16MCQ1 markEasyLet be an NFA with states. Let be the number of states of a minimal DFA which is equivalent to . Which one of the following is necessarily true?Think it through. Then check your answer.Question
Let be an NFA with states. Let be the number of states of a minimal DFA which is equivalent to . Which one of the following is necessarily true?Correct answer
(D) k ≤ 2ⁿ
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
According to the subset construction algorithm (also known as the powerset construction), any Nondeterministic Finite Automaton (NFA) with states can be converted into an equivalent Deterministic Finite Automaton (DFA) with at most states. Since is the number of states in the minimal DFA equivalent to , it must be less than or equal to the number of states in any DFA equivalent to . Thus, is necessarily true.17
Q17MCQ1 markMediumThe set of all recursively enumerable languages isThink it through. Then check your answer.Question
The set of all recursively enumerable languages isCorrect answer
(B) closed under intersection.
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Recursively Enumerable (RE) languages are closed under union, intersection, concatenation, and Kleene star. They are NOT closed under complementation (Recursive languages are). RE languages are a superset of Recursive languages. The set of all RE languages is countable because each is generated by a Turing Machine, and the set of TMs is countable.18
Q18MCQ1 markEasyWhich one of the following statements is FALSE?Think it through. Then check your answer.Question
Which one of the following statements is FALSE?Correct answer
(B) Type checking is done before parsing.
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a standard compiler, the sequence of phases is Lexical Analysis -> Syntax Analysis (Parsing) -> Semantic Analysis (Type Checking). Therefore, type checking is done after parsing, making statement (B) false.19
Q19MCQ1 markMediumThe following are some events that occur after a device controller issues an interrupt while process is under execution. (P) The processor pushes the process status of …Think it through. Then check your answer.Question
The following are some events that occur after a device controller issues an interrupt while process is under execution. (P) The processor pushes the process status of onto the control stack.
(Q) The processor finishes the execution of the current instruction.
(R) The processor executes the interrupt service routine.
(S) The processor pops the process status of from the control stack.
(T) The processor loads the new PC value based on the interrupt.Which one of the following is the correct order in which the events above occur?Correct answer
(A) QPTRS
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The standard sequence for interrupt handling is:1.Finish the current instruction (Q).2.Save the state/status of the current process (P).3.Load the address of the Interrupt Service Routine (ISR) into the Program Counter (T).4.Execute the ISR (R).5.Restore the state/status of the process (S).Thus, the correct order is QPTRS.20
Q20MCQ1 markEasyConsider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is units if the corresponding memory page is…Think it through. Then check your answer.Question
Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is units if the corresponding memory page is available in memory, and units if the memory access causes a page fault. It has been experimentally measured that the average time taken for a memory access in the process is units.Which one of the following is the correct expression for the page fault rate experienced by the process?Correct answer
(B) (X - M) / (D - M)
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let be the page fault rate. The average memory access time is given by the weighted average of the access time when a page is in memory () and when a page fault occurs ():Solving for :Therefore, option (B) is correct.21
Q21MCQ1 markEasyIn an Entity-Relationship (ER) model, suppose is a many-to-one relationship from entity set E1 to entity set E2. Assume that E1 and E2 participate totally in and that the…Think it through. Then check your answer.Question
In an Entity-Relationship (ER) model, suppose is a many-to-one relationship from entity set E1 to entity set E2. Assume that E1 and E2 participate totally in and that the cardinality of E1 is greater than the cardinality of E2.Which one of the following is true about ?Correct answer
(A) Every entity in E1 is associated with exactly one entity in E2.
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.Many-to-one relationship from E1 to E2: This means that each entity in E1 can be associated with at most one entity in E2, while an entity in E2 can be associated with multiple entities in E1.2.Total participation of E1 in : This means every entity in E1 must be associated with at least one entity in E2.3.Combining these two facts: Since every entity in E1 is associated with at least one entity in E2 (total participation) and at most one entity in E2 (many-to-one constraint), it follows that every entity in E1 is associated with exactly one entity in E2.4.Since and there is total participation, by the Pigeonhole Principle, at least one entity in E2 must be associated with more than one entity in E1, making options (C) and (D) false.22
Q22MCQ1 markEasyConsider the following two tables and four queries in SQL. Book (isbn, bname), Stock (isbn, copies) Query 1: [code] Query 2: [code] Query 3: [code] Query 4: [code]…Think it through. Then check your answer.Question
Consider the following two tables and four queries in SQL.Book (isbn, bname), Stock (isbn, copies)Query 1:SELECT B.isbn, S.copies FROM Book B INNER JOIN Stock S ON B.isbn = S.isbn;
Query 2:SELECT B.isbn, S.copies FROM Book B LEFT OUTER JOIN Stock S ON B.isbn = S.isbn;
Query 3:SELECT B.isbn, S.copies FROM Book B RIGHT OUTER JOIN Stock S ON B.isbn = S.isbn;
Query 4:SELECT B.isbn, S.copies FROM Book B FULL OUTER JOIN Stock S ON B.isbn = S.isbn;
Which one of the queries above is certain to have an output that is a superset of the outputs of the other three queries?Correct answer
(D) Query 4
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In SQL joins:- INNER JOIN returns only the rows that have matching values in both tables.
- LEFT OUTER JOIN returns all rows from the left table, and the matched rows from the right table. If no match, NULL is returned for right table columns.
- RIGHT OUTER JOIN returns all rows from the right table, and the matched rows from the left table. If no match, NULL is returned for left table columns.
- FULL OUTER JOIN returns all rows when there is a match in either left or right table records. It effectively combines the results of both LEFT and RIGHT outer joins.
and .
Thus, (Query 4) is always a superset of and .23
Q23MCQ1 markEasyMatch the following: | Field | Length in bits | | :--- | :--- | | P. UDP Header’s Port Number | I. 48 | | Q. Ethernet MAC Address | II. 8 | | R. IPv6 Next Header | III. 32 | | S.…Think it through. Then check your answer.Question
Match the following:Field Length in bits P. UDP Header’s Port Number I. 48 Q. Ethernet MAC Address II. 8 R. IPv6 Next Header III. 32 S. TCP Header’s Sequence Number IV. 16 Correct answer
(C) P-IV, Q-I, R-II, S-III
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The correct lengths for the given network fields are:- P. UDP Header’s Port Number: 16 bits (IV)
- Q. Ethernet MAC Address: 48 bits (I)
- R. IPv6 Next Header: 8 bits (II)
- S. TCP Header’s Sequence Number: 32 bits (III)
24
Q24MCQ1 markMediumConsider the following statements regarding the slow start phase of the TCP congestion control algorithm. Note that stands for the TCP congestion window and MSS denotes the…Think it through. Then check your answer.Question
Consider the following statements regarding the slow start phase of the TCP congestion control algorithm. Note that stands for the TCP congestion window and MSS denotes the Maximum Segment Size.(i) The increases by 2 MSS on every successful acknowledgment.
(ii) The approximately doubles on every successful acknowledgement.
(iii) The increases by 1 MSS every round trip time.
(iv) The approximately doubles every round trip time.Which one of the following is correct?Correct answer
(C) Only (iv) is true
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In the TCP slow start phase:- For every successful acknowledgment (ACK) received, the congestion window () increases by 1 MSS. This means statement (i) and (ii) are incorrect.
- Because the window size increases by 1 MSS for every segment acknowledged, if a full window of segments is acknowledged in one round trip time (RTT), the window size effectively doubles to for the next RTT. Thus, the approximately doubles every round trip time. Statement (iv) is true.
- Statement (iii) describes the congestion avoidance phase (Additive Increase), not the slow start phase.
25
Q25NAT1 markMediumTwo people, P and Q, decide to independently roll two identical dice, each with 6 faces, numbered 1 to 6. The person with the lower number wins. In case of a tie, they roll the…Think it through. Then check your answer.Question
Two people, P and Q, decide to independently roll two identical dice, each with 6 faces, numbered 1 to 6. The person with the lower number wins. In case of a tie, they roll the dice repeatedly until there is no tie. Define a trial as a throw of the dice by P and Q. Assume that all 6 numbers on each dice are equi-probable and that all trials are independent. The probability (rounded to 3 decimal places) that one of them wins on the third trial is _____.Correct answer
0.021 to 0.024
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a single trial (one roll by P and one by Q), there are total outcomes.
A tie occurs if both roll the same number: . There are 6 such outcomes.
Probability of a tie in one trial, .
Probability of a win (someone winning) in one trial, .We want the probability that the first win occurs on the third trial. This means the first two trials must result in ties and the third trial must result in a win:
Calculating the value:
Rounding to 3 decimal places, we get 0.023.26
Q26NAT1 markMediumThe value of correct to three decimal places (assuming that ) is _____.Think it through. Then check your answer.Question
The value of correct to three decimal places (assuming that ) is _____.Correct answer
0.27 to 0.3
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To evaluate the integral , we use the substitution method:1.Substitution: Let . Then, the differential , which implies .2.Change of Limits:- When , .
- When , .
4.Evaluate the Integral:5.Numerical Calculation:Using the given value :
Now, calculate :
Finally,
Rounding to three decimal places, the value is 0.289. This falls within the official range of 0.27 to 0.30.27
Q27NAT1 markEasyConsider a matrix where . Note that denotes the transpose of . The largest…Think it through. Then check your answer.Question
Consider a matrix where . Note that denotes the transpose of . The largest eigenvalue of is _____.Correct answer
3 to 3
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given the vectors and , the matrix is formed by the outer product :For any matrix of the form (a rank-1 matrix), the eigenvalues are:1. (the trace of the matrix)2.Calculating the non-zero eigenvalue:Alternatively, using the characteristic equation :The largest eigenvalue is 3.28
Q28NAT1 markMediumThe chromatic number of the following graph is _______. [figure]Think it through. Then check your answer.Question
The chromatic number of the following graph is _______.
Correct answer
3 to 3
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the chromatic number of the given graph, we first identify all the edges from the visual representation:
.1.Lower Bound: The graph contains several cliques of size 3 (triangles), such as , , , and . Since a requires at least 3 colors to ensure no two adjacent vertices share the same color, we have .2.Upper Bound: We can demonstrate that the graph is 3-colorable by providing a valid assignment of 3 colors (say 1, 2, and 3):- Color 1:
- Color 2:
- Color 3:
- connects colors 2 and 3 (Valid)
- connects colors 2 and 1 (Valid)
- connects colors 2 and 3 (Valid)
- connects colors 3 and 1 (Valid)
- connects colors 3 and 1 (Valid)
- connects colors 1 and 2 (Valid)
- connects colors 1 and 3 (Valid)
- connects colors 2 and 3 (Valid)
- connects colors 2 and 1 (Valid)
- connects colors 3 and 1 (Valid)
29
Q29NAT1 markEasyLet be a finite group on 84 elements. The size of a largest possible proper subgroup of is ________.Think it through. Then check your answer.Question
Let be a finite group on 84 elements. The size of a largest possible proper subgroup of is ________.Correct answer
42 to 42
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
According to Lagrange's Theorem, the order (size) of any subgroup of a finite group must divide the order of the group .
Given .
A proper subgroup is a subgroup such that , which implies .
The divisors of 84 are: 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84.
The largest divisor of 84 that is strictly less than 84 is 42.
For a cyclic group , a subgroup of order exists for every divisor of 84. Thus, the largest possible proper subgroup size is 42.30
Q30NAT1 markMediumThe postorder traversal of a binary tree is 8, 9, 6, 7, 4, 5, 2, 3, 1. The inorder traversal of the same tree is 8, 6, 9, 4, 7, 2, 5, 1, 3. The height of a tree is the length of…Think it through. Then check your answer.Question
The postorder traversal of a binary tree is 8, 9, 6, 7, 4, 5, 2, 3, 1. The inorder traversal of the same tree is 8, 6, 9, 4, 7, 2, 5, 1, 3. The height of a tree is the length of the longest path from the root to any leaf. The height of the binary tree above 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
We can reconstruct the binary tree using the given traversals:
Postorder: 8, 9, 6, 7, 4, 5, 2, 3, 1 (Root is the last element: 1)
Inorder: 8, 6, 9, 4, 7, 2, 5, 1, 31.Root is 1. From Inorder, Left Subtree is {8, 6, 9, 4, 7, 2, 5} and Right Subtree is {3}.2.For the Left Subtree, the last element in Postorder is 2, so 2 is the root. From Inorder, Left of 2 is {8, 6, 9, 4, 7} and Right of 2 is {5}.3.For the subtree {8, 6, 9, 4, 7}, the root is 4. Left of 4 is {8, 6, 9} and Right of 4 is {7}.4.For the subtree {8, 6, 9}, the root is 6. Left of 6 is {8} and Right of 6 is {9}.The tree structure is:- Level 0: 1
- Level 1: 2 (Left), 3 (Right)
- Level 2: 4 (Left of 2), 5 (Right of 2)
- Level 3: 6 (Left of 4), 7 (Right of 4)
- Level 4: 8 (Left of 6), 9 (Right of 6)
The length of this path (number of edges) is 4.
Therefore, the height of the tree is 4.31
Q31NAT1 markEasyConsider the following C program. [code] The output of this program is _____.Think it through. Then check your answer.Question
Consider the following C program.The output of this program is _____.#include <stdio.h> int counter = 0; int calc (int a, int b) { int c; counter++; if (b==3) return (a*a*a); else { c = calc(a, b/3); return (c*c*c); } } int main (){ calc(4, 81); printf ("%d", counter); }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 functioncalc(a, b)is a recursive function. Let's trace the calls starting frommain:1.calc(4, 81):counterbecomes 1. Since , it callscalc(4, 81/3)which iscalc(4, 27).2.calc(4, 27):counterbecomes 2. Since , it callscalc(4, 27/3)which iscalc(4, 9).3.calc(4, 9):counterbecomes 3. Since , it callscalc(4, 9/3)which iscalc(4, 3).4.The recursion unwinds, but thecalc(4, 3):counterbecomes 4. Since , it returns and does not recurse further.countervariable is global and has been incremented 4 times. Themainfunction prints the final value ofcounter, which is 4.32
Q32NAT1 markMediumConsider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops. [figure] The number of states in the state transition…Think it through. Then check your answer.Question
Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops.The number of states in the state transition diagram of this circuit that have a transition back to the same state on some value of “in” is _____.
Correct answer
2 to 2
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let the states be . From the circuit diagram, we can derive the next-state equations for the D flip-flops:- , so
- , so
Substituting the equations:1.2.From (1), we substitute for in (2):
This equation holds true if and only if . When , the condition must be satisfied. The states that satisfy are and .Therefore, there are 2 states that have a transition back to themselves (both occurring when the input is 0).33
Q33NAT1 markMediumA -bit wide main memory unit with a capacity of is built using DRAM chips. The number of rows of memory cells in the DRAM chip…Think it through. Then check your answer.Question
A -bit wide main memory unit with a capacity of is built using DRAM chips. The number of rows of memory cells in the DRAM chip is . The time taken to perform one refresh operation is . The refresh period is . The percentage (rounded to the closest integer) of the time available for performing the memory read/write operations in the main memory unit is __________.Correct answer
59 to 60
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the percentage of time available for memory read/write operations, we first calculate the total time spent on refreshing the DRAM rows within one refresh period.1.Identify the number of rows to be refreshed:The number of rows in each DRAM chip is given as .
2.Calculate the total refresh time:Each refresh operation takes . The total time required to refresh all rows is:
Converting this to milliseconds ():
3.Calculate the time available for read/write operations:The refresh period is . The time available for normal operations is the total period minus the time spent refreshing:
4.Calculate the percentage of available time:5.Rounding to the closest integer:Rounding to the nearest integer gives .34
Q34NAT1 markMediumConsider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of instances. Resource instances can be requested and…Think it through. Then check your answer.Question
Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of instances. Resource instances can be requested and released only one at a time. The largest value of that will always avoid deadlock is ____.Correct answer
2 to 2
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To ensure a system is always deadlock-free, the total number of resources () must be greater than the sum of the maximum needs of each process minus one. Formula: Given:- Number of processes () = 3
- Total resources () = 4
- Maximum demand of each process =
The largest integer value for that satisfies this inequality is 2.35
Q35NAT1 markMediumQ.25 Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps ( bits-per-second). The session starts with a sequence number of 1234. The minimum time (in…Think it through. Then check your answer.Question
Q.25 Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps ( bits-per-second). The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closest integer) before this sequence number can be used again is _______.Correct answer
34 to 35
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Step 1: Identify the total number of unique TCP sequence numbers. TCP uses a 32-bit sequence number field, so there are unique sequence numbers.Step 2: Determine the rate at which sequence numbers are consumed. In TCP, the sequence number increments by 1 for every byte of data sent. The bandwidth is given as 1 Gbps ( bits per second).Step 3: Convert the bandwidth from bits per second to bytes per second:Step 4: Calculate the wrap-around time (), which is the time taken to consume all sequence numbers:Step 5: Perform the numerical calculation:Step 6: Round the result to the closest integer as requested in the question:The starting sequence number (1234) is a distractor and does not affect the wrap-around time. The official answer range is 34 to 35.36
Q36MCQ2 marksMediumConsider a matrix P whose only eigenvectors are the multiples of . Consider the following statements. (I) P does not have an inverse…Think it through. Then check your answer.Question
Consider a matrix P whose only eigenvectors are the multiples of . Consider the following statements.
(I) P does not have an inverse
(II) P has a repeated eigenvalue
(III) P cannot be diagonalizedWhich one of the following options is correct?Correct answer
(D) Only II and III are necessarily true
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given that the only eigenvectors of the matrix P are multiples of a single vector, the geometric multiplicity of its eigenvalue(s) is 1.1.Statement (II): For a matrix, if there is only one linearly independent eigenvector, the algebraic multiplicity of the eigenvalue must be 2 (it is a repeated eigenvalue). Thus, (II) is necessarily true.2.Statement (III): A matrix is diagonalizable if and only if it has a complete set of linearly independent eigenvectors (i.e., geometric multiplicity equals algebraic multiplicity for all eigenvalues). Here, the geometric multiplicity (1) is less than the algebraic multiplicity (2). Therefore, P cannot be diagonalized. Thus, (III) is necessarily true.3.Statement (I): A matrix is invertible if its eigenvalues are non-zero. The repeated eigenvalue could be any value, including non-zero values (e.g., ). If , the matrix has an inverse. Thus, (I) is not necessarily true.Therefore, only II and III are necessarily true.37
Q37MCQ2 marksMediumLet be the set of natural numbers. Consider the following sets. : Set of Rational numbers (positive and negative) : Set of functions from to : Set of…Think it through. Then check your answer.Question
Let be the set of natural numbers. Consider the following sets.
: Set of Rational numbers (positive and negative)
: Set of functions from to
: Set of functions from to
: Set of finite subsets of .Which of the sets above are countable?Correct answer
(D) P, Q and S only
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To determine which sets are countable:1.Set (Rational numbers): The set of all rational numbers is a well-known example of a countable set. Thus, is countable.2.Set (Functions from to ): A function from to is uniquely determined by its values at 0 and 1. Thus, the set is equivalent to . Since the Cartesian product of two countable sets is countable, is countable.3.Set (Functions from to ): This set is equivalent to the power set of , denoted by or . According to Cantor's theorem, the power set of a countably infinite set is uncountable (its cardinality is ). Thus, is uncountable.4.Set (Finite subsets of ): The set of all finite subsets of a countable set is countable. This can be shown by expressing as the union of sets , where is the set of subsets of size . Each is countable, and a countable union of countable sets is countable. Thus, is countable.Therefore, and are countable. The correct option is (D).38
Q38MCQ2 marksHardConsider the first-order logic sentence where…Think it through. Then check your answer.Question
Consider the first-order logic sentencewhere is a quantifier-free first-order logic formula using only predicate symbols, and possibly equality, but no function symbols. Suppose has a model with a universe containing 7 elements.Which one of the following statements is necessarily true?Correct answer
(A) There exists at least one model of φ with universe of size less than or equal to 3.
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The sentence is of the form , where is quantifier-free and contains no function symbols. If has a model with a universe of size 7, then there exist elements such that for all , the formula is true in .Consider a sub-universe . The size of is at most 3 (it could be less if are not distinct). Since is quantifier-free and there are no function symbols, the truth of for elements in depends only on the relations defined on those elements. Because holds for all elements in the larger universe , it must also hold for all elements in the subset . Thus, the structure restricted to is also a model of . Therefore, there exists a model of size . Option (A) is necessarily true.39
Q39MCQ2 marksEasyConsider the following C program: [code] The output of the program above isThink it through. Then check your answer.Question
Consider the following C program:The output of the program above is#include<stdio.h> void fun1(char *s1, char *s2){ char *tmp; tmp = s1; s1 = s2; s2 = tmp; } void fun2(char **s1, char **s2){ char *tmp; tmp = *s1; *s1 = *s2; *s2 = tmp; } int main(){ char *str1 = "Hi", *str2 = "Bye"; fun1(str1, str2); printf("%s %s ", str1, str2); fun2(&str1, &str2); printf("%s %s", str1, str2); return 0; }Correct answer
(A) Hi Bye Bye Hi
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let's trace the execution of the program:1.char *str1 = "Hi", *str2 = "Bye";initializes two pointers to string literals.2.fun1(str1, str2);is called. In C, arguments are passed by value.fun1receives copies of the pointersstr1andstr2. Swapping these local copiess1ands2insidefun1has no effect on the original pointersstr1andstr2inmain.3.printf("%s %s ", str1, str2);prints the original values:Hi Bye(note the trailing space).4.fun2(&str1, &str2);is called. This passes the addresses of the pointersstr1andstr2(pass-by-reference using pointers to pointers).5.Insidefun2,*s1refers tostr1and*s2refers tostr2. The code swaps the values stored at these addresses. Thus,str1now points to "Bye" andstr2points to "Hi".6.Combining the outputs:printf("%s %s", str1, str2);prints the updated values:Bye Hi.Hi Bye Bye Hi. The correct option is (A).40
Q40MCQ2 marksMediumLet G be a simple undirected graph. Let be a depth first search tree of G. Let be a breadth first search tree of G. Consider the following statements. (I) No edge of G…Think it through. Then check your answer.Question
Let G be a simple undirected graph. Let be a depth first search tree of G. Let be a breadth first search tree of G. Consider the following statements.(I) No edge of G is a cross edge with respect to . (A cross edge in G is between two nodes neither of which is an ancestor of the other in .)
(II) For every edge (u,v) of G, if u is at depth i and v is at depth j in , then .Which of the statements above must necessarily be true?Correct answer
(A) I only
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Statement (I): In a Depth First Search (DFS) of an undirected graph, there are only two types of edges: tree edges and back edges. A tree edge is an edge in the DFS tree itself. A back edge is an edge connecting a vertex to an ancestor in the DFS tree. There are no forward edges (connecting a vertex to a non-child descendant) or cross edges (connecting vertices in different subtrees that are not in an ancestor-descendant relationship). This is because if a cross edge existed, where is in a different, already visited subtree, the edge would have been explored when visiting , and would have become a descendant of , which contradicts the definition of a cross edge. Therefore, for any simple undirected graph, there are no cross edges with respect to a DFS tree. Statement (I) is true.Statement (II): In a Breadth First Search (BFS) of a graph, for any edge , the depths of and in the BFS tree can differ by at most 1. That is, . The statement claims that for every edge, the difference is exactly 1, i.e., . This is not necessarily true. An edge can connect two vertices at the same level.
Consider a counterexample: a complete graph on 3 vertices (a triangle), , with vertices . Let the BFS start at vertex A.
Level 0: {A}
Level 1: {B, C}
The edge is an edge in the graph G. The depth of B is and the depth of C is . For this edge, . This contradicts the statement that for every edge. Therefore, Statement (II) is false.Since only statement (I) is necessarily true, the correct option is (A).41
Q41MCQ2 marksMediumAssume that multiplying a matrix of dimension with another matrix of dimension requires scalar multiplications. Computing the product…Think it through. Then check your answer.Question
Assume that multiplying a matrix of dimension with another matrix of dimension requires scalar multiplications. Computing the product of n matrices can be done by parenthesizing in different ways. Define as an explicitly computed pair for a given paranthesization if they are directly multiplied. For example, in the matrix multiplication chain using parenthesization , and are the only explicitly computed pairs.Consider a matrix multiplication chain , where matrices and are of dimensions 2x25, 25x3, 3x16, 16x1 and 1x1000, respectively. In the parenthesization of that minimizes the total number of scalar multiplications, the explicitly computed pairs is/areCorrect answer
(C) F₃F₄ only
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
This is a matrix chain multiplication problem. We need to find the optimal parenthesization for the product .The dimensions of the matrices are:
We use dynamic programming. Let be the minimum cost to compute the product .Length 2:- . Split at , i.e., .
- . Split at , i.e., .
- . Split at , i.e., .
- . Split at , i.e., , where is . So, .
- . We need .
- .
- Cost for in is .
- .
- .
- .
The parenthesization for was found to be .
So the full optimal parenthesization is .According to the problem definition, an "explicitly computed pair" is a pair of adjacent original matrices that are directly multiplied.
In the optimal parenthesization , the first multiplication performed is . This is a pair of adjacent original matrices.
The subsequent multiplications are:
Therefore, the only explicitly computed pair is .42
Q42MCQ2 marksMediumConsider the following C code. Assume thatunsigned long inttype length is 64 bits. [code] The value returned when we callfunwith the input is ____.Think it through. Then check your answer.Question
Consider the following C code. Assume thatunsigned long inttype length is 64 bits.unsigned long int fun(unsigned long int n){ unsigned long int i, j = 0, sum = 0; for (i = n; i > 1; i = i/2) j++; for ( ; j > 1; j = j/2) sum++; return(sum); }
The value returned when we callfunwith the input is ____.Correct answer
(B) 5
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The functionfunis called withn = 2^40.First loop:for (i = n; i > 1; i = i/2) j++;- This loop calculates how many times
ncan be divided by 2 until it becomes 1. This is equivalent to calculating . jis initialized to 0.istarts at .- The loop runs for . The condition
i > 1is true for all these values. - The number of iterations is 40.
- After this loop, the value of
jwill be 40.
for ( ; j > 1; j = j/2) sum++;- This loop takes the value of
j(which is 40) and calculates how many times it can be divided by 2 until it becomes 1. This is equivalent to calculating . sumis initialized to 0.- The loop executes as follows:
j = 40.40 > 1is true.sumbecomes 1.jbecomes40/2 = 20.
2.j = 20.20 > 1is true.sumbecomes 2.jbecomes20/2 = 10.
3.j = 10.10 > 1is true.sumbecomes 3.jbecomes10/2 = 5.
4.j = 5.5 > 1is true.sumbecomes 4.jbecomes5/2 = 2(integer division).
5.j = 2.2 > 1is true.sumbecomes 5.jbecomes2/2 = 1.
6.j = 1.1 > 1is false. The loop terminates.The final value ofsumis 5.
The function returnssum.
Therefore, the value returned is 5.- This loop calculates how many times
43
Q43MCQ2 marksMediumConsider the unsigned 8-bit fixed point binary number representation below, where the position of the binary point is between and…Think it through. Then check your answer.Question
Consider the unsigned 8-bit fixed point binary number representation below,where the position of the binary point is between and . Assume is the most significant bit. Some of the decimal numbers listed below cannot be represented exactly in the above representation:
(i) 31.500
(ii) 0.875
(iii) 12.100
(iv) 3.001Which one of the following statements is true?Correct answer
(C) Only (iii) and (iv) cannot be exactly represented
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The given representation is an unsigned 8-bit fixed point number with the format .- The integer part consists of 5 bits ( to ). The maximum integer value is .
- The fractional part consists of 3 bits ( to ). The weights are , , and . Any representable fractional part must be a multiple of .
- Integer part: 31. This fits in 5 bits ().
- Fractional part: 0.5. This is a multiple of 0.125 (). It fits in 3 bits ().
- Representation: . Can be represented.
- Integer part: 0. Fits.
- Fractional part: 0.875. This is a multiple of 0.125 (). It fits in 3 bits ().
- Representation: . Can be represented.
- Fractional part: 0.1. This is not a multiple of 0.125 (, which is not an integer). It cannot be represented exactly with 3 fractional bits.
- Cannot be represented.
- Fractional part: 0.001. This is smaller than the resolution (0.125) and not a multiple.
- Cannot be represented.
44
Q44MCQ2 marksMediumThe size of the physical address space of a processor is bytes. The word length is bytes. The capacity of cache memory is bytes. The size of each cache block is…Think it through. Then check your answer.Question
The size of the physical address space of a processor is bytes. The word length is bytes. The capacity of cache memory is bytes. The size of each cache block is words. For a -way set-associative cache memory, the length (in number of bits) of the tag field isCorrect answer
(B) P - N + ₂ K
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given:- Physical address space size = bytes Physical Address () length = bits.
- Word length = bytes.
- Cache capacity = bytes.
- Block size = words.
- Associativity = -way.
45
Q45MCQ2 marksMediumConsider the following languages: I. II.…Think it through. Then check your answer.Question
Consider the following languages:I.
II.
III.
IV.
Which of the languages above are context-free?Correct answer
(B) I and II only
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let's analyze each language:Language I:
The condition can be rewritten as . This language is Context-Free (CFL). A Pushdown Automaton (PDA) can be constructed to accept it. For example, for the prefix , the PDA can store the difference on the stack. Then for the suffix , it can check if matches the stored difference. Alternatively, it is generated by a context-free grammar.Language II:
This language is the concatenation of two languages: and . Since and are both standard CFLs and the class of CFLs is closed under concatenation, is a CFL.Language III:
This language requires , which implies matching the counts of three different symbols (). The language containing strings of the form is a well-known non-CFL. The additional condition and the presence of do not make it Context-Free. Thus, is not a CFL.Language IV:
The condition involves a non-linear relationship (multiplication) between the counts of symbols. PDAs cannot perform multiplication or check such non-linear constraints generally. This language is not Context-Free.Therefore, only languages I and II are context-free.46
Q46MCQ2 marksMediumConsider the following problems.L(G)denotes the language generated by a grammar .L(M)denotes the language accepted by a machine . (I) For an unrestricted grammar …Think it through. Then check your answer.Question
Consider the following problems.L(G)denotes the language generated by a grammar .L(M)denotes the language accepted by a machine .(I) For an unrestricted grammar and a string , whether
(II) Given a Turing machine , whetherL(M)is regular
(III) Given two grammars and , whether
(IV) Given an NFA , whether there is a deterministic PDA such that and accept the same language.Which one of the following statements is correct?Correct answer
(D) Only I, II and III are undecidable
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let's analyze each problem:(I) For an unrestricted grammar and a string , whether
This is the Membership Problem for recursively enumerable languages. Unrestricted grammars generate recursively enumerable languages. This problem is equivalent to the Halting Problem and is Undecidable.(II) Given a Turing machine , whetherL(M)is regular
This asks if the language accepted by a TM has the property of being regular. Regularity is a non-trivial property of recursively enumerable languages. By Rice's Theorem, any non-trivial property of RE languages is Undecidable.(III) Given two grammars and , whether
This is the Equivalence Problem. The term "grammar" without qualification typically refers to Context-Free Grammars (Type-2) or Unrestricted Grammars (Type-0) in this context. The equivalence problem is undecidable for Context-Free Grammars and, by extension, for Unrestricted Grammars. Thus, it is Undecidable.(IV) Given an NFA , whether there is a deterministic PDA such that and accept the same language.
An NFA accepts a regular languageL(N). The class of regular languages is a proper subset of Deterministic Context-Free Languages (DCFLs), which are accepted by Deterministic Pushdown Automata (DPDAs). Therefore, for every regular language (and thus for every NFA), there exists a DPDA that accepts it. The answer to this problem is always "Yes". Since the answer is constant and trivial, the problem is Decidable.Conclusion:
Statements I, II, and III are undecidable. Statement IV is decidable.Therefore, option (D) is correct.47
Q47MCQ2 marksHardA lexical analyzer uses the following patterns to recognize three tokens , , and over the alphabet .
…Think it through. Then check your answer.Question
A lexical analyzer uses the following patterns to recognize three tokens , , and over the alphabet .
Note that ‘x?’ means 0 or 1 occurrence of the symbol x. Note also that the analyzer outputs the token that matches the longest possible prefix.If the stringbbaacabcis processed by the analyzer, which one of the following is the sequence of tokens it outputs?Correct answer
(D) T₃ T₃
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The lexical analyzer uses the "longest possible prefix" rule (maximal munch) to identify tokens.Step 1: Process input stringbbaacabcfrom the beginning.
We check the longest match for each pattern:- Matches
bba: , , ends with . (Length 3) - Cannot extend to
bbaabecause the middle part cannot contain . - Matches
bb: , , ends with . (Length 2) - Cannot extend further because the middle part cannot contain .
- Matches
bbaac: , , ends with . (Length 5) - Cannot extend to
bbaacabcbecause the middle part cannot contain .
bbaac.
Remaining input:abc.Step 2: Process remaining inputabc.- Matches
a: , , ends with . (Length 1) - Matches
ab: , , ends with . (Length 2) - Matches
abc: , , ends with . (Length 3)
abc.
Remaining input: empty.The sequence of tokens is .48
Q48MCQ2 marksMediumConsider the following parse tree for the expression a#b$c$d#e#f, involving two binary operators $ and #. [figure]Think it through. Then check your answer.Question
Consider the following parse tree for the expression a#b$c$d#e#f, involving two binary operators $ and #.
Correct answer
(A) $ has higher precedence and is left associative; is right associative
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To determine precedence and associativity from a parse tree:1.Precedence: Operators that are evaluated earlier appear deeper in the parse tree (further from the root). In the given tree, the nodes for the operator \#\has **higher precedence**. 2. **Associativity of $\**: Looking at the sub-expression , the tree groups it as . The left operation is a child of the parent \# a \# \dots \# e \# f\# a\#(e \# f) a \# (\dots \# (e \# f))\#\$$ has higher precedence and is left associative, and is right associative.49
Q49MCQ2 marksMediumIn a system, there are three types of resources: and . Four processes and execute concurrently. At the outset, the processes have declared their…Think it through. Then check your answer.Question
In a system, there are three types of resources: and . Four processes and execute concurrently. At the outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For example, Max[] is the maximum number of instances of that would require. The number of instances of the resources allocated to the various processes at any given state is given by a matrix named Allocation.Consider a state of the system with the Allocation matrix as shown below, and in which 3 instances of and 3 instances of are the only resources available.From the perspective of deadlock avoidance, which one of the following is true?Allocation Max 1 0 1 4 3 1 1 1 2 2 1 4 1 0 3 1 3 3 2 0 0 5 4 1 Correct answer
(A) The system is in safe state.
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To determine if the system is in a safe state, we use the Banker's Algorithm. We first calculate the Need matrix using the formula:Given:
Available Resources: (since only E and F are mentioned as available).
Vector Allocation Matrix:
Max Matrix:
Need Matrix Calculation:
Safety Algorithm:
Current Available:1.Check if any process can be satisfied ():- Need True
- Need False (Need G=2 > Avail G=0)
- Need True
- Need False (Need F=4 > Avail F=3)
New Available = Current Available + Allocation()
New Available =
Process finishes.2.Current Available:Remaining Processes:- Need False (Need G=2 > Avail G=1)
- Need True
- Need False (Need F=4 > Avail F=3)
New Available =
Process finishes.3.Current Available:Remaining Processes:- Need True
- Need False (Need F=4 > Avail F=3)
New Available =
Process finishes.4.Current Available:Remaining Processes:- Need True
New Available =
Process finishes.Since a safe sequence exists, the system is in a safe state.50
Q50MCQ2 marksEasyConsider the following solution to the producer-consumer synchronization problem. The shared buffer size is . Three semaphoresempty,fullandmutexare defined with…Think it through. Then check your answer.Question
Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is . Three semaphoresempty,fullandmutexare defined with respective initial values of 0, and 1. Semaphoreemptydenotes the number of available slots in the buffer, for the consumer to read from. Semaphorefulldenotes the number of available slots in the buffer, for the producer to write to. The placeholder variables, denoted by P, Q, R, and S, in the code below can be assigned eitheremptyorfull. The valid semaphore operations are:wait()andsignal().Which one of the following assignments to P, Q, R and S will yield the correct solution?Producer: Consumer: do{do{wait(P);wait(R);wait(mutex);wait(mutex);//Add item to buffer//Consume item from buffersignal(mutex);signal(mutex);signal(Q);signal(S);}while(1);}while(1);Correct answer
(C) P: full, Q: empty, R: empty, S: full
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In the producer-consumer problem:1.The Producer must wait for an empty slot to write. According to the problem,fulldenotes available slots for the producer (initial value ). Thus, P must befull.2.After adding an item, the Producer signals that a slot is now ready for the consumer. According to the problem,emptydenotes slots for the consumer (initial value 0). Thus, Q must beempty.3.The Consumer must wait for an item to be available. Thus, R must beempty.4.After consuming an item, the Consumer signals that a slot is now available for the producer. Thus, S must beTherefore, the correct assignment is P:full.full, Q:empty, R:empty, S:full.51
Q51MCQ2 marksHardConsider the relations and , where is a primary key and is a foreign key referencing . Consider the query …Think it through. Then check your answer.Question
Consider the relations and , where is a primary key and is a foreign key referencing . Consider the queryLet denote the natural left outer-join operation. Assume that and contain no null values.Which one of the following queries is NOT equivalent to ?Correct answer
(C) r LOJ (σ_(B < 5)(s))
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In the given scenario, is a foreign key referencing , and is a primary key. This implies that for every tuple in , there exists a corresponding tuple in with the same value. Also, there are no null values in the base relations.1.Query : returns tuples from that have a matching tuple in where . Effectively, it filters for and joins it with the corresponding attributes from .2.Option (A): . Since every tuple in has a match in , is essentially extended with attributes from . Filtering on this result is equivalent to .3.Option (B): . Because every tuple in is guaranteed to have a match in (due to the foreign key constraint and no nulls), the natural left outer join is identical to the natural join . Thus, this is equivalent to .4.Option (C): . This query performs a left outer join. It will include all tuples from . For tuples in where , there will be no match in the filtered relation . Consequently, these tuples will appear in the result set padded with NULL values for the attributes of . Since would have excluded these tuples entirely, (C) is NOT equivalent to .5.Option (D): . This filters first for . Since every such tuple has a match in , the LOJ behaves like a natural join. This is equivalent to .52
Q52MCQ2 marksMediumConsider the following four relational schemas. For each schema, all non-trivial functional dependencies are listed. The underlined attributes are the respective primary…Think it through. Then check your answer.Question
Consider the following four relational schemas. For each schema, all non-trivial functional dependencies are listed. The underlined attributes are the respective primary keys.Schema I: Registration (rollno, courses)
Field ‘courses’ is a set-valued attribute containing the set of courses a student has registered for.
Non-trivial functional dependency:
rollno coursesSchema II: Registration (rollno, courseid, email)
Non-trivial functional dependencies:
rollno, courseid email
email rollnoSchema III: Registration (rollno, courseid, marks, grade)
Non-trivial functional dependencies:
rollno, courseid marks, grade
marks gradeSchema IV: Registration (rollno, courseid, credit)
Non-trivial functional dependencies:
rollno, courseid credit
courseid creditWhich one of the relational schemas above is in 3NF but not in BCNF?Correct answer
(B) Schema II
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
A relation is in 3NF if for every non-trivial functional dependencyX → A, either is a superkey or is a prime attribute. A relation is in BCNF if for every non-trivial functional dependencyX → A, is a superkey.- Schema I: . Since is the primary key, it is a superkey. Thus, it is in BCNF.
- Schema II: The candidate keys are and .
- For , the LHS is a superkey, satisfying BCNF.
- For , the LHS is not a superkey, but the RHS is a prime attribute (part of a candidate key). This satisfies 3NF but violates BCNF.
- Schema III: . is not a superkey and is not a prime attribute. This is a transitive dependency, so it is not in 3NF.
- Schema IV: . is not a superkey and is not a prime attribute. This is a partial dependency, so it is not in 3NF.
53
Q53NAT2 marksMediumLet be a graph with vertices, with each vertex labelled by a distinct permutation of the numbers . There is an edge between vertices and if…Think it through. Then check your answer.Question
Let be a graph with vertices, with each vertex labelled by a distinct permutation of the numbers . There is an edge between vertices and if and only if the label of can be obtained by swapping two adjacent numbers in the label of . Let denote the degree of a vertex in , and denote the number of connected components in . Then,Correct answer
109 to 109
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.Degree : A vertex represents a permutation of length . An edge exists between two vertices if one can be obtained from the other by swapping two adjacent elements. In a sequence of length 100, there are pairs of adjacent positions. Swapping any of these 99 pairs results in a unique neighbor. Therefore, the degree of every vertex is .2.Connected components : It is a fundamental property of permutations that any permutation can be transformed into any other permutation using a sequence of adjacent swaps (e.g., via the bubble sort algorithm). Since every vertex can reach every other vertex, the graph is connected. Thus, the number of connected components is .3.Final Calculation: .54
Q54NAT2 marksMediumConsider Guwahati (G) and Delhi (D) whose temperatures can be classified as high (), medium () and low (). Let denote the probability that Guwahati has high…Think it through. Then check your answer.Question
Consider Guwahati (G) and Delhi (D) whose temperatures can be classified as high (), medium () and low (). Let denote the probability that Guwahati has high temperature. Similarly, and denotes the probability of Guwahati having medium and low temperatures respectively. Similarly, we use , and for Delhi.The following table gives the conditional probabilities for Delhi’s temperature given Guwahati’s temperature.Consider the first row in the table above. The first entry denotes that if Guwahati has high temperature () then the probability of Delhi also having a high temperature () is 0.40; i.e., . Similarly, the next two entries are and . Similarly for the other rows.If it is known that , , and , then the probability (correct to two decimal places) that Guwahati has high temperature given that Delhi has high temperature is _______.0.40 0.48 0.12 0.10 0.65 0.25 0.01 0.50 0.49 Correct answer
0.6 to 0.62
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
We need to find the conditional probability that Guwahati has a high temperature given that Delhi has a high temperature, denoted as .According to Bayes' Theorem:First, we calculate the total probability of Delhi having a high temperature, , using the Law of Total Probability:From the given table and problem statement:55
Q55NAT2 marksHardConsider the following program written in pseudo-code. Assume that and are integers. [code] The number of times that theprintstatement is executed by the call…Think it through. Then check your answer.Question
Consider the following program written in pseudo-code. Assume that and are integers.The number of times that theCount(x,y) { if (y != 1){ if (x != 1) { print("*"); Count(x/2, y); } else { y = y-1; Count(1024, y); } } }printstatement is executed by the callCount(1024,1024)is _____.Correct answer
10230 to 10230
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The functionCount(x, y)is a recursive function that prints a '*' based on the values of and .1.Inner Loop (Recursion on ): For a fixed value of (where ), the function prints a '*' and calls itself with as long as .Starting with , the sequence of values is:
.
Theprintstatement is executed for .
This results in exactly 10 prints for each valid value of .2.Outer Loop (Recursion on ): When reaches 1, theelseblock is executed:- is decremented:
- The function is called again with the reset value of :
Count(1024, y-1)
if (y != 1)holds true.3.Total Iterations:- The initial call is
Count(1024, 1024). - The values of for which the inner logic (and thus the prints) occurs are .
- When , after the recursion finishes and , becomes . The call
Count(1024, 1)is made, the conditionif (1 != 1)fails, and the program terminates. - The number of values is .
Total prints = (Number of iterations) (Prints per iteration)
Total prints = .56
Q56NAT2 marksMediumThe number of possible min-heaps containing each value from exactly once is _____.Think it through. Then check your answer.Question
The number of possible min-heaps containing each value from exactly once is _____.Correct answer
80 to 80
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the number of possible min-heaps with distinct elements:1.A min-heap with elements is a complete binary tree. For , the tree is a full binary tree where the root has a left subtree of size and a right subtree of size .2.The root must contain the minimum element (1) to satisfy the min-heap property.3.The remaining elements must be partitioned into the left and right subtrees. The number of ways to choose elements for the left subtree is .4.Let be the number of ways to form a min-heap with distinct elements. The recurrence relation is:5.For a subtree of size , the root is fixed, and the remaining 2 elements can be arranged in ways (one in the left child, one in the right child). Thus, .6.Substituting these values into the formula for :Therefore, the total number of possible min-heaps is 80.57
Q57NAT2 marksHardConsider the following undirected graph G: [figure] Choose a value for that will maximize the number of minimum weight spanning trees (MWSTs) of G. The number of MWSTs of G…Think it through. Then check your answer.Question
Consider the following undirected graph G:Choose a value for that will maximize the number of minimum weight spanning trees (MWSTs) of G. The number of MWSTs of G for this value of 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
To find the number of Minimum Weight Spanning Trees (MWSTs), we use Kruskal's algorithm. The edges in increasing order of weight are:1.Weight 1: 1 edge2.Weight 3: 2 edges3.Weight 4: 4 edges (plus potentially if )4.Weight 5: 1 edgeLet's analyze the cycles:- Cycle 1: (Top, Mid-Left, Bottom-Center) with weights 4, 3, 1. To avoid a cycle, we must exclude one edge. The MWST will always include the edges of weight 1 and 3, and potentially the edge of weight 4 if needed for connectivity.
- Cycle 2: (Top, Mid-Right, Bottom-Center) with weights , 3, 1. Similarly, MWST will include 1 and 3.
- Cycle 3: (Mid-Left, Bottom-Left, Bottom-Center) with weights 4, 4, 3. To connect Bottom-Left, we must pick one of the weight 4 edges. There are 2 choices.
- Cycle 4: (Mid-Right, Bottom-Right, Bottom-Center) with weights 5, 4, 3. To connect Bottom-Right, we must pick the weight 4 edge (Bottom-Center to Bottom-Right) as it's smaller than 5.
58
Q58NAT2 marksMediumConsider the weights and values of items listed below. Note that there is only one unit of each item. | Item number | Weight (in Kgs) | Value (in Rupees) | |---|---|---| | 1 | 10…Think it through. Then check your answer.Question
Consider the weights and values of items listed below. Note that there is only one unit of each item.The task is to pick a subset of these items such that their total weight is no more than 11 Kgs and their total value is maximized. Moreover, no item may be split. The total value of items picked by an optimal algorithm is denoted by . A greedy algorithm sorts the items by their value-to-weight ratios in descending order and packs them greedily, starting from the first item in the ordered list. The total value of items picked by the greedy algorithm is denoted by .The value of is ____________.Item number Weight (in Kgs) Value (in Rupees) 1 10 60 2 7 28 3 4 20 4 2 24 Correct answer
16 to 16
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.Optimal Solution (): This is a 0/1 Knapsack problem with capacity . We evaluate subsets of items:- {Item 1}: Weight = 10, Value = 60
- {Item 2, Item 3}: Weight = 7 + 4 = 11, Value = 28 + 20 = 48
- {Item 2, Item 4}: Weight = 7 + 2 = 9, Value = 28 + 24 = 52
- {Item 3, Item 4}: Weight = 4 + 2 = 6, Value = 20 + 24 = 44
2.Greedy Solution (): Sort items by value-to-weight ratio ():- Item 1:
- Item 2:
- Item 3:
- Item 4:
Greedy selection process:- Pick Item 4: Weight = 2, Value = 24. Remaining capacity = 9.
- Try Item 1: Weight = 10. Exceeds remaining capacity (9). Skip.
- Try Item 3: Weight = 4, Value = 20. Remaining capacity = 5.
- Try Item 2: Weight = 7. Exceeds remaining capacity (5). Skip.
3.Calculation: .59
Q59NAT2 marksMediumConsider the minterm list form of a Boolean function given below. Here, denotes a minterm and …Think it through. Then check your answer.Question
Consider the minterm list form of a Boolean function given below.Here, denotes a minterm and denotes a don't care term. The number of essential prime implicants of the function is ______.Correct answer
3 to 3
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the Essential Prime Implicants (EPIs), we use a K-map for variables :Prime Implicants (PIs):PQ \ RS 00 01 11 10 00 1 (0) 0 (1) X (3) 1 (2) 01 0 (4) 1 (5) 1 (7) 0 (6) 11 X (12) 0 (13) 0 (15) X (14) 10 X (8) 1 (9) 1 (11) X (10) 1.Quad (0, 2, 8, 10): . Minterm 0 is covered only by this PI. Thus, is an EPI.2.Quad (8, 9, 10, 11): . Minterm 9 is covered only by this PI. Thus, is an EPI.3.Pair (5, 7): . Minterm 5 is covered only by this PI. Thus, is an EPI.4.Quad (2, 3, 10, 11): . Minterm 2 is also in , and minterm 11 is also in . It covers no unique minterm.5.Quad (8, 10, 12, 14): . Covers only don't cares and minterms already covered.The essential prime implicants are , , and . The count is 3.60
Q60NAT2 marksHardThe instruction pipeline of a RISC processor has the following stages: Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Perform Operation (PO) and Writeback…Think it through. Then check your answer.Question
The instruction pipeline of a RISC processor has the following stages: Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Perform Operation (PO) and Writeback (WB). The IF, ID, OF and WB stages take 1 clock cycle each for every instruction. Consider a sequence of 100 instructions. In the PO stage, 40 instructions take 3 clock cycles each, 35 instructions take 2 clock cycles each, and the remaining 25 instructions take 1 clock cycle each. Assume that there are no data hazards and no control hazards.The number of clock cycles required for completion of execution of the sequence of instructions is ______.Correct answer
219 to 219
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a pipeline with no hazards, the total time is determined by the time it takes for the first instruction to reach the bottleneck stage, the total time spent by all instructions in that bottleneck stage, and the time for the last instruction to exit the remaining stages.1.Pipeline Stages: IF (1), ID (1), OF (1), PO (variable), WB (1).2.Bottleneck Stage: PO is the bottleneck as it takes cycle.3.Cycles to reach PO: The first instruction takes 3 cycles (IF, ID, OF) to reach the PO stage.4.Total cycles in PO: Sum of cycles for all 100 instructions in the PO stage:- 40 instructions 3 cycles = 120 cycles
- 35 instructions 2 cycles = 70 cycles
- 25 instructions 1 cycle = 25 cycles
- Total PO cycles = cycles.
Total Cycles = .61
Q61NAT2 marksMediumA processor has 16 integer registers (R0, R1, .. , R15) and 64 floating point registers (F0, F1,… , F63). It uses a 2-byte instruction format. There are four categories of…Think it through. Then check your answer.Question
A processor has 16 integer registers (R0, R1, .. , R15) and 64 floating point registers (F0, F1,… , F63). It uses a 2-byte instruction format. There are four categories of instructions: Type-1, Type-2, Type-3, and Type-4. Type-1 category consists of four instructions, each with 3 integer register operands (3Rs). Type-2 category consists of eight instructions, each with 2 floating point register operands (2Fs). Type-3 category consists of fourteen instructions, each with one integer register operand and one floating point register operand (1R+1F). Type-4 category consists of instructions, each with a floating point register operand (1F). The maximum value of is __________.Correct answer
32 to 32
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the maximum value of , we calculate the total number of instruction combinations possible in a 2-byte (16-bit) format and subtract the combinations used by Type-1, Type-2, and Type-3 instructions.1.Total combinations available: .2.Register addressing bits:- Integer registers (16): bits per register.
- Floating point registers (64): bits per register.
- Type-1: 4 instructions with 3 integer registers (3Rs).
- Type-2: 8 instructions with 2 floating point registers (2Fs).
- Type-3: 14 instructions with 1 integer and 1 floating point register (1R+1F).
4.Remaining combinations for Type-4:Total used = .
Remaining = .5.Calculate :Type-4 instructions have 1 floating point register (1F), which uses 6 bits.
Each Type-4 instruction uses combinations.
.Thus, the maximum value of is 32.62
Q62NAT2 marksHardGiven a language , define as follows: The order of a language is defined as the smallest…Think it through. Then check your answer.Question
Given a language , define as follows:The order of a language is defined as the smallest such that .
Consider the language (over alphabet 0) accepted by the following automaton.The order of is _____.
Correct answer
2 to 2
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The language accepted by the automaton consists of strings that lead to the accepting state (the middle state). Assuming the start state (leftmost) is also accepting (which is required for the order to be finite, as otherwise and would have disjoint sets of string lengths), the language is:Let's compute the powers of :1.2..Possible sums of lengths ():- ()
- ()
- ()
- ()
- ()
- ()
- ()
- And so on. We can form any integer length .
3.. Since , . Since , . Thus .Comparing the powers:- (e.g., but ).
- .
63
Q63NAT2 marksMediumConsider a storage disk with 4 platters (numbered as 0, 1, 2 and 3), 200 cylinders (numbered as 0, 1, … , 199), and 256 sectors per track (numbered as 0, 1, … , 255). The…Think it through. Then check your answer.Question
Consider a storage disk with 4 platters (numbered as 0, 1, 2 and 3), 200 cylinders (numbered as 0, 1, … , 199), and 256 sectors per track (numbered as 0, 1, … , 255). The following 6 disk requests of the form [sector number, cylinder number, platter number] are received by the disk controller at the same time:
Currently the head is positioned at sector number 100 of cylinder 80, and is moving towards higher cylinder numbers. The average power dissipation in moving the head over 100 cylinders is 20 milliwatts and for reversing the direction of the head movement once is 15 milliwatts. Power dissipation associated with rotational latency and switching of head between different platters is negligible.The total power consumption in milliwatts to satisfy all of the above disk requests using the Shortest Seek Time First disk scheduling algorithm is _______.Correct answer
85 to 85
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The Shortest Seek Time First (SSTF) algorithm selects the request with the minimum seek time (shortest distance) from the current head position.Given:- Current Head Position: Cylinder 80
- Current Direction: Increasing (towards higher cylinders)
- Requests (Cylinders):
- Power Cost (Movement): 20 mW per 100 cylinders mW/cylinder
- Power Cost (Reversal): 15 mW per reversal
1.Current: 80. Available: .- Closest is 86 ().
- Move: . Direction: Increasing (Same as initial). No reversal.
- Distance: 6.
- Closest is 72 ().
- Move: . Direction: Decreasing. Reversal #1.
- Distance: 14.
- Distances: , , , .
- Closest is 116.
- Move: . Direction: Increasing. Reversal #2.
- Distance: 44.
- Closest is 134 ().
- Move: . Direction: Increasing. No reversal.
- Distance: 18.
- Closest is 20 ().
- Move: . Direction: Decreasing. Reversal #3.
- Distance: 114.
- Closest is 16 ().
- Move: . Direction: Decreasing. No reversal.
- Distance: 4.
- Total Seek Distance = cylinders.
- Total Reversals = 3.
- Movement Power = .
- Reversal Power = .
- Total Power = .
64
Q64NAT2 marksMediumConsider an IP packet with a length of 4,500 bytes that includes a 20-byte IPv4 header and a 40-byte TCP header. The packet is forwarded to an IPv4 router that supports a Maximum…Think it through. Then check your answer.Question
Consider an IP packet with a length of 4,500 bytes that includes a 20-byte IPv4 header and a 40-byte TCP header. The packet is forwarded to an IPv4 router that supports a Maximum Transmission Unit (MTU) of 600 bytes. Assume that the length of the IP header in all the outgoing fragments of this packet is 20 bytes. Assume that the fragmentation offset value stored in the first fragment is 0. The fragmentation offset value stored in the third fragment is _______.Correct answer
144 to 144
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.Total IP packet length = 4500 bytes.2.IP header length = 20 bytes.3.Payload (Data) length = bytes.4.MTU = 600 bytes.5.Maximum payload per fragment = bytes.6.Since the fragmentation offset is measured in units of 8 bytes, the payload size in each fragment (except possibly the last) must be a multiple of 8. The largest multiple of 8 less than or equal to 580 is ().7.Fragment 1: Payload = 576 bytes. Offset = 0.8.Fragment 2: Payload = 576 bytes. Offset = .9.Fragment 3: Payload = 576 bytes. Offset = .Therefore, the fragmentation offset value stored in the third fragment is 144.65
Q65NAT2 marksHardConsider a simple communication system where multiple nodes are connected by a shared broadcast medium (like Ethernet or wireless). The nodes in the system use the following…Think it through. Then check your answer.Question
Consider a simple communication system where multiple nodes are connected by a shared broadcast medium (like Ethernet or wireless). The nodes in the system use the following carrier-sense based medium access protocol. A node that receives a packet to transmit will carrier-sense the medium for 5 units of time. If the node does not detect any other transmission in this duration, it starts transmitting its packet in the next time unit. If the node detects another transmission, it waits until this other transmission finishes, and then begins to carrier-sense for 5 time units again. Once they start to transmit, nodes do not perform any collision detection and continue transmission even if a collision occurs. All transmissions last for 20 units of time. Assume that the transmission signal travels at the speed of 10 meters per unit time in the medium. Assume that the system has two nodes P and Q, located at a distance meters from each other. P starts transmitting a packet at time after successfully completing its carrier-sense phase. Node Q has a packet to transmit at time and begins to carrier-sense the medium. The maximum distance (in meters, rounded to the closest integer) that allows Q to successfully avoid a collision between its proposed transmission and P’s ongoing transmission is _____.Correct answer
50 to 50
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.P starts transmitting at .2.Q starts carrier-sensing at . The sensing duration is 5 units, so Q senses from to .3.If Q does not detect any signal by , it will start transmitting at the next time unit, .4.The signal from P travels at a speed meters/unit. The distance between P and Q is .5.The propagation delay for P's signal to reach Q is .6.To avoid a collision, Q must detect P's signal during its carrier-sensing phase (i.e., by ).7.Therefore, meters.8.The maximum distance is 50 meters.