• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 24 pages
Exam (elaborations)

COS3751 Assignment 3 2026 (268281) Due 11 September 2026

Document preview thumbnail
Preview 3 out of 24 pages

A clear, well-structured assignment with accurate answers and explanations to help you understand the material and complete your work with confidence. Work with us and give yourself a better chance of success.

Content preview

UNIVERSITY OF SOUTH AFRICA (UNISA)
College of Science, Engineering and Technology



⋄




Problem Solving, AI, Ethics
and the Future of AI
Assignment 03 — 2026


⋄




Module Code: COS3751

Module Name: Artificial Intelligence

Assignment No.: Assignment 03

Due Date: 11 September 2026

Semester: Semester 2, 2026

Unique Number: 268281




Submitted in partial fulfilment of the requirements for Artificial Intelligence
at the University of South Africa.

,UNISA | COS3751 Problem Solving, AI, Ethics and the Future of AI



Question 1: Solving Problems by Searching

The 8-puzzle in Figures 1 and 2 of the assignment provides a compact but non-trivial state-
space search problem, and the second part of this question extends the same search con-
cepts to an abstract state space generated by the successor rule k → {2k, 2k + 1}.


1.1(a) Formal representation of the initial and goal states


Represent the initial state and goal state formally.

Reading the board row by row, left to right, top to bottom, and using 0 to denote the blank, the
initial state in Figure 1 and the goal state in Figure 2 are represented as ordered 9-tuples:


S0 = (2, 8, 3, 1, 6, 4, 7, 0, 5)


G = (1, 2, 3, 4, 5, 6, 7, 8, 0)

This tuple notation is the standard way of encoding an 8-puzzle configuration for search (Rus-
sell and Norvig, 2021:64). Each distinct arrangement of the tiles corresponds to exactly one
state in the search space, and a successor function can generate new states by swapping the
blank with whichever tile is vertically or horizontally adjacent to it.


1.1(b) Legal moves from the initial state


List the legal moves possible from the initial state.

In the initial configuration the blank occupies the bottom-middle cell:


2 8 3
1 6 4
7 □ 5

Three tiles are orthogonally adjacent to the blank and can therefore slide into it: tile 6 (directly
above the blank) can move down, tile 7 (to the left of the blank) can move right, and tile 5 (to
the right of the blank) can move left. The legal moves from S0 are:


{move 6 down, move 7 right, move 5 left}




Page 1 of 23

, UNISA | COS3751 Problem Solving, AI, Ethics and the Future of AI



1.1(c) Sequence of moves to reach the goal state


Using a suitable search strategy, show the sequence of moves required to reach the goal state.

Before applying a search strategy such as breadth-first search, it is worth checking whether
the supplied goal is even reachable from the supplied start, because the 8-puzzle is only
solvable from roughly half of all possible starting arrangements (Russell and Norvig, 2021:66).
Solvability is governed by the parity of the number of inversions in the tile sequence, where an
inversion is any pair of tiles that appears out of the order they hold in the goal state.

Listing the initial state’s tiles in reading order, ignoring the blank, gives the sequence 2, 8, 3, 1, 6, 4, 7, 5.
Counting inversions against the goal ordering 1, 2, 3, 4, 5, 6, 7, 8:

• 2 precedes 1: 1 inversion
• 8 precedes 3,1,6,4,7,5: 6 inversions
• 3 precedes 1: 1 inversion
• 6 precedes 4,5: 2 inversions
• 4 precedes none smaller after it: 0
• 7 precedes 5: 1 inversion

This gives a total of 1 + 6 + 1 + 2 + 0 + 1 = 11 inversions, which is odd. The goal state has
0 inversions, which is even. On a 3 × 3 board, a legal slide of a tile into the blank changes the
inversion count by an even number, so the parity of the inversion count is invariant under legal
moves (Russell and Norvig, 2021:66). Since S0 has odd parity and G has even parity, no finite
sequence of legal moves can transform S0 into G.

The supplied 8-puzzle is therefore unsolvable: the initial arrangement contains 11 inversions
while the goal contains 0, and because a legal move never changes inversion parity, no legal
sequence of moves connects the two states. A breadth-first search launched from S0 would
exhaustively expand the entire reachable half of the state space without ever generating G,
which illustrates why checking solvability analytically is more efficient than relying on search
alone to discover that a goal is unreachable.


1.1(d) Why the 8-puzzle is used in AI search problems


Briefly explain why the 8-puzzle is commonly used in artificial intelligence (AI) search problems.

The 8-puzzle is a standard teaching example because its rules are trivial to state while its


Page 2 of 23

Connected book
 image
Publisher: 2015 ISBN: 9781632403582 Edition: Unknown

Document information

Uploaded on
August 28, 2026
Number of pages
24
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$10.50

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.
LectureLab
3.6
(89)
Sold
712
Followers
188
Items
1566
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 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