Artificial Intelligence
Knowledge Representation
Syed Abbas Ali
Representation
AI
agents deal with knowledge (data)
Facts (believe & observe knowledge)
Procedures (how to knowledge)
Meaning (relate & define knowledge)
Right
representation is crucial
Ear

Minimum Spanning Trees
Minimum Spanning Tree
A town has a set of houses and a set of roads
A road connects 2 and only 2 houses
A road connecting houses u and v has a repair cost w(u, v)
Goal: Repair enough (and no more) roads such that
everyone stays

Heapsort
Introduction to Heapsort
Running time: O(n lg n)
Like merge sort
Sorts in place: only a constant number of array elements are stored
outside the input array at any time
Like insertion sort
Heap
A data structure used by Heapsort to manage infor

Divide and Conquer
Recall
Divide the problem into a number of sub-problems that are smaller
instances of the same problem.
Conquer the sub-problems by solving them recursively. If the subproblem sizes are small enough, however, just solve the sub-proble

Chapter 22:
Elementary GraphAlgorithms
Undirected Graph
Information
Technology
Example: A city map for
pedestrians (edges are streets,
nodes are intersections)
A
F
B
C
G
H
E
D
J
K
I
L
M
N
2
Directed Graph (Digraph)
Information
Technology
Example: A city m

Design and Analysis of
Algorithms
Dr. Aarij Mahmood Hussaan
Course Objective
The last century has witnessed the development of a beautiful and
elegant new scientific field: the design and analysis of algorithms.
This course will teach you how to design an

United International College
COMP2230: Design and Analysis of Algorithms
Fall 2007
Midterm Examination
10:00am - 12:00am, Monday, November 5 2007
Name:
Student ID:
This is a closed book exam. You should put everything o your desk
except for stationary. Yo

Number-Theoretic Algorithms
Chapter 31, CLRS book
p1.
Modular Arithmetic
p2.
Integers
a | b: a divides b, a is a divisor of b.
gcd( a, b): greatest common divisor of a and b.
Coprime or relatively prime: gcd( a, b) =
1.
Euclid's algorithm: compute gcd

Growth of functions
Function Growth
The running time of an algorithm as input size approaches infinity is
called the asymptotic running time
We study different notations for asymptotic efficiency.
In particular, we study tight bounds, upper bounds and

Chapter 5 Lecture
Randomized Algorithms
Sections 5.1 5.3
source: 91.404 textbook Cormen et al.
The Hiring Problem
Job candidates are numbered 1n
HIRE-ASSISTANT(n)
best
0 candidate 0 is a least-qualified dummy candidate
1 to n
for i
do interview candidat

Dynamic Programming
Dynamic Programming
Dynamic programming, like the divide-and-conquer method, solves
problems by combining the solutions to sub-problems.
Programming in this context refers to a tabular method, not to
writing computer code.
We typica

Introduction to
Expert Systems
Course Teacher
Artificial Intelligence
Objectives
Learn the meaning of an expert system
Understand the problem domain and knowledge
domain
Learn the advantages of an expert system
Understand the stages in the development

Chapter 25: All-Pairs
Shortest-Paths
1
Some Algorithms
When no negative edges
O(VE + V2log V) time
(how?)
When no negative cycles
Bellman-Ford [1962]: O(V2E) time
Floyd-Warshall [1962]: O(V3) time
Johnson [1977]: O(VE + V2log V) time
based on a cle