GATE 2025 (Session 1)
65 questions
MCQ 30 · MSQ 13 · NAT 221-mark 30 · 2-mark 35
Questions 16–20 of 65
Identify the ONE CORRECT matching between the OSI layers and their corresponding functionalities as shown.
Answer: (B)
Match each OSI layer with its main function:
- The Network layer does (I) packet routing across the network. It also covers host-to-host addressing and forwarding decisions.
- The Transport layer gives (III) host-to-host communication. This means end-to-end delivery between the processes or hosts that are talking.
- The Data link layer does (II) framing and error handling. It puts bits into frames and finds or fixes transmission errors on a single link.
Answer: (a)-(I), (b)-(III), (c)-(II)
- The Network layer does (I) packet routing across the network. It also covers host-to-host addressing and forwarding decisions.
- The Transport layer gives (III) host-to-host communication. This means end-to-end delivery between the processes or hosts that are talking.
- The Data link layer does (II) framing and error handling. It puts bits into frames and finds or fixes transmission errors on a single link.
Answer: (a)-(I), (b)-(III), (c)-(II)
is a function from to , is a function from to , and their composition defined as is a mapping from to .
If and are onto (surjective) functions, which ONE of the following is TRUE about the function ?
If and are onto (surjective) functions, which ONE of the following is TRUE about the function ?
Answer: (D)
We are given that is onto (B→C) and the composite is onto (A→C). We must find what this says about (A→B).
Think of it this way: by itself is already onto . So every element of has some preimage in , whatever does. The fact that is also onto only tells us that the image of covers enough of to reach all the useful preimages of . But does not need to be onto all of . Some elements of can lie outside the range of , as long as still reaches every element of through the part of the range that does cover. Also, does not need to be one-to-one, because many elements of can map to the same element of .
A simple counterexample shows this. Take , , , and onto (it sends both elements of to ). Let map every element of to . Then is not onto (it misses ) and not one-to-one (), yet is onto .
Answer: (D)
Think of it this way: by itself is already onto . So every element of has some preimage in , whatever does. The fact that is also onto only tells us that the image of covers enough of to reach all the useful preimages of . But does not need to be onto all of . Some elements of can lie outside the range of , as long as still reaches every element of through the part of the range that does cover. Also, does not need to be one-to-one, because many elements of can map to the same element of .
A simple counterexample shows this. Take , , , and onto (it sends both elements of to ). Let map every element of to . Then is not onto (it misses ) and not one-to-one (), yet is onto .
Answer: (D)
Let be any undirected graph with positive edge weights, and be a minimum spanning tree of . For any two vertices, and , let and be the shortest distances between and in and , respectively. Which ONE of the options is CORRECT for all possible , , , and ?
Answer: (B)
is a subgraph of . It uses only some of the edges of . So any path inside between and is also a valid path in , with exactly the same total weight. This means the shortest path in can never be longer than the shortest path in . has more routes to choose from (all the edges of , and possibly more), so it can only match or beat the best distance in .
So always holds. Equality is common but not guaranteed, because a shortcut through a non-tree edge in can make strictly smaller.
Answer:
So always holds. Equality is common but not guaranteed, because a shortcut through a non-tree edge in can make strictly smaller.
Answer:
Consider the following context-free grammar , where , , and are the variables (non-terminals), and are the terminal symbols, is the start variable, and the rules of are described as:
Which ONE of the languages is accepted by ?
Which ONE of the languages is accepted by ?
Answer: (A)
The rule produces only the strings , where (that is, one or more symbols). In the same way, the rule produces the strings , where .
So:
- gives followed by (). This is the set .
- gives () followed by . This is the set .
The language is the union of these two sets.
Answer:
So:
- gives followed by (). This is the set .
- gives () followed by . This is the set .
The language is the union of these two sets.
Answer:
Consider the following recurrence relation:
Which ONE of the following options is CORRECT?
Which ONE of the following options is CORRECT?
Answer: (A)
Start with the recurrence .
Put in and we get:
Now divide both sides by and we get .
Expand this simple recurrence step by step: .
So we get .
Answer:
Put in and we get:
Now divide both sides by and we get .
Expand this simple recurrence step by step: .
So we get .
Answer: