43
COMBINATORIAL OPTIMIZATION Guided By: Prepared By Dhaval Jha Anjali Bidua Asst Professor 12bce155

Combinatorial Optimization

Embed Size (px)

DESCRIPTION

Combinatorial Optimization

Citation preview

Page 1: Combinatorial Optimization

COMBINATORIAL OPTIMIZATION

Guided By: Prepared By

Dhaval Jha Anjali Bidua

Asst Professor 12bce155

Page 2: Combinatorial Optimization

Overview

What is Optimization?

What is Combinatorial Optimization?

Applications of Combinatorial Optimization

Identification of different Combinatorial Problems

Minimum Spanning Tree

Overview Of Travelling Salesman Problem

Page 3: Combinatorial Optimization

Optimization

Optimization is technique of finding the optimal solution when more than one solutions are available.

It is a live field of Mathematics.

It can be better known by Integer Programming.

Linear programming is a mathematical programming technique to optimize performance under a set of resource constraints.

Page 4: Combinatorial Optimization

There are various methods for solving optimization problems by integer programming.

Some of them are:

Graphical Method

Simplex Method

Page 5: Combinatorial Optimization

Combinatorial Optimization

Combinatorial optimization deals with algorithmicapproaches to finding specified configurations orobjects in finite structures such as directed andundirected graphs, hyper graphs, networks, matroids,partially ordered sets, and so forth.

Page 6: Combinatorial Optimization

Major Combinatorial Optimization Problems

Minimum spanning tree

Travelling salesman problem

Vehicle routing problem

Weapon target assignment problem

Knapsack problem

Page 7: Combinatorial Optimization

Minimum Spanning Tree

Given a connected, undirected graph, a spanning treeof that graph is a subgraph that is a tree and connectsall the vertices together.

A minimum spanning tree (MST) or minimum weightspanning tree is then a spanning tree with weight lessthan or equal to the weight of every other spanningtree.

Page 8: Combinatorial Optimization

Travelling Salesman Problem

Given a set of cities and the distance between eachpossible pair, the Travelling Salesman Problem is tofind the best possible way of ‘visiting all the citiesexactly once and returning to the starting point’.

Page 9: Combinatorial Optimization

Vehicle Routing Problem

The vehicle routing problem (VRP) is a combinatorial optimization andinteger programming problem seeking to service a number of customerswith a fleet of vehicles.

VRP is an important problem in the fields of transportation, distribution andlogistics. Often the context is that of delivering goods located at a centraldepot to customers who have placed orders for such goods.

Implicit is the goal of minimizing the cost of distributing the goods. Manymethods have been developed for searching for good solutions to theproblem, but for all but the smallest problems, finding global minimum forthe cost function is computationally complex.

Page 10: Combinatorial Optimization

Weapon Target Assignment problem

It consists of finding an optimal assignment of a set ofweapons of various types to a set of targets in orderto maximize the total expected damage done to theopponent

Page 11: Combinatorial Optimization

Knapsack problem

The problem often arises in resource allocationwhere there are financial constraints and isstudied in fields such as combinatorics,computer science, complexity theory,cryptography and applied mathematics.

Page 12: Combinatorial Optimization

Definition: A tree is a connected undirected graph with no simple circuits.

A spanning tree of a graph is just a subgraph that contains all the vertices and is a tree.

Spanning Tree properties: On a connected graph G=(V, E), a spanning tree:

• is a connected subgraph

• acyclic

• is a tree (|E| = |V| - 1)

• contains all vertices of G (spanning)

Minimum Spanning Tree

Page 13: Combinatorial Optimization

Minimum weight spanning tree (MST)

On a weighted graph, A MST:

connects all vertices through edges with least weights.

has w(T) ≤ w(T’) for every other spanning tree T’ in G

Adding one edge not in MST will create a cycle

Page 14: Combinatorial Optimization

Finding Minimum Spanning Tree

Algorithms :

Kruskal’s

Prim’s

Page 15: Combinatorial Optimization

Compare Prim and Kruskal

Complexity

Kruskal: O(NlogN)

comparison sort for edges

Prim: O(NlogN)

search the least weight edge for

every vertice

Page 16: Combinatorial Optimization

MST Conclusion

Kruskal’s has better running times if the numberof edges is low, while Prim’s has a better runningtime if both the number of edges and thenumber of nodes are low.

So, of course, the best algorithm depends on thegraph and if you want to bear the cost ofcomplex data structures.

Page 17: Combinatorial Optimization

Applications of MST

Design of networks, including computer networks,telecommunications networks, transportationnetworks, water supply networks, and electrical grids

Applications of MST in Sensor Networks

A tree is formed from all sensor nodes to the sink sothat the transmission power of all sensor nodes isminimum

Page 18: Combinatorial Optimization

Travelling Salesman Problem

