Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

COS4861 EXAM PACK 2026 – QUESTION & ANSWERS

Rating
-
Sold
-
Pages
43
Grade
A+
Uploaded on
01-02-2026
Written in
2025/2026

COS4861 EXAM PACK 2026 – QUESTION & ANSWERS QUESTIONS WITH ANSWERS, COMPILED FROM RECENT PAST EXAM PAPERS. PERFECT FOR EXAM PREPARATION.

Institution
Course

Content preview

lOMoARcPSD| 54878315




COS4861/0/2025
Natural Language Processing (NLP)
Total Marks: 100

Primary Lecturer: Dr M.Sibiya




Question 1: Theory of Automata (40 marks)
Topic: Deterministic Finite State Automata (DFSA) and Non-Deterministic Finite State
Automata (NDFSA)

1.1 Define a Deterministic Finite State Automata (DFSA). Explain its key components
and how it operates with an example. (10 marks)

1.2 Define a Non-Deterministic Finite State Automata (NDFSA). Explain its key
components and how it differs from DFSA with an example. (10 marks)

1.3 Prove that for every NDFSA, there exists an equivalent DFSA that recognizes the same
language. Provide a step-by-step example where you convert a given NDFSA into a DFSA.
(15 marks)

1.4 Discuss the significance of DFSA and NDFSA in the context of Natural Language
Processing (NLP). Provide examples of how these automata models might be used in NLP
tasks. (5 marks)




Question 2: Practical Project on NLP Data Preprocessing (60 marks)
Topic: Data Preprocessing Techniques in NLP

2.1 Create a block diagram to represent the workflow of an NLP data preprocessing pipeline.
The pipeline should include the following stages: Tokenization, Stopwords Removal,
Stemming, and Lemmatization. (10 marks)

2.2 Select a small text dataset (e.g., a paragraph or set of sentences). Apply each of the
following preprocessing techniques on this dataset:

• Tokenization: Split the text into tokens (words).
• Stopwords Removal: Remove common stopwords from the tokenized text.
• Stemming: Apply a stemming algorithm (e.g., Porter Stemmer) to reduce words to
their base forms.
• Lemmatization: Apply lemmatization to reduce words to their dictionary form. (25
marks)

2.3 Explain each step of the preprocessing techniques applied in 2.2. Provide insights into
the significance of each technique and how it impacts the final dataset. (15 marks)

, lOMoARcPSD| 54878315




COS4861/0/2025
3

2.4 Conclusion: Write a conclusion summarizing the effects of the preprocessing steps on
the text data. Discuss how these techniques help in improving the performance of NLP
models. (10 marks)


4

,Question 1: Theory of Automata (40 marks)
Topic: Deterministic Finite State Automata (DFSA) and Non-Deterministic Finite State
Automata (NDFSA)




1.1 Deterministic Finite State Automata (DFSA) (10 marks)
Definition:
A Deterministic Finite State Automaton (DFSA) is a mathematical model of computation
used to recognize patterns or languages. It is called deterministic because for every state
and input symbol, there is exactly one transition to a next state.

Key components of a DFSA:
A DFSA is formally defined as a 5-tuple:

M = (Q, Σ, δ, q0, F )
Where:

1. Q – A finite set of states
2. Σ – A finite input alphabet
3. δ – A transition function:

δ : Q×Σ→ Q
4. q₀ – The initial (start) state, where computation begins

, 5. F – A set of final (accepting) states

How a DFSA operates:

The automaton starts in the initial state q0.
It reads the input string one symbol at a time.
For each symbol, it moves to exactly one next state as defined by the transition
function.
After reading the entire input, the string is accepted if the automaton ends in a final
state; otherwise, it is rejected.

Example:

Consider a DFSA that accepts all strings over {0, 1} that end with 1.

States: Q = {q0, q1}
Alphabet: Σ = {0, 1}
Start state: q0
Accepting state: F = {q1}

Transitions:

From q0:
On 0 → stay in q0
On 1 → move to q1
From q1:
On 0 → move to q0
On 1 → stay in q1

This DFSA deterministically decides whether a string ends with 1 .




1.2 Non-Deterministic Finite State Automata (NDFSA) (10 marks)
Definition:
A Non-Deterministic Finite State Automaton (NDFSA) is a finite automaton where, for a
given state and input symbol, the machine may move to zero, one, or multiple states. It
may also include ε-transitions (transitions without consuming input).

Key components of an NDFSA:
An NDFSA is also defined as a 5-tuple:

M = (Q, Σ, δ, q0, F )

Written for

Institution
Course

Document information

Uploaded on
February 1, 2026
Number of pages
43
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$3.21
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ZaProff University of South Africa (Unisa)
Follow You need to be logged in order to follow users or courses
Sold
2215
Member since
3 year
Number of followers
531
Documents
2357
Last sold
2 hours ago

3.8

365 reviews

5
158
4
70
3
75
2
25
1
37

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions