0% found this document useful (0 votes)
78 views5 pages

UGC NET CS Preparation Notes: Key Concepts

Uploaded by

RP TV
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views5 pages

UGC NET CS Preparation Notes: Key Concepts

Uploaded by

RP TV
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UGC NET Computer Science - Preparation Notes (Set

A) - Q&A;
Q1. What topics in discrete mathematics are essential for UGC NET CS?

A1. Sets, relations, functions, combinatorics, graph theory, and logic form the discrete math core for UGC
NET.

Q2. Define time complexity and give common classes.

A2. Time complexity measures algorithm steps; common classes: O(1), O(log n), O(n), O(n log n),
O(n^2), O(2^n).

Q3. What is the Master Theorem used for?

A3. To determine time complexity of divide-and-conquer recurrences like T(n)=aT(n/b)+f(n).

Q4. Explain difference between deterministic and nondeterministic finite automata.

A4. DFA has one transition per symbol; NFA may have multiple or epsilon transitions but equivalent in
language recognition.

Q5. Describe properties of context-free grammars.

A5. CFGs generate context-free languages and are parsed using pushdown automata; useful for
programming language syntax.

Q6. What is hashing and collision resolution strategies?

A6. Hashing maps keys to indices; collisions handled by chaining, open addressing (linear, quadratic
probing), or double hashing.
Q7. Explain Dijkstra's algorithm and its complexity.

A7. Finds shortest paths on weighted graphs without negative weights; using a binary heap complexity is
O((V+E) log V).

Q8. What is dynamic programming and when is it applicable?

A8. Technique to solve problems by storing overlapping subproblem results; used when optimal
substructure and overlapping subproblems exist.

Q9. Define Turing machine and its significance.

A9. Abstract computation model that formalizes algorithmic computability; a language is


Turing-recognizable if TM accepts it.

Q10. What is P vs NP in brief?

A10. P is class of problems solvable in polynomial time; NP are verifiable in polynomial time; open
question if P=NP.

Q11. Explain the concept of OSI and TCP/IP model mapping for layers.

A11. OSI has 7 layers; TCP/IP maps roughly to application, transport, internet, and link layers.

Q12. What are NP-complete problems and an example?

A12. NP-complete are hardest in NP; SAT and 3-SAT are classic NP-complete examples.
Q13. Describe characteristics of relational databases and normalization forms.

A13. Relational DBs use tables; normalization (1NF,2NF,3NF) reduces redundancy and ensures data
integrity.

Q14. What is ACID property in databases?

A14. Atomicity, Consistency, Isolation, Durability ensure reliable transaction processing.

Q15. Explain difference between process and thread.

A15. Process is independent execution context; thread is lightweight execution unit sharing process
memory.

Q16. What are compiler phases in order?

A16. Lexical analysis, syntax analysis, semantic analysis, intermediate code generation, optimization,
code generation.

Q17. Define signal vs slot (observer pattern) in software design.

A17. Observer pattern allows objects to subscribe and receive notifications on events (publish-subscribe
behavior).

Q18. What is OAuth and how does it differ from basic authentication?

A18. OAuth is token-based delegated authorization allowing limited resource access without sharing
credentials.
Q19. Explain Bloom filter and use-case.

A19. Space-efficient probabilistic structure testing membership with false positives; used in caching and
databases.

Q20. What is RAID and briefly list types relevant to storage exams?

A20. Redundant Array of Independent Disks combines disks for performance and redundancy; types:
RAID 0,1,5,6,10.

Q21. Describe quicksort average and worst case complexity and pivot strategies.

A21. Average O(n log n), worst O(n^2); randomized pivot or median-of-three reduce worst-case
probability.

Q22. What is middleware in distributed systems?

A22. Software layer that enables communication and management of distributed components (RPC,
message brokers).

Q23. Explain CAP theorem for distributed databases.

A23. Consistency, Availability, Partition tolerance — a distributed system can satisfy at most two
simultaneously under network partition.

Q24. How does encryption differ from hashing?

A24. Encryption is reversible with keys for confidentiality; hashing is one-way for integrity and indexing.
Q25. What is MapReduce and its basic steps?

A25. MapReduce processes large data with map (key-value pair generation), shuffle/sort, and reduce
(aggregation) phases.

Q26. Describe concurrency issues and solutions in multi-threaded programs.

A26. Race conditions, deadlocks, starvation solved via locks, semaphores, atomic operations, and
careful design.

Q27. What are regular expressions used for and a simple example?

A27. Pattern matching in strings; e.g., ^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$ matches an


email.

Q28. Explain the role of middleware like Kafka in modern architectures.

A28. Kafka provides durable event streaming, decoupling producers and consumers and enabling
scalable real-time pipelines.

Q29. What is static vs dynamic linking and trade-offs?

A29. Static includes libraries in executable increasing size; dynamic links at runtime saving memory but
adding dependency management.

Q30. How do you approach proving algorithm correctness?

A30. Using induction, loop invariants, and formal assertions to show preconditions lead to postconditions
for all cases.

Common questions

Powered by AI

The CAP Theorem states that in the presence of a network partition, a distributed system can only provide either consistency or availability, but not both simultaneously . This implies that system architects must prioritize between ensuring that all nodes have the same data (consistency) versus ensuring the system remains operational (availability), depending on the application requirements. For example, critical systems may prioritize consistency to prevent errors, while real-time applications may prefer availability to maintain a seamless user experience.

Open addressing stores all keys within the hash table itself and uses schemes like linear or quadratic probing to resolve collisions, which avoids extra memory but can lead to clustering and higher retrieval time as the load factor increases . Chaining, in contrast, uses linked lists or other structures at each hash table index to store multiple elements, leading to additional memory usage but typically offers better performance under high load factors due to separate chaining reducing collisions.

Using randomized pivot selection in quicksort averages out to a more consistent O(n log n) performance by minimizing the chances of encountering the worst-case O(n^2) performance that can occur with fixed pivot strategies in sorted or mostly sorted datasets . This makes quicksort more reliable and efficient for large and diverse input data. Fixed pivot strategies, such as always choosing the first or last element, may lead to poor performance on already ordered datasets due to their deterministic nature.

Bloom filters are particularly advantageous in scenarios requiring space-efficient approximate membership tests, such as caching and database indexing, where occasional false positives are acceptable . They are highly efficient due to their ability to provide constant-time query performance and minimal memory usage. However, they cannot store the actual elements themselves, and do not allow false negatives, nor can they be updated to remove existing elements without redesigning the filter, limiting their applicability in contexts requiring complete accuracy or element removal.

Context-free grammars are essential in defining the syntax of programming languages, which can be parsed using pushdown automata . They allow compilers to systematically check for correct syntax structure and derive a parse tree representing the program’s source code. This parse tree serves as an intermediary structure, enabling subsequent phases like semantic analysis and code generation to function effectively.

Static linking incorporates all library code directly into the executable, increasing its size and reducing dependency management at runtime, thus improving portability . Conversely, dynamic linking can significantly reduce the executable size by loading libraries at runtime, which saves memory and allows easy updates or patching. However, it introduces dependency management complexities and risks of runtime errors if shared libraries become incompatible or are missing. Developers must weigh these trade-offs based on factors like application deployment and maintenance strategy.

Dynamic programming involves storing the solutions to overlapping subproblems to avoid redundant computations and is useful when optimal substructure and overlapping subproblems exist . Divide-and-conquer, in contrast, divides a problem into independent subproblems, solves them independently, and combines their results, without necessarily storing intermediate results .

Implementing OAuth in web applications presents challenges such as ensuring secure management of tokens, dealing with refresh tokens, and understanding its flow which can be more complex compared to the straightforward process of basic authentication . However, OAuth significantly enhances security by allowing applications to access resources without exposing user credentials directly, using token-based authorization and enabling users to grant limited, revocable access to their data, reducing the risk of credential leaks and unauthorized access.

In theory, any language recognized by an NFA can also be recognized by a DFA, making them equivalent in terms of language recognition . However, in practice, NFAs can be easier to construct and understand for certain languages due to their flexibility in allowing multiple transitions for a single symbol, including epsilon transitions. This often results in simpler representations, whereas DFAs require more states to handle the same complexity due to their constraint of a single transition per input symbol.

Regular expressions facilitate efficient text processing by providing a concise and flexible syntax for specifying patterns for string matching tasks, which allows for powerful searching and replacing operations across text data . They are superior to basic string handling functions because they enable complex pattern recognition tasks (e.g., validating email formats) within single expressions, allowing more complex queries than simple string comparisons or splitting functions.

You might also like