cosc 4426 topics in computer science ii discrete optimization good results with problems that are...
TRANSCRIPT
COSC 4426 Topics inComputer Science II
Discrete Optimization
Good results with problems that are too bigfor people or computers to solve completely
http://mathworld.wolfram.com/TravelingSalesmanProblem.html
Difficult problems
hard to represent(what information, what data structures)
no known algorithms no known efficient algorithms
this course: discreet variable problems
Examples practical examples
scheduling (transportation, timetables,…) puzzles
crosswords, Sudoku, n Queens classic examples
SAT: propositional satisfiability problem(independent parameters)
CSP: constraint satisfaction problem(dependent parameters)
TSP: travelling salesman problem(permutations)
SAT: propositional satisfiability problem
P1 P2 P1^P2
F F F
F T T
T F F
T T T
n propositions, P1, P2, P3, …, Pn
What combination of truth values makes a sentence true?
Table has 2n rows.
n=50, 250 = 1,125,899,906,842,624
n=2; 22 = 4 rows
CSP: constraint satisfaction problem
example – map colouringn countries – 4 possible colours- constraints: adjacent
countries different colours- 4n combinations
n=13; 413 = 67,108,864 combinations; 25 constraints
TSP: traveling salesman(sic) problem n cities: what is shortest path visiting all
cities, C1, C2, C3, …, Cn once? (n-1)! routes
from home cityon complete graph
n = 16;(n-1)! = 1,307,674,368,000
C1
n = 5; (n-1)! = 24
Silly Example – one variable
mark in class based on hours attended
number of hours, h, is between 0 and 36 find optimal attendance (best h) if
1. mark m is m = 3h - 82. mark m is m = 20h - h2
3. mark m is m = (5h/9 – 10)2 4. mark m is m = h3 mod 1015. mark m is m = markarray[h]
Marking schemes
-25
0
25
50
75
100
0 6 12 18 24 30 36
attendance
grade
m = 3h - 8
Marking schemes
-25
0
25
50
75
100
0 6 12 18 24 30 36
attendance
grade
m = 3h – 8
m = 20h - h2
m = (5h/9 – 10)2 global optimum
Marking schemes
-25
0
25
50
75
100
0 6 12 18 24 30 36
attendance
grade
m = h3 mod 101 local optimum
Marking schemes
-25
0
25
50
75
100
0 6 12 18 24 30 36
attendance
grade
m = h3 mod 101m = markarray[h]
Marking schemes
-25
0
25
50
75
100
0 6 12 18 24 30 36
attendance
grade
Problem description1. fitness function (optimization function, evaluation) –
e.g., m = h3 mod 1012. constraints (conditions) – e.g., 0 ≤ h ≤ 36find global optimum of fitness function withoutviolating constraints ORgetting stuck at local optimum small space:
complete search1. large space: ?????
Marking schemes
-25
0
25
50
75
100
0 6 12 18 24 30 36
attendance
grade
Large problems
more possible values more parameters, n = {n1, n2, n3, …} more constraints more complex fitness functions
- takes significant time to calculate m = f(n)
too big for exhaustive search
Searchingwithout searching everywhere
How to search intelligently/efficiently using information in the problem:-hill climbing-simulated annealing-genetic algorithms-constraint satisfaction-A*- …
Focusing search
assumption – some pattern to the distribution of the fitness function
finding the height of land in a forest- can only see ‘local’ structure- easy to find a hilltop but are there other higher hills?
Fitness function distribution
convex – easy – start anywhere, make local decisions
Fitness function distribution many local maxima
make local decisions but don’t get trapped
Course outline
textbook – Michalewicz and Fogel(reasonable price, valuable book)
lectures, notes and ppt presentations evaluation
assignments project tests final exam