100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

COS3751 EXAM PACK 2026 |Past Papers With Possible Solutions|

Rating
-
Sold
1
Pages
253
Grade
A+
Uploaded on
18-11-2025
Written in
2025/2026

COS3751 EXAM PACK 2026 |Past Papers With Possible Solutions| SUCCESS !!!

Institution
Module








Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Module

Document information

Uploaded on
November 18, 2025
File latest updated on
January 21, 2026
Number of pages
253
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

COS3751

EXAM
PACK

2025

,COS3751 October/November 2024 Exam -
Complete Solutions

Question 1: State Spaces [16]

Hungarian Forint and Mexican Peso Puzzle

Initial: F F _ P P
Goal: P P _ F F


(a) State Representation (2 marks)

State representation: S = [pos0, pos1, pos2, pos3, pos4]

Where each position contains:

• 'F' for Forint coin
• 'P' for Peso coin
• '_' (or 'E') for Empty cell

Example: S = ['F', 'F', '_', 'P', 'P']


(b) Start and Goal States (4 marks)

Start State: S₀ = ['F', 'F', '_', 'P', 'P']

Representing two Forint coins on the left, empty cell in middle, two Peso coins on the right.

Goal State: S_goal = ['P', 'P', '_', 'F', 'F']

Representing two Peso coins on the left, empty cell in middle, two Forint coins on the right.


(c) Adequacy of Representation (2 marks)

,This representation adequately defines any state because:

1. Complete information: Every cell's contents are explicitly represented (all 5 positions)
2. Unique identification: Each configuration is uniquely identifiable - no ambiguity
3. Legal move determination: We can determine all valid moves by:
o Finding the empty cell position
o Checking adjacent cells for slide moves
o Checking cells two positions away for hop moves
4. Goal testing: Easy comparison with goal state using simple equality check
5. Fixed size: Always 5 positions, maintaining consistency across all states
6. Sufficient detail: Contains exactly the necessary information - no more, no less


(d) Operators (5 marks)

Four operators with preconditions and effects:

1. Forint_Slide(S, i)

• Precondition: S[i] = 'F' AND S[i+1] = '_' AND i < 4
• Effect: Swap S[i] and S[i+1]
• Example: ['F', 'F', '', 'P', 'P'] → ['F', '', 'F', 'P', 'P'] (Forint at position 1 slides right to
position 2)

2. Forint_Hop(S, i)

• Precondition: S[i] = 'F' AND S[i+1] ∈ {'F', 'P'} AND S[i+2] = '_' AND i ≤ 2
• Effect: S[i] ↔ S[i+2] (Forint jumps right over another coin)
• Example: ['F', 'P', '', 'P', 'F'] → ['', 'P', 'F', 'P', 'F'] (Forint at position 0 hops over Peso at
position 1 to empty position 2)

3. Peso_Slide(S, i)

• Precondition: S[i] = 'P' AND S[i-1] = '_' AND i > 0
• Effect: Swap S[i] and S[i-1]

, • Example: ['F', 'F', '', 'P', 'P'] → ['F', 'F', 'P', '', 'P'] (Peso at position 3 slides left to
position 2)

4. Peso_Hop(S, i)

• Precondition: S[i] = 'P' AND S[i-1] ∈ {'F', 'P'} AND S[i-2] = '_' AND i ≥ 2
• Effect: S[i] ↔ S[i-2] (Peso jumps left over another coin)
• Example: ['', 'F', 'P', 'P', 'F'] → ['P', 'F', '', 'P', 'F'] (Peso at position 2 hops left over
Forint at position 1 to empty position 0)


(e) Number of Possible States (3 marks)

Calculation:

We have:

• 2 Forint coins (indistinguishable from each other)
• 2 Peso coins (indistinguishable from each other)
• 1 Empty cell
• 5 positions total

Formula: Number of distinct arrangements = 5! / (2! × 2! × 1!)

Computation:

• 5! = 5 × 4 × 3 × 2 × 1 = 120
• 2! × 2! × 1! = 2 × 2 × 1 = 4
• Total = = 30 possible states


Question 2: Machine Learning [16]

Engineers and Interns Crossing Problem

Given:

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.
FocusZone University of South Africa (Unisa)
Follow You need to be logged in order to follow users or courses
Sold
402
Member since
8 months
Number of followers
2
Documents
519
Last sold
1 day ago
Focus Zone

On this page you will find Uploads and Package Deals by the seller FOCUS ZONE.

4.2

60 reviews

5
34
4
12
3
11
2
0
1
3

Recently viewed by you

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 revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions