ISRO Scientist/Engineer Computer Science 2023 paper: Part A, questions 41 to 60, solved
Questions 41 to 60 of the ISRO Scientist/Engineer 'SC' Computer Science written test of 7 Jan 2024 (Set A): 20 questions, each solved by Skill-Lync. ISRO never published an answer key for this test, so every answer was worked out three times independently and the disagreements were settled before publishing.
Question paper published by ISRO's Centralised Recruitment Board; answers and solutions by Skill-Lync (no official key exists) · Updated 19 Nov 2026 · 20 of 80 questions on this page
Determinant of a given 4 by 4 matrix: zero, negative or indeterminate
- (a) is indeterminate
- (b) is negative
- (c)
- (d)None of the above
Answer: (c) Skill-Lync answer; ISRO published no key
Look at rows 1 and 3. Row 3 is and row 1 is , so row 3 row 1. Two rows that are proportional make the rows linearly dependent, so the determinant is zero.
A row of zeros gives . Direct cofactor expansion also gives . A determinant of a numeric square matrix always has a definite value, so (a) is wrong, and (b) is wrong because the value is not negative.
A zero determinant signals a rank-deficient (singular) system, for example redundant sensors in an attitude-estimation problem, where the equations cannot be solved uniquely.
Degree sum, eccentricity, girth and multigraph statements
- In a graph G with 'n' vertices and 'e' edges, sum of degrees of vertices = 2*e
- Eccentricity of a connected graph can never be equal to the radius of the graph
- Girth of a graph is the total number of edges in the shortest cycle of the graph
- Graph with equal degree for all vertices is multigraph
- (a)(i), (ii), (iii)
- (b)(ii), (iii), (iv)
- (c)(i), (iii), (iv)
- (d)None of the above
Answer: (d) None of the above Skill-Lync answer; ISRO published no key
(i) Handshaking lemma: every edge adds 1 to the degree of each of its two ends, so . True.
(ii) The radius is the smallest vertex eccentricity, so some vertex (a centre) always has eccentricity equal to the radius. On the path the middle vertex has eccentricity 1, which is the radius. So the statement is false. (Eccentricity is a property of a vertex, so the wording is loose, but on any reading it is not 'never equal'.)
(iii) Girth is the length, counted in edges, of the shortest cycle. True.
(iv) A graph where all vertices have the same degree is a regular graph. A triangle is regular and has no parallel edges, so it is not a multigraph. False.
The true statements are exactly (i) and (iii). No option lists that pair: (a) wrongly adds (ii), (c) wrongly adds (iv), and (b) has (ii) and (iv).
None of the above
Degree counts, eccentricity and girth are used when analysing network topologies, for example checking how many hops a message needs between nodes on an onboard data bus or a ground network.
Number of edges of a planar graph with 5 faces and 9 vertices
- (a)14
- (b)16
- (c)12
- (d)None of the above
Answer: (c) 12 Skill-Lync answer; ISRO published no key
For a connected planar graph Euler's formula gives , where counts all faces including the outer one.
Option (a), 14, comes from with a wrong constant, and (b), 16, from forgetting to subtract. The question does not say the graph is connected, but the intended reading is the connected case.
12
Euler's formula is used to sanity-check mesh data in CAD and finite-element models, where vertices, edges and faces of a closed surface must satisfy it.
Probability of not getting a white ball from 6 blue, 5 white, 4 yellow
- (a)
- (b)
- (c)
- (d)None of the above
Answer: (a) Skill-Lync answer; ISRO published no key
Total balls . White balls , so
Option (b) is the probability of drawing a white ball, which is the opposite event.
The complement rule, , is used in reliability work to turn a failure probability into a mission-success probability.
Complexity of multiplying an m by n matrix with an n by p matrix
- (a)
- (b)
- (c)
- (d)
Answer: (d) Skill-Lync answer; ISRO published no key
The product is an matrix. Each of its entries is a dot product of a row of and a column of , which takes multiplications and additions.
Three nested loops over , , run the body exactly times (for example ). Option (a) counts only the number of output entries, and (b) and (c) square one of the dimensions for no reason. For square matrices this is the familiar .
Matrix products dominate attitude filters, image processing and neural-network inference, so knowing the exact cost helps decide what fits in an onboard processor's time budget.
Number of sub-strings of all lengths of a string of length m
- (a)
- (b)
- (c)
- (d)
Answer: (c) Skill-Lync answer; ISRO published no key
A substring is a contiguous piece, fixed by its start position and its length. For length there are choices of start, with .
For this is 21. Counted by position, the answer is non-empty substrings (the empty string would add one more, and repeated letters make some substrings equal, so the count is the maximum number of distinct ones).
Counting substrings underlies string-matching and log-search tools, and tells you why naive all-substring approaches grow quadratically with input size.
Number of rows of a truth table with n variables
- (a)
- (b)
- (c)
- (d)None of the above
Answer: (c) Skill-Lync answer; ISRO published no key
Each variable can be 0 or 1, independently of the others. By the multiplication rule the number of input combinations is
For that is 8 rows, not or . The option printed as (the superscript is visible in the paper image) is the one that matches.
The growth is why exhaustive truth-table checks are used only for small blocks, and why large circuits are verified with SAT solvers and equivalence-checking tools instead.
Multithreading model followed in Linux
- (a)One User Thread mapping to One Kernel Thread
- (b)Many User Threads mapping to One Kernel Thread
- (c)One User Thread mapping to Many Kernel Threads
- (d)Many User Threads mapping to Many Kernel Threads
Answer: (a) One User Thread mapping to One Kernel Thread Skill-Lync answer; ISRO published no key
Linux creates a thread with the clone() system call. Each user thread (for example from the POSIX threads library) gets its own kernel task, so the model is one-to-one.
The other models: many-to-one (b) puts all user threads on one kernel thread, so one blocking call stalls everything and there is no multi-core use; one-to-many (c) is not a standard model; many-to-many (d) multiplexes user threads over a pool of kernel threads, as in some older Solaris versions, and is not what Linux does.
One-to-one lets the kernel schedule threads on different cores and lets one thread block without blocking the others.
One User Thread mapping to One Kernel Thread
The one-to-one model is why Linux-based ground software and onboard Linux systems can run threads on separate cores and why a blocking I/O call in one thread does not freeze the rest.
Purpose of the priority inheritance protocol in synchronisation
- (a)To prevent priority inversion in systems having two or lesser priorities for a resource
- (b)To provide mutual exclusion between threads and prevent data corruption
- (c)To prevent priority inversion and ensure fairness in resource allocation
- (d)To allow multiple threads to access any resource simultaneously
Answer: (c) To prevent priority inversion and ensure fairness in resource allocation Skill-Lync answer; ISRO published no key
Priority inversion happens when a high-priority task H waits for a lock held by a low-priority task L, and a medium-priority task M keeps preempting L. H is then stuck behind M, which inverts the intended order, and the delay has no upper bound.
Priority inheritance fixes this: while L holds a lock that H wants, L temporarily runs at H's priority. M can no longer preempt it, L finishes its critical section quickly, releases the lock, and drops back. In a three-task run with H needing 2 ticks, L holding the lock for 3 ticks and M running 6 ticks, H finishes at tick 5 with inheritance and at tick 11 without it.
Option (b) describes what a mutex does, not what inheritance adds on top. Option (d) is the opposite of locking. Option (a) is too narrow: the problem and the fix exist for any number of priority levels, not only two. Option (c) is the closest statement, because the protocol removes unbounded priority inversion and, as a side effect, keeps resource waiting times predictable. Strictly, inheritance guarantees bounded blocking, not fairness, so the wording is loose.
To prevent priority inversion and ensure fairness in resource allocation
Note on this question Options (a) and (c) both mention preventing priority inversion. (a) wrongly limits the protocol to systems with two or fewer priorities, and (c) adds fairness, which inheritance does not strictly guarantee. (c) is the better fit; the question is loosely worded.
Real-time kernels used on flight computers and in robotics (VxWorks, RTEMS, Linux PREEMPT_RT) offer priority inheritance on mutexes because an unbounded inversion once stalled the Mars Pathfinder lander until it was fixed remotely.
Who assigns segment numbers to code and data segments in segmentation
- (a)Compiler
- (b)Assembler
- (c)Loader
- (d)Linker
Answer: (c) Loader Skill-Lync answer; ISRO published no key
In a segmented system the logical address is a pair (segment number, offset). A program is naturally made of pieces such as code, global data, stack and library routines.
The compiler (and assembler) only produce those pieces as named parts of the object file. The linker joins object files and resolves symbol references. The step that places the program in memory is the loader: it takes all the segments and assigns each one a segment number (an entry in the segment table).
The standard operating-systems text puts it exactly this way, so the loader is the answer. The linker is the tempting wrong choice, since it also deals with segments, but it works with names, not run-time segment numbers.
Loader
Every executable format (ELF, PE) is loaded this way: the loader maps the code and data segments into the address space and sets up the tables that the hardware uses to translate addresses.
Which statement about interrupts is false
- (a)Interrupts can be triggered by a hardware or by a software
- (b)Hardware interrupts may be triggered by sending a signal to CPU through a system bus
- (c)Software interrupts may be triggered by executing system calls
- (d)Trap is a hardware generated interrupt
Answer: (d) Trap is a hardware generated interrupt Skill-Lync answer; ISRO published no key
Check each statement:
- (a) true: a device raises a hardware interrupt, and an instruction such as
intorsyscallraises a software one. - (b) true: a device asserts an interrupt line or sends a message over the bus to the CPU.
- (c) true: a system call is implemented with a software interrupt or trap instruction.
- (d) false: in the standard definition a trap (or exception) is a software-generated interrupt, caused by an error such as division by zero or by a system-call request, not by an external device.
So the false statement is (d).
Trap is a hardware generated interrupt
Telling traps (synchronous, caused by the running instruction) from hardware interrupts (asynchronous, from devices) is basic to writing drivers, debuggers and real-time interrupt handlers.
Matching long, medium and short term schedulers with their activities
| Process Scheduler type | Activity | ||
|---|---|---|---|
| (i) | Long term scheduler | (P) | executes much faster to reduce wastage of CPU time |
| (ii) | Medium term scheduler | (Q) | controls degree of multiprogramming |
| (iii) | Short Term Scheduler | (R) | is associated with swapping |
With respect to Process Schedulers of an operating system mentioned above in the table, which of the following statements is correct?
- (a)(i) - (R), (ii) - (P), (iii) - (Q)
- (b)(i) - (Q), (ii) - (R), (iii) - (P)
- (c)(i) - (P), (ii) - (R), (iii) - (Q)
- (d)(i) - (R), (ii) - (Q), (iii) - (P)
Answer: (b) (i) - (Q), (ii) - (R), (iii) - (P) Skill-Lync answer; ISRO published no key
Take each scheduler in turn.
- Long term (job) scheduler: decides which jobs are admitted into memory, so it controls the degree of multiprogramming. That is (i) with (Q).
- Medium term scheduler: swaps processes out of memory and back in to reduce the load, so it is associated with swapping. That is (ii) with (R).
- Short term (CPU) scheduler: runs every few milliseconds, so it must execute very fast or the CPU time spent scheduling would itself be wasted. That is (iii) with (P).
The matching (i)-(Q), (ii)-(R), (iii)-(P) appears only in option (b). Options (a) and (d) pair the long term scheduler with swapping, and (c) pairs it with speed, which belongs to the short term scheduler.
(i) - (Q), (ii) - (R), (iii) - (P)
Modern kernels mostly have only the short term scheduler; the long and medium term roles survive as admission control in batch and cluster systems and as swapping or memory-pressure handling.
Synchronisation primitive that makes the consumer wait on an empty buffer
- (a)Spinlock
- (b)Mutex lock
- (c)Semaphore
- (d)Monitors
Answer: (c) Semaphore Skill-Lync answer; ISRO published no key
The bounded buffer needs two kinds of coordination: mutual exclusion on the buffer itself, and counting how many slots are full or empty.
The classic solution uses counting semaphores: full starts at 0 and empty at N. The consumer does wait(full) first. When the buffer is empty full is 0, so the consumer blocks until the producer does signal(full) after inserting an item.
A mutex has an owner and only gives mutual exclusion, so it cannot be released by a different thread to say that an item is ready. A spinlock also gives only exclusion and wastes CPU in busy waiting. A monitor with condition variables can express the wait, but it is a language-level construct built on these primitives; the standard answer for this textbook problem is the semaphore.
Semaphore
Work queues between threads, from log writers to telemetry pipelines, are bounded buffers guarded by counting semaphores or condition variables so that a fast producer blocks rather than exhausts memory.
Result of a process accessing memory allocated to the OS or another process
- (a)Trap to OS
- (b)Context Switching
- (c)Page fault
- (d)Invocation to Scheduler Despatch
Answer: (a) Trap to OS Skill-Lync answer; ISRO published no key
Memory protection hardware (base and limit registers, or page-table permission and valid bits) checks every address a user process generates. If the address lies outside the process's own space, the hardware does not complete the access. It raises an addressing-error trap that transfers control to the operating system.
The OS then normally terminates the process (a segmentation fault or access violation message), possibly dumping its memory for debugging.
A page fault is different: it happens for an address that is valid for the process but whose page is not currently in RAM, and the OS fixes it by loading the page. Context switching and scheduler dispatch are scheduling actions that may follow later, but they are not the direct result of the illegal access.
Trap to OS
Note on this question A protection violation is reported by the hardware as a trap (fault) to the OS, which usually kills the process (segmentation fault). Some systems report it through the same fault mechanism as a page fault, so (c) can be argued, but a page fault means a legitimate page is merely not in RAM.
This hardware-enforced isolation is why one crashing application cannot corrupt another, and it is the basis of memory-safety protections in operating systems and flight software with partitioned memory.
Regular expression for the language accepted by a three-state DFA
Which of the following regular expressions defines the language accepted by the DFA?
- (a)
- (b)
- (c)
- (d)
Answer: (a) Skill-Lync answer; ISRO published no key
Read the transitions from the figure: from the start state, leads to the final state and leads to the trap state. From the final state, loops back to itself and leads to the trap. The trap state loops on both symbols, so once there the string can never be accepted.
So an accepted string must start with exactly one , followed by any number of (the loop), and nothing else: an after that would fall into the trap. That is the language .
Checking the options against the machine on every string up to length 9: wrongly accepts the empty string and (the start state is not final), wrongly accepts the empty string and rejects , and rejects although the machine accepts it.
Lexical analysers turn patterns like this into DFAs with an implicit trap state, so that tokens such as identifiers or numbers are matched in one pass over the input.
Number of states in the minimal DFA for a three-state NFA
The number of states in the MINIMAL Deterministic Finite-State Automaton (DFA) for this language is:
- (a)
- (b)
- (c)
- (d)
Answer: (b) Skill-Lync answer; ISRO published no key
The NFA keeps looping on in its start state, then on a it may jump to the middle state, and one more symbol takes it to the final state. A string is accepted exactly when its second symbol from the end is , which is .
Subset construction from reaches 4 subsets: , , and . The last two are final. Their moves are:
, ; , ; , ; , .
No two of these four states are equivalent: they remember the last two symbols (, , , ), and each pair is separated by some suffix. So the DFA cannot be reduced below 4 states. In general, 'the -th symbol from the end' needs states, here .
This is the textbook example of the exponential cost of determinising an NFA, which matters when regex engines choose between NFA simulation and DFA compilation.
Language generated by S -> aSb | T, T -> bT | b
- (a)
- (b)
- (c)
- (d)
Answer: (a) Skill-Lync answer; ISRO published no key
generates one or more : with . wraps with matching pairs: and then . So every string is
That is with , and is allowed because directly gives . Hence (option a). Enumerating all strings of the grammar up to length 14 and comparing confirms it.
Option (b) wrongly excludes (the string is generated). Option (c) has the inequality backwards, and option (d) needs , but at least one extra is always forced by .
Reading off the language of a grammar by counting what each rule adds is how parser writers check that a grammar accepts exactly the inputs a language specification allows.
Which statement about recursive and recursively enumerable languages is not true
- (a)If a language is recursive its complement is recursive
- (b)If a language is recursive its complement is recursively enumerable
- (c)If a language and its complement are recursively enumerable it is recursive
- (d)If a language is recursively enumerable its complement is also recursively enumerable
Answer: (d) If a language is recursively enumerable its complement is also recursively enumerable Skill-Lync answer; ISRO published no key
Check each claim against the standard closure facts.
- (a) true: if a Turing machine always halts and decides , swap its accept and reject answers to decide .
- (b) true: a recursive language is recursively enumerable, and by (a) its complement is recursive, hence also r.e.
- (c) true: run the two recognisers in parallel; exactly one must accept, so the combined machine always halts and decides .
- (d) false: r.e. languages are not closed under complement. The halting problem is r.e., but its complement is not, because otherwise (c) would make halting decidable.
If a language is recursively enumerable its complement is also recursively enumerable
This asymmetry is why static analysers can reliably prove that a bug exists in some cases but can never be a complete decision procedure for every program property.
Which closure statement about regular and context-free languages is false
- (a)The intersection of a regular language and a context-free language is context-free
- (b)The intersection of a regular language and context-free language is regular
- (c)The union of two context-free languages is context-free
- (d)The union of two regular languages is regular
Answer: (b) The intersection of a regular language and context-free language is regular Skill-Lync answer; ISRO published no key
(a) is true: run a pushdown automaton for the CFL and a DFA for the regular language side by side; the product is still a pushdown automaton.
(c) is true: for grammars with start symbols and add the rule . (d) is true: regular languages are closed under all the usual set operations.
(b) is false. Take the regular language and the context-free language . Their intersection is itself, which is context-free but not regular (a finite automaton cannot count ). So the intersection is only guaranteed to be context-free, not regular.
The intersection of a regular language and context-free language is regular
Intersection with a regular language is used in parsing and in program analysis to restrict a context-free model (for example, valid call-return sequences) to a pattern of interest.
True statement about L(G) for S -> aaSb | T, T -> Tb | a
- (a)aabbaabb belongs to L(G) but aabb does not
- (b)aaaaabbb belongs to L(G) but aaaabb does not
- (c)aaaabb belongs to L(G) but aabbaabb does not
- (d)aaabb belongs to L(G) but aaaaabbb does not
Answer: (b) aaaaabbb belongs to L(G) but aaaabb does not Skill-Lync answer; ISRO published no key
(). Each use of adds two on the left and one on the right. So every string has the form
The number of is always odd, and the number of is at least . Test each option:
- (a) aabbaabb has an after a , so it is not in L(G): the claim is false.
- (b) aaaaabbb: gives , and gives , so it is in L(G). aaaabb has four (even), so it is not. The claim is true.
- (c) aaaabb has an even number of , so it is not in L(G): false.
- (d) aaaaabbb is in L(G), so 'does not' is false.
Enumerating the grammar up to length 16 agrees with this form.
aaaaabbb belongs to L(G) but aaaabb does not
Working out the exact language of a grammar rule by rule is how you catch a parser that accepts inputs the specification forbids, a common source of protocol-parsing bugs.