Introduction to Knowledge Engineering - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Introduction to Knowledge Engineering

Description:

Gums. Nuggets. Glow worms. Black worms. Red worms. cl. Knapsack: a Hacker's solution ... Gums (7) Nuggets (6) Glow worms (1) Black worms (1) Red worms (1) cl ... – PowerPoint PPT presentation

Number of Views:91
Avg rating:3.0/5.0
Slides: 12
Provided by: jvandek
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Knowledge Engineering


1
Introduction to Knowledge Engineering
  • Operations Research
  • Session 3 part A
  • Joris van de Klundert
  • j.vandeklundert_at_math.unimaas.nl

2
Last weeks exercises
Solve the knapsack problem (that is check the
hackers solution and the optimal solution in the
graph model) Solve the 2 Thieves problem (that
is find an appropriate model and solution
algorithm).
3
Solutions to the Knapsack problem
Magic bread Cookies Fish Lollies Gums Nuggets
Glow worms Black worms Red worms
cl
4
Knapsack a Hackers solution
Magic bread (11) Cookies (11) Fish Lollies
(7) Gums (7) Nuggets (6) Glow worms (1) Black
worms (1) Red worms (1)
cl
5
Knapsack an optimal solution
Magic bread (11) Cookies (11) Fish Lollies
(7) Gums (7) Nuggets (6) Glow worms (1) Black
worms (1) Red worms (1)
cl
6
2 Thieves (problem statement)
Two thieves are sitting with there stolen
property, which consists of a set items 1,2,3.m,
all watches and jewelry. The thieves know the
value v(i) of each of the items i1,2,m. The
thieves strive to find a division of the set of
items into 2 sets, one for each thief, such that
the sets are of the same value. (the value of a
set is the sum of the values of the items in the
set.) Can you handle (model) this problem for
them?)
7
The two thieves problem..
  • 1
  • 2
  • 3
  • .
  • .
  • .
  • n

8
Interpretation of the model
Define V ?ni1 v(i) V.
V/2
Item i
Thief X gets item i
Thief Y gets item i
v(i)
9
Modelling the 2 thieves problem
1 2 3 4 5 . . . .
V/2
1 2 3 . . . n
10
Repeat the following step until the yellow vertex
is red
Take any orange node v Consider all blue nodes u,
such that there is an arc from v to u. Eliminate
arc (v,u). If u has no incoming arcs anymore,
change the color of u from blue to orange. Change
the color of v from orange to red.
11
Interpretation
  • Any path from the red node to the yellow node
    correspond to a set of items of total value V/2,
    and therefore partitions the set of all items in
    2 sets of the same total value!
  • This problem is called the 2 partitioning
    problem.
  • How many steps does the algorithm take?
  • Not more than n V.
Write a Comment
User Comments (0)
About PowerShow.com