Genetic Algorithms for Optimized Book Embedding - PowerPoint PPT Presentation

1 / 49
About This Presentation
Title:

Genetic Algorithms for Optimized Book Embedding

Description:

... find the shortest route. Butte. Coeur D'Alene. Anaconda. Davenport. Edmonton ... A travel route of Butte, Coeur D'Alene, Edmonton, Davenport, and Anaconda can ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 50
Provided by: Kil90
Category:

less

Transcript and Presenter's Notes

Title: Genetic Algorithms for Optimized Book Embedding


1
Genetic Algorithms for Optimized Book Embedding
by Katie Dahmen and Ann Kilzer
  • Gonzaga University Center for Evolutionary
    Algorithms

2
The Traveling Salesman Problem (TSP)
  • The salesman visits each city once, and returns
    to the starting point (Hamiltonian Circuit)
  • We want to find the shortest route.

3
Traveling Salesman Problem
  • NP-Complete
  • O(n!) - for a problem of size n (n cities), the
    solution requires c n! operations for some
    constant c and n gt N0.
  • For a computer running 1 billion operations per
    sec, it would take 9.83 billion years to solve
    the 24 city problem with a brute-force algorithm
    (check every possible tour)

4
Genetic Algorithms
  • Also called Evolutionary Algorithms
  • A form of artificial intelligence based on the
    theory of evolution
  • Best solutions are combined to form better
    solutions
  • An attempt to find optimal or near optimal
    solutions to NP-Complete problems more quickly,
    without checking every possible solution

5
Genetic Algorithm Terminology
  • Gene Contains a single element of a solution
  • Ex One city in the tour, such as Butte (B).
  • Chromosome Contains a solution to the problem,
    often in the form of a sequence
  • Ex A travel route of Butte, Coeur DAlene,
    Edmonton, Davenport, and Anaconda can be
    represented as B-C-E-D-A.
  • It is assumed that we will return to the starting
    city.

6
Genetic Algorithm Terminology
  • Population A set of possible solutions
    (chromosomes)
  • Cost The efficiency of a solution
  • Ex In a tour of cities, the total distance
    traveled.

7
Genetic Algorithms applied to TSP
  • Randomly generate a population of solutions
    (chromosomes)

SOLUTION ADBCE BACED EABDC EBACD BDCEA DECAB CEAD
B DABCE
8
Genetic Algorithms applied to TSP
  • Evaluate cost Find distance traveled

SOLUTION COST ADBCE 28 BACED 25 EABDC
25 EBACD 21 BDCEA 23 DECAB 25 CAEDB 31 DABCE
23
9
Genetic Algorithms applied to TSP
  • Sort population
  • Throw out worst solutions
  • Pair parents

SOLUTION COST EBACD 21
BDCEA 23 DABCE 23 BACED 25 EABDC 25 DECAB 25
ADBCE 28 CAEDB 31
SOLUTION COST EBACD 21
BDCEA 23 DABCE 23 BACED 25
10
Genetic Algorithms applied to TSP
  • Mate
  • Two parents create two children
  • Combine solutions, avoiding duplicates
  • Place children in bottom half of population

BDACE EBCDA DABEC BACDE
SOLUTION COST EBACD 21
BDCEA 23 DABCE 23 BACED 25
11
Mate Function How it Works
  • Partially Matched Crossover A pivot point is
    randomly chosen between two genes
  • The genes on one side of the pivot are swapped
    between the parents
  • Duplicates are eliminated
  • Now we have created two children from two
    parents.

BDACE EBCDA
  • EBACD
  • BDCEA

BDACD EBCEA
12
Genetic Algorithms applied to TSP
  • Mutate
  • Avoid duplication by swapping genes
  • We can experiment with the percent of the
    population to mutate, though its usually around
    5

SOLUTION COST EBACD 21
BDCEA 23 DABCE 23 BACED 25 BDACE EBCDA DAB
EC BACDE
DCBAE 22
13
Genetic Algorithms applied to TSP
  • 8. Redo Steps 2 - 7
  • Until population converges
  • or a certain number of generations

