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
Document preview thumbnail
Preview 2 out of 14 pages
Exam (elaborations)

COS4861 Assignment 2 2025 |COMPLETE ANSWERS|

Document preview thumbnail
Preview 2 out of 14 pages

COS4861 Assignment 2 2025 |COMPLETE ANSWERS| 100% COMPLETE ANSWERS

Content preview

COS4861
Assignment 2 2025

, Assignment 2: Natural Language Processing (NLP)

Question 1: Theory of Automata (40 marks)

1.1 Deterministic Finite State Automaton (DFSA)

A Deterministic Finite State Automaton (DFSA) is a type of finite state machine used in
computer science to recognize patterns or decide whether a given string belongs to a
particular language. The word “deterministic” means that for every state and input
symbol, there is exactly one transition to another state the machine never has to guess
or choose between options.

Key Components of a DFSA:

A DFSA is formally defined as a 5-tuple:
M = (Q, Σ, δ, q₀, F) where:

• Q is a finite set of states

• Σ is a finite input alphabet (symbols the automaton can read)

• δ is the transition function: δ: Q × Σ → Q

• q₀ is the start state (q₀ ∈ Q)

• F is the set of accept (final) states, where F ⊆ Q

How it operates:

The DFSA reads a string symbol by symbol, starting from the initial state (q₀). For each
input symbol, it uses the transition function (δ) to move to a new state. If the machine
ends in an accepting state after reading the full string, the string is accepted. If not, it's
rejected.

Example:

Let’s define a DFSA that accepts strings over the alphabet Σ = {0,1} that end with 01.

Define:

• Q = {q₀, q₁, q₂}

Document information

Uploaded on
July 11, 2025
Number of pages
14
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
R45,33

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

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.
FocusZone
4,2
(67)
Sold
444
Followers
2
Items
631
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT 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