optional · CSS study notes
12. Artificial Intelligence
FPSC CSS Computer Science past papers (2016–2026) — 5 questions: 0 MCQs, 5 subjective parts. Newest first.
Part A — Subjective Questions
2025 · Paper-I · Q2(a) (6 marks)
Question
How is the Generative AI creating impacts on our society? Discuss the benefits and challenges associated with its use. Support your answer by adding examples.
Solution
Generative AI (e.g., ChatGPT, GitHub Copilot, DALL-E, Midjourney) learns patterns from massive datasets and produces new text, code, images or audio, and is reshaping society in significant ways.
Benefits:
- Productivity: automates drafting reports, emails and code (e.g., Copilot speeding up programming tasks).
- Personalization: powers adaptive tutoring systems and AI diagnostic assistants in healthcare.
- Creativity support: helps writers, designers and musicians rapidly generate drafts/prototypes.
- Accessibility: text-to-speech and translation tools help disabled and multilingual users communicate.
Challenges:
- Misinformation: deepfakes and AI-written fake news can erode public trust.
- Job displacement: automation threatens routine writing, design and support roles.
- Bias: models trained on biased data can reproduce or amplify discrimination.
- Intellectual property/plagiarism: AI-generated content raises copyright and academic-integrity concerns.
- Privacy: training on personal data raises consent and data-protection issues.
Example: a generative model can draft a marketing article in seconds (benefit), but the same underlying technology can produce a convincing fake video of a public figure (challenge). Responsible use, regulation, transparency and human oversight are needed to balance these impacts.
2019 · Paper-I · Q2(b) (5 marks)
Question
How do artificial intelligence may facilitate us in improving cyber security?
Solution
AI strengthens cyber security in several ways: (1) Anomaly/behavioral detection — machine learning models learn a baseline of 'normal' network or user behavior and flag deviations that may indicate intrusion. (2) Malware classification — supervised learning classifies unknown files as malicious or benign far faster than manual signature analysis, and can catch novel/zero-day variants via pattern similarity. (3) Automated threat response — AI-driven SOAR systems can isolate a compromised host or block traffic in real time without waiting for a human analyst. (4) Phishing/spam detection — NLP models analyze email content and sender patterns to catch social-engineering attacks. (5) Predictive threat intelligence — AI correlates large volumes of log/threat-feed data to anticipate attacks before they occur, and reduces false positives so human analysts focus on genuine threats.
2019 · Paper-I · Q6(a) (10 marks)
Question
Discuss the limitations of genetic algorithms.
Solution
Limitations of Genetic Algorithms (GAs):
- Computationally expensive: many generations, each requiring evaluation of a whole population's fitness, are often needed, which is slow for complex or costly fitness functions.
- No guarantee of finding the global optimum: GAs can suffer premature convergence to a local optimum if diversity is lost early in the population.
- Sensitive to parameter tuning: population size, crossover rate, mutation rate and selection strategy strongly affect performance and must be tuned per problem, often by trial and error.
- Encoding difficulty: designing a good chromosome representation for a given problem is not always obvious, and a poor encoding can make the search space very hard to explore.
- Not efficient for smooth/simple search spaces: for problems with a well-behaved, differentiable objective function, gradient-based methods converge far faster and more reliably.
- Lack of strong theoretical convergence guarantees compared to classical optimisation methods.
- Difficulty in defining an appropriate fitness function, especially for multi-objective problems.
- Results can vary between runs due to their stochastic nature, requiring multiple runs for confidence.
2018 · Paper-I · Q6(b) (6 marks)
Question
What is informed or heuristic search what type of algorithm is used to do such a search?
Solution
Informed (Heuristic) Search is a category of search strategy that uses problem-specific knowledge, encoded as a heuristic function h(n) (an estimate of the cost/distance from the current node n to the goal), to guide the search more efficiently toward the goal, rather than blindly exploring the search space as uninformed/blind search methods (like BFS/DFS) do.
By using h(n) to prioritize which nodes to expand next, informed search can dramatically reduce the number of nodes explored compared to uninformed search, provided the heuristic is reasonably accurate.
Algorithms used for heuristic/informed search:
- Greedy Best-First Search: always expands the node that appears closest to the goal according to h(n) alone; fast but not guaranteed optimal.
- A* Search: the most widely used informed search algorithm; expands nodes based on f(n) = g(n) + h(n), where g(n) is the actual cost from the start to n, and h(n) is the estimated cost from n to the goal. A* is guaranteed to find the optimal (shortest-cost) solution if the heuristic h(n) is admissible (never overestimates the true cost).
- Hill Climbing: a local-search heuristic method that always moves toward the neighbouring state with the best heuristic value, but can get stuck in local optima.
A* is the canonical example used in most textbooks and applications (e.g. pathfinding in games/maps, puzzle-solving like the 8-puzzle).
2018 · Paper-I · Q6(d) (5 marks)
Question
Explain what type of problems can be solved by genetic algorithm.
Solution
Genetic Algorithms (GAs) are optimization/search algorithms inspired by natural selection and evolution, using a population of candidate solutions ('chromosomes') that evolve over generations via selection, crossover (recombination), and mutation, guided by a fitness function that measures how good each candidate solution is.
GAs are well-suited to problems that are:
- Large, complex search spaces where exhaustive/exact search is computationally infeasible.
- Optimization problems (finding a maximum/minimum of some objective/fitness function), especially where the search space is non-linear, multi-modal (many local optima), or poorly understood mathematically.
- Problems where a good approximate solution is acceptable, rather than requiring the guaranteed exact/global optimum.
- Problems lacking a clean analytical/gradient-based solution method (e.g. non-differentiable, discontinuous, or noisy objective functions).
Typical example problem types:
- Combinatorial optimization: the Traveling Salesman Problem (TSP), job-shop scheduling, timetabling/exam scheduling, bin packing.
- Engineering design optimization: optimizing parameters of a system (antenna design, circuit design) where the design space is huge.
- Machine learning: evolving neural network weights/architectures (neuroevolution), feature selection.
- Game strategy evolution and robotics/control-policy optimization.
In short, GAs are best applied to hard, large-scale search/optimization problems where traditional exact or gradient-based methods are impractical, and a heuristic, population-based search for a good-enough solution is acceptable.