SOLUTION COST DABEC 18 EBCDA 20 BACDE
21 EBACD 21 DCBAE 22 BDCEA 23 BDACE 23 BACED
25
SOLUTION COST EBACD 21
BDCEA 23 DCBAE 22 BACED 25 BDACE 23 EBCDA 20
DABEC 18 BACDE 21
14
Graph Theory
  • A Graph is made up of edges and vertices
  • Applications include social networks, travel
    routes, and circuits

K5 graph (Complete graph with five vertices)
15
Complete Graphs
K4 graph
K5 graph
16
Complete Bipartite Graphs
  • A Complete Bipartite Graph Kn,m can be drawn with
    n vertices on one side and m vertices on the
    other side.
  • Each vertex on the left is connected to each
    vertex on the right
  • K2,3 Bipartite Graph

17
Square Grids
3 x 3
4 x 4
18
X - Trees
X Trees are formed by creating a binary tree,
and then connecting each level.
19
Squares, Cubes, Hypercubes
Q2 Graph
Q3 Graph
Q4 Graph
20
Book Embedding
  • Part of Graph Theory
  • NP-Complete Problem
  • Our work involves applying Genetic Algorithms to
    the Book Embedding Problem
  • This works very similar to the TSP application

21
Embedding a Graph
2
1
3
4
5
  • We can make a list of edges in the graph
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

22
Book Embedding
  • The spine is a line containing all the vertices.
    A page is a half-plane extruding from the spine.

23
Book Embedding
Edge 2
Edge 1
1
4
3
5
2
Edge 3
  • We draw edges of a graph on a page so that they
    do not cross. To avoid a collision, we begin
    embedding on a new page.

24
Book Embedding
Edge on Page 3
1
4
3
5
2
  • Here, the first page is drawn above the spine,
    and the second page below it. Additional pages
    can be denoted by using patterned lines for the
    edges.

25
Embedding a Graph
2
1
3
4
5
  • We can make a list of edges in the graph
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

26
Embedding a Graph
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

27
Embedding a Graph
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

28
Embedding a Graph
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

29
Embedding a Graph
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

30
Embedding a Graph
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

31
Embedding a Graph
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

32
Embedding a Graph
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

33
Embedding a Graph
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4
  • A 2 Page Embedding

34
Embedding a Graph Reverse Order of Edge
Placement
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

35
Embedding a Graph Reverse Order of Edge
Placement
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

36
Embedding a Graph Reverse Order of Edge
Placement
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

37
Embedding a Graph Reverse Order of Edge
Placement
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

38
Embedding a Graph Reverse Order of Edge
Placement
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

39
Embedding a Graph Reverse Order of Edge
Placement
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

40
Embedding a Graph Reverse Order of Edge
Placement
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4

41
Embedding a Graph Reverse Order of Edge
Placement
2
1
3
4
5
  • 5 4, 5 3, 4 3, 1 2, 1 4, 2 5, 2 3,
    2 4
  • A 3 Page Embedding of the same graph

42
Book Embedding and Genetic Algorithms
  • The ordering of the edge placement affects the
    number of pages in the book
  • Our genetic algorithm tries to find the minimal
    page embedding by alternating the order of the
    edges placed in the book
  • It is also possible to adjust the page number by
    manipulating the vertex ordering on the spine

43
Results Complete Graphs
44
Results X-Trees
45
Results Square Grids
46
Results Hypercube
47
Results Complete Bipartite
48
Future Plans
  • Try to make the genetic algorithm adjust the
    spine (vertex) ordering and the edge placement
    ordering
  • Experiment with different types of graphs

49
Questions?
  • Katie Dahmen
  • kdahmen1_at_gonzaga.edu
  • Ann Kilzer
  • akilzer_at_gonzaga.edu

Thank you to the McDonald Family for sponsoring
our research project.
Write a Comment
User Comments (0)
About PowerShow.com