The PYQ practice room
GATE CS 2024 Set 1
All 65 solved GATE CS 2024 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
3
MCQ · MSQ · NAT
Revision mode
Self-paced
No timer. Focus on understanding.
Explore the questions
General Aptitude (GA)
101
Q1MCQ1 markEasyIf ‘’ denotes increasing order of intensity, then the meaning of the words [dry arid parched] is analogous to [diet fast…Think it through. Then check your answer.Question
If ‘’ denotes increasing order of intensity, then the meaning of the words [dry arid parched] is analogous to [diet fast ________ ].Which one of the given options is appropriate to fill the blank?Correct answer
(A) starve
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The relationship between the words in each set is one of increasing intensity.1.Dry Arid Parched:- Dry means lacking moisture.
- Arid means extremely dry (more intense than dry).
- Parched means completely dried out by heat (most intense).
- Diet means a controlled or restricted intake of food.
- Fast means to abstain from all or some kinds of food or drink (more intense than dieting).
- Starve means to suffer severely or die from hunger (most intense).
2
Q2MCQ1 markEasyIf two distinct non-zero real variables and are such that is proportional to then the value ofThink it through. Then check your answer.Question
If two distinct non-zero real variables and are such that is proportional to then the value ofCorrect answer
(D) is a constant
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given that is proportional to , we can write:where is a constant of proportionality.Rearranging the terms to find the ratio :Since is a constant, the expression is also a constant. Therefore, the value of is a constant.3
Q3MCQ1 markEasyConsider the following sample of numbers: The median of the sample isThink it through. Then check your answer.Question
Consider the following sample of numbers:The median of the sample isCorrect answer
(A) 13.5
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the median, we first arrange the given numbers in ascending order:The number of observations is , which is an even number.
For an even number of observations, the median is the average of the and terms.Here, . So, we take the average of the and terms. term
term Median4
Q4MCQ1 markEasyThe number of coins of ₹1, ₹5, and ₹10 denominations that a person has are in the ratio 5:3:13. Of the total amount, the percentage of money in ₹5 coins isThink it through. Then check your answer.Question
The number of coins of ₹1, ₹5, and ₹10 denominations that a person has are in the ratio 5:3:13. Of the total amount, the percentage of money in ₹5 coins isCorrect answer
(C) 10%
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let the number of coins of ₹1, ₹5, and ₹10 be , , and respectively.The total value of the coins is calculated as follows:- Value of ₹1 coins =
- Value of ₹5 coins =
- Value of ₹10 coins =
5
Q5MCQ1 markMediumFor positive non-zero real variables and , if then, the value of isThink it through. Then check your answer.Question
For positive non-zero real variables and , ifthen, the value of isCorrect answer
(A) 79
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given the equation:Using the properties of logarithms and :Removing the logarithm from both sides:We need to find the value of .
Rewrite the expression:Divide the equation by :Squaring both sides:Thus, .Answer: (A) 796
Q6MCQ2 marksMediumIn the given text, the blanks are numbered (i)–(iv). Select the best match for all the blanks. Steve was advised to keep his head _____(i)______ before heading…Think it through. Then check your answer.Question
In the given text, the blanks are numbered (i)–(iv). Select the best match for all the blanks.Steve was advised to keep his head _____(i)____ before heading _____(ii)______ to bat; for, while he had a head _______(iii)_______ batting, he could only do so with a cool head _____(iv)______ his shoulders.Correct answer
(C) (i) down (ii) out (iii) for (iv) on
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The correct choice is determined by standard English idioms and context:1.(i) down: The phrase "keep one's head down" means to remain inconspicuous or to focus intently on a task. This fits the context of a player preparing to bat.2.(ii) out: In cricket, a batsman "heads out" to the field/crease to bat.3.(iii) for: To have a "head for" something means to have an aptitude or talent for it (e.g., "a head for business"). Here, it implies Steve has a talent for batting.4.(iv) on: The idiom is "to have a good/cool head on one's shoulders," meaning to be sensible, practical, and intelligent.Thus, the correct sequence is: (i) down, (ii) out, (iii) for, (iv) on.7
Q7MCQ2 marksEasyA rectangular paper sheet of dimensions is taken. The two longer edges of the sheet are joined together to create a cylindrical tube. A cube…Think it through. Then check your answer.Question
A rectangular paper sheet of dimensions is taken. The two longer edges of the sheet are joined together to create a cylindrical tube. A cube whose surface area is equal to the area of the sheet is also taken.Then, the ratio of the volume of the cylindrical tube to the volume of the cube isCorrect answer
(A) 1/π
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.Calculate the dimensions of the cylinder:- The sheet has dimensions .
- The problem states that the two longer edges are joined together. The longer edges have length . Joining them creates a seam of length , which becomes the height () of the cylinder.
- The other dimension () becomes the circumference () of the base of the cylinder.
- Volume of the cylinder () =
- The surface area of the cube is equal to the area of the sheet.
- Area of sheet = .
- Surface area of a cube = , where is the side length.
- .
- Volume of the cube () = .
- Ratio = .
8
Q8MCQ2 marksEasyThe pie chart presents the percentage contribution of different macronutrients to a typical 2,000 kcal diet of a person. [figure] The typical energy density (kcal/g) of these…Think it through. Then check your answer.Question
The pie chart presents the percentage contribution of different macronutrients to a typical 2,000 kcal diet of a person.The typical energy density (kcal/g) of these macronutrients is given in the table.
The total fat (all three types), in grams, this person consumes isMacronutrient Energy density (kcal/g) Carbohydrates 4 Proteins 4 Unsaturated fat 9 Saturated fat 9 Trans fat 9 Correct answer
(C) 100
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given:- Total energy intake = kcal.
- Energy density of fats (Unsaturated, Saturated, Trans) = kcal/g.
- Unsaturated fat:
- Saturated fat:
- Trans fat:
9
Q9MCQ2 marksMediumA rectangular paper of is folded 3 times. Each fold is made along the line of symmetry, which is perpendicular to its long edge. The perimeter…Think it through. Then check your answer.Question
A rectangular paper of is folded 3 times. Each fold is made along the line of symmetry, which is perpendicular to its long edge. The perimeter of the final folded sheet (in cm) isCorrect answer
(A) 18
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The initial dimensions of the paper are .Fold 1:
The fold is made along the line of symmetry perpendicular to the long edge (). This halves the length.
New dimensions: .Fold 2:
The current dimensions are . The long edge is . The fold is perpendicular to this edge.
New dimensions: .Fold 3:
The current dimensions are . The long edge is now (since ). The fold is perpendicular to the edge.
New dimensions: .The final folded sheet is a rectangle of size .
The perimeter is given by:10
Q10MCQ2 marksMediumThe least number of squares to be added in the figure to make AB a line of symmetry is [figure]Think it through. Then check your answer.Question
The least number of squares to be added in the figure to make AB a line of symmetry is
Correct answer
(A) 6
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To make the line AB a line of symmetry, every shaded square on one side of the line must have a corresponding shaded square on the other side at the same distance from the line.Let's analyze the positions of the existing squares relative to the line AB:1.Above the line:- One square at column 3, 2 units above.
- One square at column 4, 1 unit above.
- One square at column 2, 1 unit below.
- One square at column 4, 1 unit below.
- A block of squares at columns 5 and 6, spanning 1 and 2 units below (total 4 squares).
- The square at (column 4, 1 unit above) and the square at (column 4, 1 unit below) are already symmetric to each other. No squares need to be added here.
- The square at (column 3, 2 units above) needs a reflection at (column 3, 2 units below). (+1 square)
- The square at (column 2, 1 unit below) needs a reflection at (column 2, 1 unit above). (+1 square)
- The block at (columns 5-6, 1-2 units below) needs a reflection at (columns 5-6, 1-2 units above). (+4 squares)
Computer Science and Information Technology
5511
Q11MCQ1 markMediumLet be a function such that , where is the set of all real numbers. The set of all…Think it through. Then check your answer.Question
Let be a function such that , where is the set of all real numbers. The set of all points where is NOT differentiable isCorrect answer
(D) \-1, 0, 1\
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The function is given by .
To analyze the function, we find the points where the graphs of and intersect:The intersection points are .We determine the value of in the intervals defined by these points:1.For : Let . Then and . Since , .2.For : Let . Then and . Since , .3.For : Let . Then and . Since , .4.For : Let . Then and . Since , .Thus, the function can be written piecewise as:We check for differentiability at the transition points by comparing the Left Hand Derivative (LHD) and Right Hand Derivative (RHD).At :
LHD
RHD
Since LHD RHD, is not differentiable at .At :
LHD
RHD
Since LHD RHD, is not differentiable at .At :
LHD
RHD
Since LHD RHD, is not differentiable at .The set of points where is not differentiable is .12
Q12MCQ1 markEasyThe product of all eigenvalues of the matrix isThink it through. Then check your answer.Question
The product of all eigenvalues of the matrix isCorrect answer
(B) 0
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The product of all eigenvalues of a square matrix is equal to its determinant. Let . We can calculate the determinant directly:Alternatively, observe that the rows are in an arithmetic progression, which implies linear dependence (). Since the rows are linearly dependent, the determinant is zero. Since the product of eigenvalues equals the determinant, the product is 0.13
Q13MCQ1 markMediumConsider a system that uses 5 bits for representing signed integers in 2’s complement format. In this system, two integers and are represented as and .…Think it through. Then check your answer.Question
Consider a system that uses 5 bits for representing signed integers in 2’s complement format. In this system, two integers and are represented as and . Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?Correct answer
(B) A - B
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a 5-bit 2's complement system, the range of representable integers is from to , i.e., from to .Given:
. Since the MSB is 0, it is positive. Value .
. Since the MSB is 1, it is negative. To find the magnitude, we take the 2's complement: invert bits () and add 1 (), which is 6. So, .Let's evaluate the options:(A) . This is within the range . No overflow.(B) . The maximum positive value representable is 15. Since , an arithmetic overflow occurs.(C) . This is within the range . No overflow ( is represented as ).(D) . This is within the range . No overflow.Thus, the operation results in an overflow.14
Q14MCQ1 markMediumConsider a permutation sampled uniformly at random from the set of all permutations of for some . Let be the event that 1 occurs before 2 in…Think it through. Then check your answer.Question
Consider a permutation sampled uniformly at random from the set of all permutations of for some . Let be the event that 1 occurs before 2 in the permutation, and the event that 3 occurs before 4. Which one of the following statements is TRUE?Correct answer
(B) The events X and Y are independent
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let be the set of all permutations of the set .1.Event : 1 occurs before 2. In any random permutation, the relative order of 1 and 2 can only be (1, 2) or (2, 1). By symmetry, both are equally likely. Thus, .2.Event : 3 occurs before 4. Similarly, the relative order of 3 and 4 can only be (3, 4) or (4, 3), and both are equally likely. Thus, .3.Independence: To determine if and are independent, we check if .Consider the relative ordering of the subset . There are possible relative orderings of these four elements, all of which are equally likely in a random permutation of elements.- The event occurs when 1 is before 2 AND 3 is before 4.
- Out of the 24 permutations of , we can count the number of ways where both conditions are met:
- Choose 2 positions out of 4 for the pair in ways. In each choice, there is exactly 1 way to place them such that 1 is before 2.
- The remaining 2 positions must be filled by . There is exactly 1 way to place them such that 3 is before 4.
- Total favorable outcomes = .
- .
- (A) False: , so they are not mutually exclusive.
- (C) False: . Since the probability is not 1, it is not guaranteed that either or must occur.
- (D) False: , so they are equally likely.
15
Q15MCQ1 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
(C) Programmed I/O mechanism has a better CPU utilization than the interrupt driven I/O mechanism
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To identify the false statement, let's evaluate each option:- Statement (A): In cycle stealing mode, the DMA controller requests the bus for a single cycle to transfer one word of data. This is a standard definition of cycle stealing. So, this statement is TRUE.
- Statement (B): Burst mode (or block transfer mode) transfers a contiguous block of data without releasing the bus until the entire block is moved. This reduces the overhead of bus requests and grants compared to cycle stealing, leading to higher throughput for large data transfers. So, this statement is TRUE.
- Statement (C): In Programmed I/O, the CPU must constantly poll the status register of the I/O module to check if it is ready. This 'busy-waiting' consumes CPU cycles that could be used for other tasks. In contrast, Interrupt-driven I/O allows the CPU to perform other work and only services the I/O device when an interrupt is received. Therefore, Interrupt-driven I/O has much better CPU utilization. This statement is FALSE.
- Statement (D): In vectored interrupts, the interrupting device provides a vector (an index or address) that points directly to the Interrupt Service Routine (ISR). In non-vectored interrupts, the CPU must poll multiple devices or execute a general routine to determine the source of the interrupt. Thus, vectored interrupts are faster. So, this statement is TRUE.
16
Q16MCQ1 markEasyA user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage consists of a…Think it through. Then check your answer.Question
A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage consists of a top-level index page with multiple embedded image objects. Assume that all caches (e.g., DNS cache, browser cache) are all initially empty. The following packets leave the user’s computer in some order.(i) HTTP GET request for the index page
(ii) DNS request to resolve the web server’s name to its IP address
(iii) HTTP GET request for an image object
(iv) TCP SYN to open a connection to the web serverWhich one of the following is the CORRECT chronological order (earliest in time to latest) of the packets leaving the computer ?Correct answer
(C) (ii), (iv), (i), (iii)
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To fetch a webpage when all caches are empty, the following sequence of events must occur:1.DNS Resolution (ii): The browser first needs to know the IP address of the remote server. It sends a DNS request to resolve the hostname.2.TCP Connection Establishment (iv): Once the IP address is obtained, the browser must establish a TCP connection with the server. This begins with a TCP SYN packet.3.HTTP Request for Index Page (i): After the TCP connection is established, the browser sends an HTTP GET request to fetch the main index page of the website.4.HTTP Request for Embedded Objects (iii): The browser receives and parses the index page. Upon discovering embedded objects (like images), it sends subsequent HTTP GET requests to fetch those specific objects.Therefore, the correct chronological order is (ii) → (iv) → (i) → (iii), which matches option (C).17
Q17MCQ1 markEasyGiven an integer array of size , we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass…Think it through. Then check your answer.Question
Given an integer array of size , we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass through the array and comparing each element of the array only with its adjacent elements. The worst-case time complexity of this algorithm isCorrect answer
(A) both O(N) and Ω(N)
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To determine if an array of size is sorted (either ascending or descending), an algorithm must examine every element at least once to ensure no pair violates the sorting order. A single-pass algorithm that compares each element with its adjacent neighbor will perform exactly comparisons in the worst case (e.g., when the array is indeed sorted or the violation occurs at the very end). Since the number of operations is proportional to , the time complexity is . By the definitions of asymptotic notation, implies that and . Therefore, the worst-case time complexity is bothO(N)and .18
Q18MCQ1 markEasyConsider the following C program: [code] Which one of the following statements is CORRECT?Think it through. Then check your answer.Question
Consider the following C program:Which one of the following statements is CORRECT?#include <stdio.h> int main(){ int a = 6; int b = 0; while(a < 10) { a = a / 12 + 1; a += b;} printf("%d", a); return 0;}Correct answer
(C) The program gets stuck in an infinite loop
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 step-by-step:1.Initialization: The variables are initialized as and .2.Loop Condition: Thewhileloop continues as long as .3.First Iteration:- The condition is true.
-
a = a / 12 + 1: In C, integer division results in . Thus, . -
a += b: .
- The condition is true.
-
a = a / 12 + 1: Integer division results in . Thus, . -
a += b: .
19
Q19MCQ1 markMediumConsider the following C program: [code] Assume that the input to the program from the command line is 1234 followed by a newline character. Which one of the following statements…Think it through. Then check your answer.Question
Consider the following C program:Assume that the input to the program from the command line is 1234 followed by#include <stdio.h> void fX(); int main(){ fX(); return 0;} void fX(){ char a; if((a=getchar()) != '\n') fX(); if(a != '\n') putchar(a);}
a newline character. Which one of the following statements is CORRECT?Correct answer
(C) The program will terminate with 4321 as output
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The functionfX()is a recursive function that reads characters from the standard input one by one.1.Base Case: The recursion stops whengetchar()reads a newline character'\n'. At this point, theif((a=getchar()) != '\n')condition fails, and the function starts returning.2.Recursive Step: For any character other than'\n', the function calls itself recursively:fX(). This pushes the current characteraonto the function call stack.3.Post-recursion Action: After the recursive call returns, the function executesBecause the printing happens after the recursive call returns, the characters are printed in the reverse order of their arrival (Last-In, First-Out behavior).Execution Trace for input "1234\n":if(a != '\n') putchar(a);. This prints the character that was read before the recursive call.fX()(1st call) reads '1', callsfX()(2nd call).fX()(2nd call) reads '2', callsfX()(3rd call).fX()(3rd call) reads '3', callsfX()(4th call).fX()(4th call) reads '4', callsfX()(5th call).fX()(5th call) reads '\n', the condition('\n' != '\n')is false. It skips the recursive call and theputchar(sincea == '\n'), then returns to the 4th call.fX()(4th call) resumes,ais '4',putchar('4')prints 4, returns to 3rd call.fX()(3rd call) resumes,ais '3',putchar('3')prints 3, returns to 2nd call.fX()(2nd call) resumes,ais '2',putchar('2')prints 2, returns to 1st call.fX()(1st call) resumes,ais '1',putchar('1')prints 1, returns tomain().
20
Q20MCQ1 markEasyLet S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one of the following ER…Think it through. Then check your answer.Question
Let S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one of the following ER diagrams CORRECTLY represents S?
Correct answer
(D) (iv)
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The specification S consists of four relationships:1.Instructors teach courses: A relationship between theInstructorandCourseentities.2.Students register for courses: A relationship between theStudentandCourseentities.3.Courses are allocated classrooms: A relationship between theCourseandClassroomentities.4.Instructors guide students: A relationship between theLet's analyze the given diagrams:InstructorandStudententities.- Diagram (i): The
Allocationrelationship is ternary, connectingCourse,Classroom, andStudent. This implies students are involved in the allocation of classrooms, which contradicts the specification. Also, there is no directRegistrationrelationship betweenStudentandCourse. - Diagram (ii): The
Guidesrelationship connectsInstructorto an entity labeledProjects(or similar), notStudent. This contradicts the specification "Instructors guide students". - Diagram (iii): The
Registrationrelationship connectsStudentto theAllocationrelationship (associative entity), rather than directly toCourse. This implies students register for a specific allocation, which is not the standard interpretation of "register for courses". - Diagram (iv):
TeachesconnectsInstructorandCourse.RegistrationconnectsStudentandCourse.AllocationconnectsCourseandClassroom.GuidesconnectsInstructorandStudent.
This diagram correctly models all four specifications using binary relationships between the appropriate entities. Therefore, diagram (iv) is the correct representation.- Diagram (i): The
21
Q21MCQ1 markEasyIn a tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?Think it through. Then check your answer.Question
In a tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?Correct answer
(A) Only the root node
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a tree of order , the standard properties are:1.Every node except the root must be at least half-full. For an internal node, this means it must have at least children. For a leaf node, it must have at least keys.2.The root node is the exception. If it is an internal node, it must have at least 2 children. If it is the only node in the tree (a leaf), it can have as few as 1 key.Therefore, the 50% occupancy requirement is relaxed only for the root node.22
Q22MSQ1 markMediumWhich of the following statements about a relation in first normal form (1NF) is/are TRUE ?Think it through. Then check your answer.Question
Which of the following statements about a relation in first normal form (1NF) is/are TRUE ?Correct answer
(A) R can have a multi-attribute key; (C) R cannot have a composite attribute
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
A relation is in First Normal Form (1NF) if and only if the domain of each attribute contains only atomic (indivisible) values, and the value of each attribute in a tuple contains only a single value from that domain.Analysis of Options:- (A) can have a multi-attribute key: TRUE. A candidate key or primary key can consist of multiple attributes (a composite key). This does not violate the atomicity requirement of 1NF, as long as each individual attribute in the key is atomic.
- (B) cannot have a foreign key: FALSE. 1NF does not restrict the existence of foreign keys. Relations in 1NF can and often do have foreign keys to establish relationships.
- (C) cannot have a composite attribute: TRUE. By definition, 1NF requires attributes to be atomic. A composite attribute (e.g., an address composed of street, city, zip) is not atomic. Therefore, a relation in 1NF cannot contain composite attributes; they must be decomposed into atomic attributes.
- (D) cannot have more than one candidate key: FALSE. A relation in 1NF can have multiple candidate keys. 1NF places no restriction on the number of candidate keys.
23
Q23MSQ1 markMediumLet be two regular languages and a language which is not regular. Which of the following statements is/are always TRUE?Think it through. Then check your answer.Question
Let be two regular languages and a language which is not regular. Which of the following statements is/are always TRUE?Correct answer
(C) L₃ is not regular; (D) L₁ ∪ L₂ is regular
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let be regular languages and be a non-regular language.- Option (A): if and only if . This is false. is equivalent to . For to be true, we also need (i.e., ).
- Option (B): is not regular. This is false. For example, if (which is regular) and is any non-regular language, then , which is regular.
- Option (C): is not regular. This is true. Regular languages are closed under complementation. If were regular, then its complement would also be regular, which contradicts the given that is not regular.
- Option (D): is regular. This is true. Regular languages are closed under complementation and union. Since and are regular, and are regular, and their union is also regular.
24
Q24MSQ1 markEasyWhich of the following statements about threads is/are TRUE?Think it through. Then check your answer.Question
Which of the following statements about threads is/are TRUE?Correct answer
(D) Threads belonging to a process are by default not protected from each other
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To determine which statements are true, let's analyze the properties of threads within a process:1.Statement (A) is FALSE: Threads can be implemented at the user level (User-Level Threads) using libraries (e.g., Pthreads) or at the kernel level (Kernel-Level Threads) where the OS manages them. Many systems use a hybrid model.2.Statement (B) is FALSE: Threads within the same process share the process's resources, including the address space, global variables, and the file descriptor table. They do not have individual file descriptor tables.3.Statement (C) is FALSE: Each thread requires its own execution context, which includes its own program counter, register set, and stack. While they share the heap, they must have separate stacks to manage their own function calls and local variables.4.Statement (D) is TRUE: Because threads of the same process share the same virtual address space, there is no memory protection between them. One thread can accidentally or intentionally overwrite data being used by another thread. This is why synchronization (like mutexes) is critical in multi-threaded programming.Conclusion: Only statement (D) is correct.25
Q25MSQ1 markEasyWhich of the following process state transitions is/are NOT possible?Think it through. Then check your answer.Question
Which of the following process state transitions is/are NOT possible?Correct answer
(B) Waiting to Running; (C) Ready to Waiting
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a standard five-state process transition model (New, Ready, Running, Waiting, Terminated):1.Running to Ready: This is a possible transition. It occurs when a process is preempted (e.g., its time quantum expires in a Round Robin scheduling algorithm).2.Waiting to Running: This is NOT possible. A process in the Waiting (or Blocked) state must first transition to the Ready state once the event it was waiting for (like I/O completion) occurs. From the Ready state, the CPU scheduler can then dispatch it to the Running state.3.Ready to Waiting: This is NOT possible. A process can only enter the Waiting state from the Running state. This happens when the process makes a system call for an I/O operation or needs to wait for a specific event to occur.4.Running to Terminated: This is a possible transition. It occurs when a process finishes its execution or is terminated due to an error.Therefore, the transitions that are not possible are (B) and (C).26
Q26MSQ1 markEasyWhich of the following is/are Bottom-Up Parser(s)?Think it through. Then check your answer.Question
Which of the following is/are Bottom-Up Parser(s)?Correct answer
(A) Shift-reduce Parser; (D) LR Parser
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Bottom-up parsing constructs the parse tree from the leaves (input string) up to the root (start symbol).1.Shift-reduce Parser: This is a general style of bottom-up parsing where the parser shifts input symbols onto a stack and reduces a string of symbols on the top of the stack to a non-terminal according to the grammar rules. Thus, it is a bottom-up parser.2.Predictive Parser: This is typically a recursive descent parser (top-down) that does not require backtracking. It predicts which production to use based on the lookahead. Thus, it is a top-down parser.3.LL(1) Parser: LL parsers (Left-to-right scan, Leftmost derivation) are top-down parsers.4.LR Parser: LR parsers (Left-to-right scan, Rightmost derivation in reverse) are a type of shift-reduce parser and are therefore bottom-up parsers.Therefore, options (A) and (D) are correct.27
Q27MSQ1 markMediumLet and be two events in a probability space with , , and . Which of the following statements is/are TRUE?Think it through. Then check your answer.Question
Let and be two events in a probability space with , , and . Which of the following statements is/are TRUE?Correct answer
(B) P(A ∪ B) = 0.7; (C) P(A ∩ B^c) = 0.2, where B^c is the complement of the event B
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given:
Option (A): Check for independence.
Two events are independent if .
Since , events and are not independent.
So, option (A) is FALSE.Option (B): Calculate .
Using the formula :
So, option (B) is TRUE.Option (C): Calculate .
represents the probability of occurring but not .
So, option (C) is TRUE.Option (D): Calculate .
By De Morgan's Law, .
The option states , which is incorrect.
So, option (D) is FALSE.28
Q28MSQ1 markMediumConsider the circuit shown below where the gates may have propagation delays. Assume that all signal transitions occur instantaneously and that wires have no delays. Which of the…Think it through. Then check your answer.Question
Consider the circuit shown below where the gates may have propagation delays. Assume that all signal transitions occur instantaneously and that wires have no delays. Which of the following statements about the circuit is/are CORRECT?
Correct answer
(A) With no propagation delays, the output Y is always logic Zero; (C) With propagation delays, the output Y can have a transient logic One after X transitions from logic Zero to logic One
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The circuit implements the Boolean function .1.No propagation delays: In an ideal scenario without delays, the output is the logical product of a variable and its complement, which is always 0. Thus, for any value of . Statement (A) is correct.2.With propagation delays: Let the propagation delay of the NOT gate be . The output of the AND gate at time is .- Transition : Suppose changes from 0 to 1 at . For the interval , the direct input to the AND gate is 1, while the output of the NOT gate remains 1 because the change in hasn't propagated through it yet. Consequently, for a duration of . This is known as a transient logic One or a static-0 hazard. Statement (C) is correct.
- Transition : Suppose changes from 1 to 0 at . For , the direct input to the AND gate becomes 0 immediately, while the output of the NOT gate is still 0. Thus, . No transient occurs.
29
Q29MSQ1 markEasyTCP client successfully establishes a connection to TCP server . Let denote the sequence number in the SYN sent from to . Let denote the acknowledgement…Think it through. Then check your answer.Question
TCP client successfully establishes a connection to TCP server . Let denote the sequence number in the SYN sent from to . Let denote the acknowledgement number in the SYN ACK from to . Which of the following statements is/are CORRECT?Correct answer
(A) The sequence number N_P is chosen randomly by P; (D) The acknowledgement number N_Q is equal to N_P + 1
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In the TCP three-way handshake process:1.Step 1 (SYN): The client sends a SYN segment to the server to initiate a connection. This segment contains an Initial Sequence Number (ISN), denoted as . According to TCP standards (RFC 793, RFC 6528), the ISN is chosen using a pseudo-random generator to ensure uniqueness and security against sequence number prediction attacks. Therefore, statement (A) is correct.2.Step 2 (SYN ACK): The server responds with a SYN ACK segment. This segment includes its own ISN and an acknowledgement number. The acknowledgement number confirms the receipt of the client's SYN. Since the SYN flag logically consumes one sequence number, the acknowledgement number is set to the client's sequence number plus one (). The question defines as this acknowledgement number. Thus, , making statement (D) correct.Statement (B) is incorrect because the ISN is randomized, not fixed at 0. Statement (C) is incorrect because the acknowledgement number must be to account for the SYN flag.30
Q30MSQ1 markMediumConsider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback (WB) stages. Which of the…Think it through. Then check your answer.Question
Consider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback (WB) stages. Which of the following statements about forwarding is/are CORRECT?Correct answer
(A) In a pipelined execution, forwarding means the result from a source stage of an earlier instruction is passed on to the destination stage of a later instruction; (B) In forwarding, data from the output of the MEM stage can be passed on to the input of the EX stage of the next instruction; (C) Forwarding cannot prevent all pipeline stalls
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The correct statements are (A), (B), and (C).(A) Correct: Forwarding (or bypassing) is a technique where the result of an instruction is passed directly from the stage where it is generated (source stage, e.g., output of ALU in EX or memory data in MEM) to the stage where it is needed by a subsequent instruction (destination stage, e.g., input of ALU in EX), without waiting for the result to be written back to the register file.(B) Correct: In a standard 5-stage pipeline, data can be forwarded from the end of the MEM stage (the MEM/WB pipeline register) to the beginning of the EX stage. This path is used, for example, when a Load instruction is followed by a dependent instruction. Although a 1-cycle stall is typically required (Load-Use hazard), after the stall, the data is forwarded from the Load's MEM/WB stage to the dependent instruction's EX stage.(C) Correct: Forwarding cannot eliminate all stalls. Specifically, a Load-Use hazard occurs when an instruction attempts to use data in the EX stage that is being loaded from memory by the immediately preceding instruction. Since the data is not available until the end of the MEM stage, it cannot be forwarded to the start of the EX stage of the very next cycle. A stall (bubble) is required.(D) Incorrect: Forwarding requires extra hardware, including multiplexers at the ALU inputs to select between register values and forwarded values, as well as control logic to detect dependencies and control the multiplexers.31
Q31MSQ1 markMediumWhich of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?Think it through. Then check your answer.Question
Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?Correct answer
(A) Source IP; (C) Header Checksum
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
When a packet goes from an internal network to an external network through a NAT device (specifically Source NAT or NAPT):1.Source IP: The NAT device replaces the private source IP address of the internal host with its own public IP address (or one from a pool). Thus, the Source IP is modified.2.Header Checksum: Since the IP header contains the Source IP address, changing the Source IP invalidates the existing checksum. The NAT device must recalculate and update the Header Checksum.3.Destination IP: For an outgoing packet, the destination is an external host, so the Destination IP is typically not modified (unless it is a specific destination NAT scenario, which is not the default for internal-to-external traffic).4.Total Length: The size of the packet usually remains the same, so the Total Length field is not modified.Therefore, the fields modified are Source IP and Header Checksum.32
Q32NAT1 markMediumLet and be non-empty finite sets such that there exist one-to-one and onto functions (i) from to and (ii) from to . The number of possible…Think it through. Then check your answer.Question
Let and be non-empty finite sets such that there exist one-to-one and onto functions (i) from to and (ii) from to . The number of possible values 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
Let and .From condition (i), there is a bijection from to , which implies . Thus, .From condition (ii), there is a bijection from to , which implies .We know that:
Equating the two:
Rearranging for :
We know that for any two sets and , the size of their intersection satisfies:
Substituting into the inequality:1.
Since is a positive integer (non-empty set), this implies .2.
This implies .Combining these, the possible integer values for are and .Verification:- If : . This is possible if (e.g., ).
- If : . This is possible if and are disjoint (e.g., ).
33
Q33NAT1 markMediumConsider the operator precedence and associativity rules for the integer arithmetic operators given in the table below. | Operator | Precedence | Associativity | | :---: | :---: |…Think it through. Then check your answer.Question
Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table below.The value of the expression as per the above rules is __________Operator Precedence Associativity + Highest Left − High Right ∗ Medium Right / Low Right Correct answer
6 to 6
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To evaluate the expression , we follow the given precedence and associativity rules:1.+ (Highest, Left-to-Right)2.− (High, Right-to-Left)3.∗ (Medium, Right-to-Left)4./ (Low, Right-to-Left)Step 1: Evaluate '+' (Highest precedence, Left associative)
There are three '+' operators. We evaluate them from left to right:
The subtraction chain is . Since it is right associative, we evaluate from right to left:
There is one '*' operator:
There are two '/' operators. Since it is right associative, we evaluate from right to left:34
Q34NAT1 markEasyThe number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is _________Think it through. Then check your answer.Question
The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is _________Correct answer
16 to 16
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The number of spanning trees in a complete graph with vertices () is given by Cayley's formula:Given :35
Q35NAT1 markEasyConsider the following two relations,R(A,B)andS(A,C): Relation R | A | B | |---|---| | 10 | 20 | | 20 | 30 | | 30 | 40 | | 30 | 50 | | 50 | 95 | Relation S | A | C…Think it through. Then check your answer.Question
Consider the following two relations,R(A,B)andS(A,C):Relation RRelation SA B 10 20 20 30 30 40 30 50 50 95 The total number of tuples obtained by evaluating the following expressionis _________A C 10 90 30 45 40 80 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 evaluate the expression , we first perform the natural join (equi-join on attribute ) between relations and , and then apply the selection condition .Step 1: Perform the Join ()
We match tuples from and where .- For : has and has .
- Resulting tuple:
- For : has but has no tuple with . No match.
- For : has and . has .
- Match with
- Match with
- For : has but has no tuple with . No match.
- For : has but has no tuple with . No match.
1.2.3.Step 2: Apply Selection ()
We filter the joined tuples where the value of attribute is strictly less than attribute .1.Tuple : . Is ? Yes.2.Tuple : . Is ? Yes.3.Tuple : . Is ? No.Step 3: Count the Tuples
The tuples satisfying the condition are and .Total number of tuples = 2.36
Q36MCQ2 marksMediumConsider a network path P—Q—R between nodes P and R via router Q. Node P sends a file of size bytes to R via this path by splitting the file into chunks of bytes…Think it through. Then check your answer.Question
Consider a network path P—Q—R between nodes P and R via router Q. Node P sends a file of size bytes to R via this path by splitting the file into chunks of bytes each. Node P sends these chunks one after the other without any wait time between the successive chunk transmissions. Assume that the size of extra headers added to these chunks is negligible, and that the chunk size is less than the MTU.Each of the links P—Q and Q—R has a bandwidth of bits/sec, and negligible propagation latency. Router Q immediately transmits every packet it receives from P to R, with negligible processing and queueing delays. Router Q can simultaneously receive on link P—Q and transmit on link Q—R.Assume P starts transmitting the chunks at time .
Which one of the following options gives the time (in seconds, rounded off to 3 decimal places) at which R receives all the chunks of the file?Correct answer
(B) 8.008
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given:- File size bytes
- Chunk size bytes
- Bandwidth bits/sec
- Path: P Q R (2 hops)
Packet size in bits = bitsIn a packet-switched network with pipelining (store-and-forward at router Q), the total time to transfer packets over hops is given by:Here, the number of hops (P-Q and Q-R).Converting to seconds:Alternatively, we can trace the packets:- The first packet arrives at Q at ms. Q immediately starts forwarding it to R. It arrives at R at ms.
- Due to pipelining, subsequent packets arrive at R every ms after the first packet.
- There are remaining packets.
- Total time = Time for 1st packet + Time for remaining 999 packets
- Total time = .
37
Q37MCQ2 marksMediumConsider the following syntax-directed definition (SDD). | Production | Semantic Rules | | ------ | ------ | |S → DHTU| | |…Think it through. Then check your answer.Question
Consider the following syntax-directed definition (SDD).Given "MMLK" as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute )?Production Semantic Rules S → DHTUCorrect answer
(A) 45
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the value of for the input string "MMLK", we first construct the parse tree based on the given grammar productions.1. Parsing the Input "MMLK":
The start symbol is , and the production isS → DHTU.
We need to match the input string "MMLK" to the components .- Match : The prefix "MM" matches the expansion of .
- (since the next character is 'L', which belongs to )
- Match : The next character "L" matches the expansion of .
- (since the next character is 'K', and must be skipped)
- Match : There are no 'C' characters. The next character is 'K', which belongs to . Thus, must derive .
- Match : The character "K" matches .
Now we compute the values using the semantic rules.- For :
- For :
- For :
- For :
- For :
38
Q38MCQ2 marksMediumConsider the following grammar , with as the start symbol. The grammar has three incomplete productions denoted by (1), (2), and (3).…Think it through. Then check your answer.Question
Consider the following grammar , with as the start symbol. The grammar has three incomplete productions denoted by (1), (2), and (3).The set of terminals is . The FIRST and FOLLOW sets of the different non-terminals are as follows..Which one of the following options CORRECTLY fills in the incomplete productions?Correct answer
(A) (1) S arrow Rf (2) T arrow ε (3) R arrow cTR
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
We are given the FIRST sets for the non-terminals:
Let's analyze the incomplete productions based on these sets.1. Analyze Production (1) for :
The production contributes to .
The missing part (1) must contribute the remaining elements of , which are .- Option (B) & (C): . This starts with the terminal . Thus, it adds to , but it cannot add . So, (B) and (C) are incorrect.
- Option (A) & (D): . Since , this production adds (from ) and, because is nullable (), it also adds . Thus, contributes both and . This matches the requirement.
The existing productions contribute and to .
The missing part (2) must contribute to match .- Option (A): . This correctly adds to .
- Option (D): . This would add to . However, is not in the given . Thus, (D) is incorrect.
The existing production contributes .
The missing part (3) must contribute to match .- Option (A): . This starts with , satisfying the condition.
39
Q39MCQ2 marksMediumConsider the following pseudo-code. [code] Which one of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic…Think it through. Then check your answer.Question
Consider the following pseudo-code.Which one of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively ?L1: t1 = -1 L2: t2 = 0 L3: t3 = 0 L4: t4 = 4 * t3 L5: t5 = 4 * t2 L6: t6 = t5 * M L7: t7 = t4 + t6 L8: t8 = a[t7] L9: if t8 <= max goto L11 L10: t1 = t8 L11: t3 = t3 + 1 L12: if t3 < M goto L4 L13: t2 = t2 + 1 L14: if t2 < N goto L3 L15: max = t1Correct answer
(D) 7 and 6
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the number of basic blocks, we first identify the leaders in the code:1.The first instruction is a leader: L1.2.Any instruction that is the target of a conditional or unconditional jump is a leader: L3 (target of L14), L4 (target of L12), and L11 (target of L9).3.Any instruction that immediately follows a conditional or unconditional jump is a leader: L10 (follows L9), L13 (follows L12), and L15 (follows L14).The set of leaders is .Now, we form the basic blocks starting from each leader until the next leader or the end of the program:- Block 1: (2 instructions)
- Block 2: (1 instruction)
- Block 3: (6 instructions)
- Block 4: (1 instruction)
- Block 5: (2 instructions)
- Block 6: (2 instructions)
- Block 7: (1 instruction)
The largest basic block is Block 3, which contains 6 instructions.
Therefore, the correct option is (D).40
Q40MCQ2 marksMediumConsider the following two threads T1 and T2 that update two shared variables a and b. Assume that initially a = b = 1. Though context switching between threads can happen at any…Think it through. Then check your answer.Question
Consider the following two threads T1 and T2 that update two shared variables a and b. Assume that initially a = b = 1. Though context switching between threads can happen at any time, each statement of T1 or T2 is executed atomically without interruption.Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?T1 T2 a = a + 1; b = 2 *b;b = b + 1; a = 2 *a;Correct answer
(A) (a = 4, b = 4); (a = 3, b = 3); (a = 4, b = 3)
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let the statements be:
T1:
Constraint: must execute before .T2:
Constraint: must execute before .Initially .Analysis of variable :
Operations on are and .- If order is : . ()
- If order is : . ()
Operations on are and .- If order is : . ()
- If order is : . ()
We must respect thread order ( and ).
Total permutations of 4 instructions is .1.: , . Result: .2.: , . Result: .3.: , . Result: .4.: , . Result: .5.: , . Result: .6.: , . Result: .Possible outcomes: .Note: The outcome requires (for ) and (for ).
Combined with thread constraints and , we get cycle: . Impossible.Thus, the set of possible values is .41
Q41MCQ2 marksMediumAn array is heapified. Which one of the following options represents the first three elements in the heapified array?Think it through. Then check your answer.Question
An array is heapified. Which one of the following options represents the first three elements in the heapified array?Correct answer
(D) 131, 111, 90
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The problem asks for the first three elements of the array after it has been heapified. Since the options suggest the root is 131 (the maximum element in the input), we assume a Max-Heap is constructed using the standard bottom-upbuild-heapalgorithm.Input Array:
Indices: to . Size .Thebuild-heapprocess starts from the last non-leaf node, which is at index , and iterates down to .1.Index 4 (): Child is . Since , no swap needed.Array:2.Index 3 (): Children are and . Max child is . Swap and .Array:3.Index 2 (): Children are and . is larger than both. No swap.Array:4.Index 1 (): Children are and . Max child is . Swap and .Array:
Check subtree at index 3: Parent , Children . is larger. No further swap.5.Index 0 (): Children are and . Max child is . Swap and .Array:
Check subtree at index 1: Parent , Children . Max child is . Swap and .
Array:
Check subtree at index 4: Parent , Child . Max child is . Swap and .
Array: Final Heapified Array: The first three elements are 131, 111, 90.42
Q42MCQ2 marksMediumConsider the following recurrence relation: Which one of the…Think it through. Then check your answer.Question
Consider the following recurrence relation:Which one of the following options is CORRECT?Correct answer
(A) T(n) = Θ(n log log n)
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The given recurrence relation is:To solve this, we can use the substitution method.
Let , which implies . Then .
Substituting these into the recurrence:Divide the entire equation by :Let . The recurrence becomes:This is a standard recurrence relation (similar to binary search complexity) whose solution is:Now, substitute back and :Thus, option (A) is correct.43
Q43MCQ2 marksMediumConsider a binary min-heap containing 105 distinct elements. Let be the index (in the underlying array) of the maximum element stored in the heap. The number of possible…Think it through. Then check your answer.Question
Consider a binary min-heap containing 105 distinct elements. Let be the index (in the underlying array) of the maximum element stored in the heap. The number of possible values of isCorrect answer
(A) 53
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a min-heap, the property is that every parent node is smaller than or equal to its children. Consequently, the smallest element is at the root, and the largest element must be one of the leaf nodes. It cannot be an internal node because an internal node must be smaller than its children.In a binary heap with distinct elements, the structure is a complete binary tree. The number of leaf nodes in a complete binary tree with nodes is given by .Given :
Number of leaves = .The maximum element can be located at any of these leaf positions. Therefore, there are 53 possible values for the index .44
Q44MSQ2 marksEasyThe symbol indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?Think it through. Then check your answer.Question
The symbol indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?Correct answer
(B) (X, Y) arrow (Z, W) implies (X, Y) arrow Z; (C) ((X, Y) arrow Z and W arrow Y) implies (X, W) arrow Z; (D) (X arrow Y and Y arrow Z) implies X arrow Z
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
We evaluate each option based on Armstrong's Axioms and derived rules for functional dependencies:(A) implies
This is FALSE. We cannot simply remove attributes from the determinant (left side) of a functional dependency. For example, if is StudentName and is CourseID, together they might determine Grade (), but StudentName alone does not determine Grade.(B) implies
This is TRUE by the Decomposition Rule. If a set of attributes determines a set of attributes, it determines any subset of those attributes.(C) implies
This is TRUE by the Pseudotransitivity Rule.
Proof:1.W → Y(Given)2.XW → XY(Augmentation of 1 with )3.XY → Z(Given)4.(D) impliesXW → Z(Transitivity on 2 and 3)X → Z
This is TRUE by the Transitivity Rule (one of Armstrong's Axioms).Therefore, options (B), (C), and (D) are correct.45
Q45MSQ2 marksHardLet be a directed graph and a depth first search (DFS) spanning tree in that is rooted at a vertex . Suppose is also a breadth first search (BFS) tree in ,…Think it through. Then check your answer.Question
Let be a directed graph and a depth first search (DFS) spanning tree in that is rooted at a vertex . Suppose is also a breadth first search (BFS) tree in , rooted at . Which of the following statements is/are TRUE for every such graph and tree ?Correct answer
(C) There are no forward-edges in G with respect to the tree T
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let be a spanning tree of rooted at . We are given that is both a DFS tree and a BFS tree.Analysis of Edge Types:1.Forward Edges: A forward edge in a DFS tree connects a node to a descendant that is not its child. This implies that the path from to in the tree has length . Thus, in the tree , the level of is at least .However, is also a BFS tree. A fundamental property of BFS is that for any edge in the graph , the level difference satisfies . If there were a forward edge in , it would require . This contradicts the tree structure requirement that . Therefore, no forward edges can exist.2.Back Edges: A back edge connects a node to an ancestor. For example, a simple cycle yields a tree which is both DFS and BFS, with being a back edge. Thus, statement (A) is false.3.Cross Edges: A cross edge connects two nodes where neither is an ancestor of the other. Consider with edges . If we visit 3 then 2 in DFS, the tree is edges . The edge is a cross edge (from 2 to the already visited 3). This same tree is a valid BFS tree (levels: 1 at 0; 2, 3 at 1). Thus, statement (B) is false.4.Only Tree Edges: Since back and cross edges can exist, statement (D) is false.Conclusion: Only statement (C) is always true.46
Q46MSQ2 marksMediumConsider the following read-write schedule over three transactions , and , where the subscripts in the schedule indicate transaction IDs:…Think it through. Then check your answer.Question
Consider the following read-write schedule over three transactions , and , where the subscripts in the schedule indicate transaction IDs:Which of the following transaction schedules is/are conflict equivalent to ?Correct answer
(B) T₁ T₃ T₂; (C) T₃ T₂ T₁; (D) T₃ T₁ T₂
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To determine which serial schedules are conflict equivalent to , we construct the precedence graph (serialization graph).1. Identify Conflicts:
A conflict exists if two operations belong to different transactions, access the same data item, and at least one of them is a write operation.- Data item : Accessed only by (). No conflicts with other transactions.
- Data item : Accessed only by (). No conflicts with other transactions.
- Data item : Accessed by () and ().
- occurs before : Conflict (Write-Read).
- occurs before : Conflict (Write-Write).
- occurs before : Conflict (Read-Write).
- Nodes:
- Edges:
- has no incoming or outgoing edges (it is isolated).
A serial schedule is conflict equivalent to if it is a topological sort of the precedence graph.- The constraint is must precede .
- can be placed anywhere relative to and .
1. (Option B)2. (Option D)3. (Option C)4. Check Options:- (A) : Here precedes , which violates . Incorrect.
- (B) : precedes . Correct.
- (C) : precedes . Correct.
- (D) : precedes . Correct.
47
Q47MSQ2 marksEasyConsider a Boolean expression given by . Which of the following statements is/are CORRECT?Think it through. Then check your answer.Question
Consider a Boolean expression given by .Which of the following statements is/are CORRECT?Correct answer
(A) F(X, Y, Z) = (0,1,2,4); (B) F(X, Y, Z) = XY + YZ + XZ
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Given the Boolean function in Sum of Minterms (SOP) form:Analysis of Option (A):
The function is defined over 3 variables, so the total minterms range from 0 to 7. The maxterms correspond to the minterms that are not present in the function.
Missing minterms: .
Thus, the Product of Maxterms (POS) form is:This statement is CORRECT.Analysis of Option (B):
Let's simplify the function using the minterms:- ()
- ()
- ()
- ()
- Group :
- Group :
- Group :
This statement is CORRECT.Analysis of Options (C) and (D):
The expression depends on all three variables. For instance:- If , then . The output depends on .
- If , then . The output depends on .
These statements are INCORRECT.48
Q48MSQ2 marksMediumConsider the following C function definition. [code] Which of the following statements is/are TRUE about the above function?Think it through. Then check your answer.Question
Consider the following C function definition.Which of the following statements is/are TRUE about the above function?int f(int x, int y) { for (int i=0; i<y; i++) { x=x+x+y; } return x; }Correct answer
(B) If the inputs are x=20, y=20, then the return value is greater than 2²⁰; (D) If the inputs are x=10, y=20, then the return value is greater than 2²⁰
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The function updates the variable in a loop that iterates times. Let denote the value of after iterations, with being the initial input . The update rule in each iteration is:This is a linear recurrence relation. We can find the general term by observing the first few iterations:- (A) and (C): For , the return value is .
- is much smaller than , so (A) is false.
- is greater than , so (C) is false.
- (B): For , the return value is . Since , (B) is true.
- (D): For , the return value is . Since , (D) is true.
49
Q49MSQ2 marksHardLet be any matrix, where . Which of the following statements is/are TRUE about the system of linear equations ?Think it through. Then check your answer.Question
Let be any matrix, where . Which of the following statements is/are TRUE about the system of linear equations ?Correct answer
(A) There exist at least m - n linearly independent solutions to this system
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
The system is a homogeneous system with equations and variables.1.Analyze Option (A):The set of all solutions to forms the null space (or kernel) of the matrix . The dimension of this space is called the nullity of .
According to the Rank-Nullity Theorem:
Since has rows, the maximum possible rank is . Thus, .
Substituting this inequality:
This means the dimension of the solution space is at least . Therefore, there exist at least linearly independent solutions. Statement (A) is TRUE.2.Analyze Option (B):This statement implies that the dimension of the solution space is exactly (i.e., the solution space is spanned by vectors). This is true only if . However, the problem states is any matrix. If , the nullity would be greater than . Thus, this is not always true. Statement (B) is FALSE.3.Analyze Option (C):This statement claims there is a non-zero solution with at least zeros. This is equivalent to saying there is a non-zero solution with at most non-zero entries (support size ).
Consider the case where and . The equation is . Non-zero solutions are of the form . Every non-zero solution has 2 non-zero entries. We need a solution with at most non-zero entry, which is impossible here. Statement (C) is FALSE.4.Analyze Option (D):This statement claims there is a solution with at least non-zero entries.
Consider and . The equations are . Solutions are of the form . Any solution has at most 1 non-zero entry. We need at least non-zero entries, which is impossible. Statement (D) is FALSE.50
Q50MSQ2 marksMediumConsider the 5-state DFA accepting the language shown below. For any string let be the number of 0's in and be…Think it through. Then check your answer.Question
Consider the 5-state DFA accepting the language shown below. For any string let be the number of 0's in and be the number of 1's in .Which of the following statements is/are FALSE?
Correct answer
(B) States 3 and 4 are distinguishable in M; (C) States 2 and 5 are distinguishable in M
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Reading the DFA. State 1 is the start state and the only final state. From the figure:- state 1:
- states 2 and 5: (state 5 is )
- states 3 and 4: (state 4 is )
- (A) States 2 () and 4 () are distinguishable: the string 1 takes 2 to the final state 1 and 4 to the non-final state 5. The statement is TRUE.
- (B) States 3 and 4 both have , so they are equivalent (from both, 0 leads to state 1 and 1 leads to a state). The statement "3 and 4 are distinguishable" is FALSE.
- (C) States 2 and 5 both have , so they are equivalent. The statement "2 and 5 are distinguishable" is FALSE.
- (D) If then , so ends in state 1 and is accepted. The statement is TRUE.
51
Q51MSQ2 marksMediumThe chromatic number of a graph is the minimum number of colours used in a proper colouring of the graph. Let be any graph with vertices and chromatic number . Which…Think it through. Then check your answer.Question
The chromatic number of a graph is the minimum number of colours used in a proper colouring of the graph. Let be any graph with vertices and chromatic number . Which of the following statements is/are always TRUE?Correct answer
(B) G contains an independent set of size at least n/k; (C) G contains at least k(k-1)/2 edges
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let be the chromatic number of the graph with vertices.(A) False. It is not necessary for a graph with chromatic number to contain a clique of size (a complete subgraph with vertices). For example, Mycielskian graphs can have an arbitrarily high chromatic number but remain triangle-free (clique number ). Another simple example is an odd cycle (), which has but the largest clique is size 2.(B) True. In any proper -colouring, the vertices are partitioned into colour classes , where each is an independent set. Since , by the Pigeonhole Principle, at least one set must have size at least the average size, i.e., . Thus, the independence number .(C) True. In a minimal proper -colouring with colour classes , there must be at least one edge between every pair of colour classes and (). If there were no edges between some and , we could merge them into a single independent set (colour class), thereby colouring the graph with colours, which contradicts . Since there are pairs of colour classes, and edges connecting distinct pairs are distinct, the graph must have at least edges.(D) False. Consider the complete graph . It has vertices and chromatic number . The degree of every vertex in is . Thus, no vertex has a degree of at least .52
Q52MSQ2 marksMediumConsider the operators and defined by , , for positive integers. Which of the following statements is/are TRUE?Think it through. Then check your answer.Question
Consider the operators and defined by , , for positive integers. Which of the following statements is/are TRUE?Correct answer
(B) Operator obeys the associative law; (D) Operator over the operator obeys the distributive law
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Let us analyze each statement:Statement (A): Associativity of
Check if .
LHS:
RHS:
Since generally, is NOT associative.Statement (B): Associativity of
(standard multiplication).
Multiplication of integers is associative: .
Thus, is associative.Statement (C): Distributivity of over
Check if .
LHS:
RHS:
LHS RHS generally. Thus, does NOT distribute over .Statement (D): Distributivity of over
Check if .
LHS:
RHS:
LHS = RHS. Thus, distributes over .Therefore, statements (B) and (D) are TRUE.53
Q53MSQ2 marksMediumConsider two set-associative cache memory architectures: WBC, which uses the write back policy, and WTC, which uses the write through policy. Both of them use the LRU…Think it through. Then check your answer.Question
Consider two set-associative cache memory architectures: WBC, which uses the write back policy, and WTC, which uses the write through policy. Both of them use the LRU (Least Recently Used) block replacement policy. The cache memory is connected to the main memory. Which of the following statements is/are TRUE?Correct answer
(B) A read miss in WTC never triggers a write back operation of a cache block to main memory; (C) A write hit in WBC can modify the value of the dirty bit of a cache block
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Step-by-step analysis of the statements:1.Statement (A): In a Write-Back Cache (WBC), a read miss requires fetching a new block from main memory. If the cache set is full, a block must be evicted based on the LRU policy. If the evicted block is 'dirty' (modified in cache but not in main memory), it must be written back to main memory. Therefore, a read miss can evict a dirty block. Statement (A) is FALSE.2.Statement (B): In a Write-Through Cache (WTC), every write operation updates both the cache and the main memory simultaneously. Consequently, no block in the cache is ever 'dirty' relative to main memory. When a read miss occurs and a block is evicted, there is no need to write it back. Thus, a read miss in WTC never triggers a write-back. Statement (B) is TRUE.3.Statement (C): In WBC, a 'dirty bit' is associated with each cache block to track modifications. When a block is first loaded from memory, its dirty bit is . Upon the first write hit to that block, the dirty bit is changed (modified) to . Since the statement says it 'can modify', it is correct. Statement (C) is TRUE.4.Statement (D): As established for WTC, there are no dirty blocks. Therefore, there is no 'victim' block that needs to be written back to main memory during a miss (read or write). The missed block is simply fetched and loaded. Statement (D) is FALSE.Conclusion: Statements (B) and (C) are correct.54
Q54NAT2 marksMediumConsider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per track and each sector holds 1024 bytes of data. The number of cylinders in the hard disk is…Think it through. Then check your answer.Question
Consider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per track and each sector holds 1024 bytes of data. The number of cylinders in the hard disk is _________Correct answer
4096 to 4096
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the number of cylinders, we use the standard disk geometry formula:Given values:- Total Capacity = 512 GB = bytes = bytes
- Number of Surfaces = 32 =
- Sectors per Track = 4096 =
- Bytes per Sector = 1024 =
55
Q55NAT2 marksMediumThe baseline execution time of a program on a 2 GHz single core machine is 100 nanoseconds (ns). The code corresponding to 90% of the execution time can be fully parallelized. The…Think it through. Then check your answer.Question
The baseline execution time of a program on a 2 GHz single core machine is 100 nanoseconds (ns). The code corresponding to 90% of the execution time can be fully parallelized. The overhead for using an additional core is 10 ns when running on a multicore system. Assume that all cores in the multicore system run their share of the parallelized code for an equal amount of time. The number of cores that minimize the execution time of the program 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 number of cores that minimize the execution time, we define the total execution time as a function of the number of cores .1.Identify Sequential and Parallel Components:- Total baseline time ns.
- Parallelizable part ns.
- Sequential part ns.
- When using cores, the parallel part is divided by .
- The overhead for using an additional core is 10 ns. For cores, there are additional cores, so the total overhead is ns.
- To find the minimum, take the derivative with respect to and set it to zero:
4.Verification with Discrete Values:- ns (Baseline)
- ns
- ns
- ns
56
Q56NAT2 marksMediumA given program has 25% load/store instructions. Suppose the ideal CPI (cycles per instruction) without any memory stalls is 2. The program exhibits 2% miss rate on instruction…Think it through. Then check your answer.Question
A given program has 25% load/store instructions. Suppose the ideal CPI (cycles per instruction) without any memory stalls is 2. The program exhibits 2% miss rate on instruction cache and 8% miss rate on data cache. The miss penalty is 100 cycles. The speedup (rounded off to two decimal places) achieved with a perfect cache (i.e., with NO data or instruction cache misses) 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 calculate the speedup achieved with a perfect cache, we compare the execution time (or CPI) of the program with the actual cache to the execution time with a perfect cache.1. Identify Given Parameters:- Ideal CPI () = 2
- Percentage of load/store instructions = 25% = 0.25
- Instruction cache miss rate () = 2% = 0.02
- Data cache miss rate () = 8% = 0.08
- Miss penalty () = 100 cycles
- Instruction Fetch Stalls: Every instruction requires a fetch from the instruction cache.
- Data Access Stalls: Only load/store instructions access the data cache.
- Total Stalls per Instruction:
A perfect cache has a 0% miss rate, meaning there are no memory stalls.5. Calculate Speedup:The speedup achieved with a perfect cache is 3.00.57
Q57NAT2 marksHardConsider the following code snippet using thefork()andwait()system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully…Think it through. Then check your answer.Question
Consider the following code snippet using thefork()andwait()system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors.The total number of times theint x = 3; while(x > 0) { fork(); printf("hello"); wait(NULL); x--; }printfstatement is executed is _______Correct answer
14 to 14
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In each iteration of thewhileloop, thefork()system call is executed, which doubles the number of processes. After the fork, both the parent and the child process execute theprintf("hello")statement.Let be the number of processes at the start of iteration .- Iteration 1 (): . After
fork(), there are processes. Both print "hello". Total prints in this iteration = . - Iteration 2 (): . After
fork(), there are processes. All print "hello". Total prints in this iteration = . - Iteration 3 (): . After
fork(), there are processes. All print "hello". Total prints in this iteration = .
printfis executed = .Note: Thewait(NULL)call in the child process returns immediately (as it has no children), while in the parent process, it waits for the child to finish. This affects the order of execution but does not change the total count ofprintfcalls.- Iteration 1 (): . After
58
Q58NAT2 marksMediumConsider the entries shown below in the forwarding table of an IP router. Each entry consists of an IP prefix and the corresponding next hop router for packets whose destination…Think it through. Then check your answer.Question
Consider the entries shown below in the forwarding table of an IP router. Each entry consists of an IP prefix and the corresponding next hop router for packets whose destination IP address matches the prefix. The notation “/N” in a prefix indicates a subnet mask with the most significant bits set to 1.This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are 10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205 . The number of packets forwarded via the next hop router R2 is _______Prefix Next hop router 10.1.1.0/24 R1 10.1.1.128/25 R2 10.1.1.64/26 R3 10.1.1.192/26 R4 Correct answer
40 to 40
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To determine the next hop router for each destination IP address, we apply the Longest Prefix Match (LPM) rule. First, let's define the address ranges for each prefix in the forwarding table:- 10.1.1.0/24: Addresses from 10.1.1.0 to 10.1.1.255 (Next hop: R1)
- 10.1.1.128/25: Addresses from 10.1.1.128 to 10.1.1.255 (Next hop: R2)
- 10.1.1.64/26: Addresses from 10.1.1.64 to 10.1.1.127 (Next hop: R3)
- 10.1.1.192/26: Addresses from 10.1.1.192 to 10.1.1.255 (Next hop: R4)
1.10.1.1.16: Matches only 10.1.1.0/24. Best Match: R1.2.10.1.1.72: Matches 10.1.1.0/24 and 10.1.1.64/26. The longest prefix is /26. Best Match: R3.3.10.1.1.132: Matches 10.1.1.0/24 and 10.1.1.128/25. The longest prefix is /25. Best Match: R2.4.10.1.1.191: Matches 10.1.1.0/24 and 10.1.1.128/25. (Note: 191 in binary is , while the /26 prefix 192 is , so it does not match R4). The longest prefix is /25. Best Match: R2.5.10.1.1.205: Matches 10.1.1.0/24, 10.1.1.128/25, and 10.1.1.192/26. The longest prefix is /26. Best Match: R4.The hosts whose packets are routed to R2 are 10.1.1.132 and 10.1.1.191.
Since there are 20 packets for each host, the total number of packets forwarded to R2 is:59
Q59NAT2 marksMediumLet be a context-free grammar in Chomsky Normal Form with and containing 10 variable symbols including the start symbol . The…Think it through. Then check your answer.Question
Let be a context-free grammar in Chomsky Normal Form with and containing 10 variable symbols including the start symbol . The string is derivable from . The number of steps (application of rules) in the derivation is _________Correct answer
179 to 179
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In a Context-Free Grammar (CFG) in Chomsky Normal Form (CNF), every production is of the formA → BCor , where and .To derive a string of length :1.We need applications of rules of the formA → BCto generate a sentential form with variables. Starting from the start symbol (1 variable), each such rule application increases the number of variables by exactly 1. Thus, to reach variables, we need steps.2.We need applications of rules of the form to replace each of the variables with a terminal symbol from .Total number of steps = .Given the string , its length .Number of steps = .Note: The total number of variables in (which is 10) is irrelevant to the number of steps in the derivation of a specific string.60
Q60NAT2 marksEasyThe number of edges present in the forest generated by the DFS traversal of an undirected graph with 100 vertices is 40. The number of connected components in is _________Think it through. Then check your answer.Question
The number of edges present in the forest generated by the DFS traversal of an undirected graph with 100 vertices is 40. The number of connected components in is _________Correct answer
60 to 60
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
In an undirected graph with vertices and connected components, any spanning forest (including one generated by DFS) will have exactly edges.Given:- Number of vertices () = 100
- Number of edges in the DFS forest = 40
Using the formula for the number of edges in a forest:Therefore, the number of connected components in is 60.61
Q61NAT2 marksMediumConsider the following two regular expressions over the alphabet : The total number of strings of length less than or equal to 5,…Think it through. Then check your answer.Question
Consider the following two regular expressions over the alphabet :The total number of strings of length less than or equal to 5, which are neither in nor in , is _________Correct answer
44 to 44
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
To find the number of strings of length that are neither in nor in , we first identify the strings in for each length .1.Regular Expression :Strings in are of the form or .- : (1 string)
- : (2 strings)
- : (2 strings)
- : (2 strings)
- : (2 strings)
- : (2 strings)
Strings in are of the form or .- : None (0 strings)
- : (2 strings)
- : (2 strings)
- : (2 strings)
- : (2 strings)
- : (2 strings)
- : (1 string)
- : (2 strings)
- : (4 strings)
- : (4 strings)
- : (4 strings)
- : (4 strings)
4.Total strings of length over :Total = .5.Strings neither in nor in :Count = Total - .62
Q62NAT2 marksEasyConsider a memory management system that uses a page size of . Assume that both the physical and virtual addresses start from . Assume that the pages …Think it through. Then check your answer.Question
Consider a memory management system that uses a page size of . Assume that both the physical and virtual addresses start from . Assume that the pages and are stored in the page frames and respectively. The physical address (in decimal format) corresponding to the virtual address (in decimal format) is _________Correct answer
6596 to 6596
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.Determine Page Size in bytes:Page size = .2.Find the Page Number () and Offset () for the given Virtual Address ():
3.Map the Page Number to the Frame Number ():According to the given mapping:- Page Frame
- Page Frame
- Page Frame
- Page Frame
4.Calculate the Physical Address ():
.Therefore, the physical address is .63
Q63NAT2 marksEasyA bag contains 10 red balls and 15 blue balls. Two balls are drawn randomly without replacement. Given that the first ball drawn is red, the probability (*rounded off to 3 decimal…Think it through. Then check your answer.Question
A bag contains 10 red balls and 15 blue balls. Two balls are drawn randomly without replacement. Given that the first ball drawn is red, the probability (rounded off to 3 decimal places) that both balls drawn are red is _________Correct answer
0.37 to 0.38
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
Total number of red balls = 10
Total number of blue balls = 15
Total number of balls = 10 + 15 = 25Let be the event that the first ball drawn is red, and be the event that the second ball drawn is red.
The question asks for the probability that both balls are red given that the first ball is red. This is expressed as the conditional probability .By the definition of conditional probability:Using the multiplication rule, . Substituting this back:Since the balls are drawn without replacement, if the first ball is red, there are red balls remaining out of a total of balls.Thus, the probability is 0.375.64
Q64NAT2 marksMediumConsider a digital logic circuit consisting of three 2-to-1 multiplexers M1, M2, and M3 as shown below. and are inputs of M1. and are inputs of M2. …Think it through. Then check your answer.Question
Consider a digital logic circuit consisting of three 2-to-1 multiplexers M1, M2, and M3 as shown below. and are inputs of M1. and are inputs of M2. and are select lines of M1, M2, and M3, respectively.For an instance of inputs and , the number of combinations of that give the output 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 combinations of that result in , we analyze the logic of the multiplexers given the specific inputs:1.Multiplexer M1:The output is given by the expression for a 2-to-1 MUX: .
Given and :
.
Thus, is always , regardless of the value of the select line .2.Multiplexer M2:The output is given by: .
Given and :
.
Thus, is always , regardless of the value of the select line .3.Multiplexer M3:The final output is given by: .
Substituting the values of and obtained above:
.4.Condition for :We require the output . From the expression , this implies , which means .5.Counting the combinations of :- The select line can be either or ( possible values).
- The select line can be either or ( possible values).
- The select line must be ( possible value).
Total combinations = . The specific combinations are and .65
Q65NAT2 marksHardConsider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a router between them. The first…Think it through. Then check your answer.Question
Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a router between them. The first link (sender to router) has an MTU (Maximum Transmission Unit) size of 542 bytes, while the second link (router to receiver) has an MTU size of 360 bytes. The number of fragments that would be delivered at the receiver is _________Correct answer
6 to 6
Turn this into a strength.Explore AI-powered practice and doubt support with Success Tracker.Step-by-step solution
1.Original Datagram:- Total size = 1420 bytes
- IP Header = 20 bytes
- Data Payload = bytes
- Maximum IP packet size = 542 bytes
- Maximum data payload per fragment = bytes
- Since the Fragment Offset field is in units of 8 bytes, the data length in all but the last fragment must be a multiple of 8.
- Largest multiple of 8 is ().
- Fragments generated:
- Fragment 1: Data = 520 bytes, Total size = 540 bytes
- Fragment 2: Data = 520 bytes, Total size = 540 bytes
- Fragment 3: Data = bytes, Total size = 380 bytes
- Maximum IP packet size = 360 bytes
- Maximum data payload per fragment = bytes
- Largest multiple of 8 is ().
- Each fragment from Link 1 is checked against the new MTU:
- Fragment 1 (520 bytes data): Needs fragmentation. . (2 fragments)
- Fragment 2 (520 bytes data): Needs fragmentation. . (2 fragments)
- Fragment 3 (360 bytes data): Needs fragmentation (since total size 380 > 360). . (2 fragments)
- Total = fragments.