In the theory of computational complexity, thedecision version of the TSP where, given a length L,the task is to decide whether the graph has any tourshorter than L.

Page 19: Combinatorial Optimization

TSP : An NP-HARD Problem!

TSP is an NP-hard problem in combinatorial optimization studied in theoretical computer science.

In many applications, additional constraints such as limitedresources or time windows make the problemconsiderably harder.

Removing the constraint of visiting each city exactly one time also doesn't reduce complexity of the problem.

Page 20: Combinatorial Optimization

Applications of TSP

Planning

Logistics

Manufacture of microchips

Slightly modified, it appears as a sub-problem in many areas, such as DNA sequencing

Integrated circuit

Mechanical arm

Page 21: Combinatorial Optimization

Solutions

Exact solutions

Heuristic algorithms

Finding subproblems for the problem

Page 22: Combinatorial Optimization

Exact Solution

Consider city 1 as the starting and ending point.

Generate all (n-1)! Permutations of cities.

Calculate cost of every permutation and keep track of minimum cost permutation.

Return the permutation with minimum cost.

Time Complexity: O(n!)

Page 23: Combinatorial Optimization

Heuristic Solution

The greedy algorithm can be used to give a goodbut not optimal solution in a reasonably shortamount of time.

The greedy algorithm heuristic says to pickwhatever is currently the best next stepregardless of whether that precludes good stepslater.

Page 24: Combinatorial Optimization

Dynamic Programming

Division of Problem into Sub-Problems

Memoization

Page 25: Combinatorial Optimization

An Example

Page 26: Combinatorial Optimization

An Example

Let the given set of vertices be {1, 2, 3, 4,….n}.Let us consider 1 as starting and ending point ofoutput.

For every other vertex i (other than 1), we findthe minimum cost path with 1 as the startingpoint, i as the ending point and all verticesappearing exactly once.

Page 27: Combinatorial Optimization

Let the cost of this path be cost(i), the cost of correspondingCycle would be cost(i) + dist(i, 1) where dist(i, 1) is the distancefrom i to 1. Finally, we return the minimum of all [cost(i) + dist(i,1)] values.

Let us define a term C(S, i) be the cost of the minimum cost path visiting each vertex in set S exactly once, starting at 1 and ending at i.We start with all subsets of size 2 and calculate C(S, i) for all subsets where S is the subset, then we calculate C(S, i) for all subsets S of size 3 and so on. Note that 1 must be present in every subset.

Page 28: Combinatorial Optimization

If size of S is 2, then

S must be {1, i}, C(S, i) = dist(1, i)

Else if size of S is greater than 2

C(S, i) = min { C(S-{i}, j) + dis(j, i)}

where j belongs to S, j != i and j != 1.

For a set of size n, we consider n-2 subsets each of size n-1 such that all subsets don’t have nth in them.

The total running time is O(n2*2n). The time complexity is much less than O(n!), but still exponential. Space required is also exponential. So this approach is also infeasible even for slightly higher number of vertices.

Page 29: Combinatorial Optimization

TSP Using Dynamic Programming

Page 30: Combinatorial Optimization
Page 31: Combinatorial Optimization

TSP Without Dynamic Programming

Page 32: Combinatorial Optimization
Page 33: Combinatorial Optimization

Sparse Graphs

For 2 cities

Page 34: Combinatorial Optimization

With Dynamic Programming

Page 35: Combinatorial Optimization

Without Dynamic Programming

Page 36: Combinatorial Optimization

Dense Graphs

For 6 cities

Page 37: Combinatorial Optimization

With Dynamic Programming

Page 38: Combinatorial Optimization

Without dynamic Programming

Page 39: Combinatorial Optimization

Conclusion

• When we have a limited set of targets tomeet, Tsp using Dynamic Programming isefficient.

• But when we have a considerable morenumber of targets this concept is not muchuseful.

Page 40: Combinatorial Optimization

Various scenarios

Page 41: Combinatorial Optimization

Connected Graph

Page 42: Combinatorial Optimization

Complete Graph

Page 43: Combinatorial Optimization

References

• Discrete Optimization". Elsevier. Jump up Jump up Cook, William. "Optimal TSP Tours". University of Waterloo.

• Fredman, M. L.; Willard, D. E. (1994), "Trans-dichotomous algorithms for minimum spanning trees and shortest paths", Journal of Computer and System Sciences

• Karger, David R.; Klein, Philip N.; Tarjan, Robert E. (1995), "A randomized linear-time algorithm to find minimum spanning trees", Journal of the Association for Computing Machinery

• Applegate, D. L.; Bixby, R. M.; Chvátal, V.; Cook, W. J. (2006), The Traveling Salesman Problem

• Bellman, R. (1962), "Dynamic Programming Treatment of the Travelling Salesman Problem", J. Assoc. Comput. Mach.