Add Heuristic a b C D E Switch Cost

Slides:



Advertisements
Similar presentations
Exact and heuristics algorithms
Advertisements

Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
Finite State Machine State Assignment for Area and Power Minimization Aiman H. El-Maleh, Sadiq M. Sait and Faisal N. Khan Department of Computer Engineering.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Data Mining CS 341, Spring 2007 Genetic Algorithm.
Algorithms for Smoothing Array CGH data
Iterative Improvement Algorithms
Given Connections Solution
Understanding the Resistor Color Code
Objective The student will be able to: solve two-step inequalities. SOL: A.5abc Designed by Skip Tyler, Varina High School.
Consecutive Numbers Algebra I.
Ranga Rodrigo April 6, 2014 Most of the sides are from the Matlab tutorial. 1.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
1 The Euclidean Non-uniform Steiner Tree Problem by Ian Frommer Bruce Golden Guruprasad Pundoor INFORMS Annual Meeting Denver, Colorado October 2004.
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
Chapter 7 Handling Constraints
Appendix B A BRIEF TOUR OF SOLVER Prescriptive Analytics
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
 Analysis Wrap-up. What is analysis?  Look at an algorithm and determine:  How much time it takes  How much space it takes  How much programming.
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
9-1 Quadratic Equations and Functions Warm Up Warm Up Lesson Presentation Lesson Presentation California Standards California StandardsPreview.
9-1 Quadratic Equations and Functions Solutions of the equation y = x 2 are shown in the graph. Notice that the graph is not linear. The equation y = x.
Rounding Using Significant figures. Another way of rounding is using significant figures.
Capacity Enhancement with Relay Station Placement in Wireless Cooperative Networks Bin Lin1, Mehri Mehrjoo, Pin-Han Ho, Liang-Liang Xie and Xuemin (Sherman)
EE459 I ntroduction to Artificial I ntelligence Genetic Algorithms Practical Issues: Selection.
BALANCING EQUATIONS NO2 - Balancing equations made easy.
Two-step Inequalities SOL 8.15 cont.. What is an inequality? An inequality is a mathematical sentence that compares expressions using: < less than > greater.
Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona M. Arafa 2016/3/111 Shang-Chi Wu.
The Implementation of Genetic Algorithms to Locate Highest Elevation By Harry Beddo.
Applications of Genetic Algorithms By Harry Beddo 3 rd Quarter.
Genetic Algorithm(GA)
Hirophysics.com The Genetic Algorithm vs. Simulated Annealing Charles Barnes PHY 327.
Dr. Alex Zelikovsky CSc 8550 William “Greg” Johnson.
A MapReduced Based Hybrid Genetic Algorithm Using Island Approach for Solving Large Scale Time Dependent Vehicle Routing Problem Rohit Kondekar BT08CSE053.
To install the four wires from the back of the coil machine, loosen the four knobs. Keep each wire in center under each knob, off to the side will allow.
1 Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations.
Genetic Algorithm (Knapsack Problem)
Scientific Research Group in Egypt (SRGE)
Using GA’s to Solve Problems
MAE 552 Heuristic Optimization
Chapter 10 Iterative Improvement
Balancing of Parallel Two-Sided Assembly Lines via a GA based Approach
Consecutive Numbers Algebra I.
Genetic Algorithm and Their Applications to Scheduling
An evolutionary approach to solving complex problems

Resource Allocation in Heterogeneous Computing Systems
Solving Inequalities (3-2)
PROBLEM SOLVING CSC 111.
Objective The student will be able to:
'Linear Hierarchical Models'
Downstream Power Back Off (DPBO)
Objective The student will be able to:
Building Fractal Landscapes
Downstream Power Back Off (DPBO)
R. Johnsonbaugh Discrete Mathematics 5th edition, 2001
Network Models 7-1.
Solving Systems of Equation by Substitution
Objective The student will be able to:
Heuristics Local Search
Exploring Genetic Algorithms Through the Iterative Prisoner's Dilemma
X y y = x2 - 3x Solutions of y = x2 - 3x y x –1 5 –2 –3 6 y = x2-3x.
Applications of Genetic Algorithms TJHSST Computer Systems Lab
Objective The student will be able to:
Md. Tanveer Anwar University of Arkansas
Biologically Inspired Computing: Operators for Evolutionary Algorithms
Objective The student will be able to:
Objective The student will be able to:
Orientation for Course Selection System
Presentation transcript:

Add Heuristic a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost 𝜹 𝒊, 𝒋 = 𝟏 𝒊𝒇 𝒖𝒔𝒆𝒓 𝒊 𝒄𝒐𝒏𝒏𝒆𝒄𝒕𝒆𝒅 𝒕𝒐 𝒔𝒘𝒊𝒕𝒄𝒉 𝒋 𝟎 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆 𝜶 𝒋 = 𝟏 𝒊𝒇 𝒔𝒘𝒊𝒕𝒄𝒉 𝒋 𝒊𝒔 𝒊𝒏𝒔𝒕𝒂𝒍𝒍𝒆𝒅 𝟎 𝑶𝑾 ∁ 𝒋 =𝒄𝒐𝒔𝒕 𝒐𝒇 𝒊𝒏𝒔𝒕𝒂𝒍𝒍𝒊𝒏𝒈 𝒔𝒘𝒊𝒕𝒄𝒉 𝒋 𝜷 𝒊, 𝒋 = cost of connecting user I to switch j 𝑲 𝒋 = maximum number of users connected switch j (13 in this case for all switches) 𝑴𝒊𝒏 𝒊 𝒋 𝜷 𝒊, 𝒋 𝜹 𝒊, 𝒋 + 𝒋 ∁ 𝒋 𝜶 𝒋 𝒔𝒕 𝒊 𝜹 𝒊, 𝒋 ≤ 𝑲 𝒋 𝜶 𝒋 𝒋 𝜹 𝒊, 𝒋 =𝟏 ∀𝒊

1st Iteration S = {a} a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost Total Cost = Cost of installing switch a + cost of connecting all users to switch a = 51

2nd Iteration S = {a, b} a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost Total Cost = 51 – 2 – 2 – 6 – 4 – 4 + 8 = 41 < 51

2nd Iteration S = {a, c} a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost Total cost = 51 – 1 – 5 – 1 – 1 – 6 – 1 + 4 = 40 < 51

2nd Iteration S = {a, d} a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost Total cost = 51 – 3 – 3 – 1 – 5 – 2 – 1 – 2 + 3 = 37< 51

2nd Iteration S = {a, e} a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost Total cost = 51 – 4 – 5 – 2 – 1 – 7 – 5 + 2 = 29 < 51 Cost of {a, b} = 41 Cost of {a, c} = 40 Cost of {a, d} = 37 Cost of {a, e} = 29 (highest reduction)

3rd Iteration S = {a, e, b} a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost Total cost = 29 – 1 – 2 + 8 = 34> 29 (Rejected)

3rd Iteration S = {a, e, c} a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost Total cost = 29 – 1 – 1 + 4 = 31 > 29 (Rejected)

3rd Iteration S = {a, e, d} a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost Total cost = 29 – 3 - 1 + 3 = 28 < 29 (Accepted)

4th Iteration S = {a, e, d, b} a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost Total cost = 28 – 1 + 8 = 35 > 28 (Rejected)

4th Iteration S = {a, e, d, c} a b C D E 1 5 3 7 2 9 4 6 8 10 11 12 13 Switch Cost Total cost = 28 – 1 + 4 = 33 > 28 (Rejected) The best solution is installing switches a, e and d

Genetics Algorithm

Genetics Algorithm Consider the following channel allocation problem shown in the figure on the right. The objective of the problem is to allocate 4 channels to 2 users. Each user on the left hand side can transmit on any of the channels indicated on the right hand side. If a user 𝒊 uses channel 𝒋 he/she will be able to transmit at a rate equal to 𝒄 𝒊, 𝒋 . The values of 𝒄 𝒊, 𝒋 are shown on the arrows connecting each user to the channel. It is required to allocate channels to users such as to maximize the total data rate while satisfying the following conditions: Each user can be allocated a maximum of three channels and minimum of 1 channel Each channel can be allocated to a maximum of one user. Write the objective function and the constrains Generate a population of 2 solutions and apply genetic algorithm

Genetics Algorithm 𝜹 𝒊, 𝒋 = 𝟏 𝒊𝒇 𝒖𝒔𝒆𝒓 𝒊 𝒄𝒐𝒏𝒏𝒆𝒄𝒕𝒆𝒅 𝒕𝒐 𝒄𝒉𝒂𝒏𝒏𝒆𝒍 𝒋 𝟎 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆 𝑴𝒂𝒙 𝒊 𝒋 𝒄 𝒊, 𝒋 𝜹 𝒊, 𝒋 𝒔𝒕 𝒊=𝟏 𝒊=𝟐 𝜹 𝒊, 𝒋 ≤𝟏 ∀𝒋∈ 𝟏, …, 𝟒 𝟏≤ 𝒋=𝟏 𝒋=𝟒 𝜹 𝒊, 𝒋 ≤𝟑 ∀𝒊∈ 𝟏, 𝟐

Genetics Algorithm (Generating random valid solutions) 𝜹 𝟏, 𝟏 , 𝜹 𝟏, 𝟐 , 𝜹 𝟏, 𝟑 , 𝜹 𝟏, 𝟒 , 𝜹 𝟐, 𝟏 , 𝜹 𝟐, 𝟐 , 𝜹 𝟐, 𝟑 , 𝜹 𝟐, 𝟒 𝒊 𝒋 𝒄 𝒊, 𝒋 𝜹 𝒊, 𝒋 Sol 1 𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 𝟕 +𝟑 +𝟑 =𝟏𝟑 Sol 2 𝟎 , 𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎, 𝟏 𝟔 + 𝟑 =𝟗 𝜹 𝒊, 𝒋 = 𝟏 𝒊𝒇 𝒖𝒔𝒆𝒓 𝒊 𝒄𝒐𝒏𝒏𝒆𝒄𝒕𝒆𝒅 𝒕𝒐 𝒄𝒉𝒂𝒏𝒏𝒆𝒍 𝒋 𝟎 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆 𝑴𝒂𝒙 𝒊 𝒋 𝒄 𝒊, 𝒋 𝜹 𝒊, 𝒋 𝒔𝒕 𝒊=𝟏 𝒊=𝟐 𝜹 𝒊, 𝒋 ≤𝟏 ∀𝒋∈ 𝟏, …, 𝟒 𝟏≤ 𝒋=𝟏 𝒋=𝟒 𝜹 𝒊, 𝒋 ≤𝟑 ∀𝒊∈ 𝟏, 𝟐

Genetics Algorithm (Crossover) 𝜹 𝟏, 𝟏 , 𝜹 𝟏, 𝟐 , 𝜹 𝟏, 𝟑 , 𝜹 𝟏, 𝟒 , 𝜹 𝟐, 𝟏 , 𝜹 𝟐, 𝟐 , 𝜹 𝟐, 𝟑 , 𝜹 𝟐, 𝟒 𝒊 𝒋 𝒄 𝒊, 𝒋 𝜹 𝒊, 𝒋 Sol 1 𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 𝟕 +𝟑 +𝟑 =𝟏𝟑 Sol 2 𝟎 , 𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎, 𝟏 𝟔 + 𝟑 =𝟗 Sol 3 𝟎 , 𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟏 ,𝟎, 𝟏 𝟔 + 𝟑 + 𝟑 =𝟏𝟐 Sol 4 𝟏 , 𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎, 𝟏 𝟕 + 𝟑 = 𝟏𝟎

Genetics Algorithm (Another Crossover Example) 𝜹 𝟏, 𝟏 , 𝜹 𝟏, 𝟐 , 𝜹 𝟏, 𝟑 , 𝜹 𝟏, 𝟒 , 𝜹 𝟐, 𝟏 , 𝜹 𝟐, 𝟐 , 𝜹 𝟐, 𝟑 , 𝜹 𝟐, 𝟒 𝒊 𝒋 𝒄 𝒊, 𝒋 𝜹 𝒊, 𝒋 Sol 1 𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 𝟕 +𝟑 +𝟑 =𝟏𝟑 Sol 2 𝟎 , 𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎, 𝟏 𝟔 + 𝟑 =𝟗 Sol 3 𝟎 , 𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟏 ,𝟎, 𝟏 𝟔 + 𝟑 + 𝟑 =𝟏𝟐 Sol 4 𝟏 , 𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎, 𝟏 𝟕 + 𝟑 = 𝟏𝟎 Sol 5 Sol 6 𝟎 ,𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 𝟔 + 𝟑 + 𝟑 = 𝟏𝟐

Genetics Algorithm (Another Crossover Example) 𝜹 𝟏, 𝟏 , 𝜹 𝟏, 𝟐 , 𝜹 𝟏, 𝟑 , 𝜹 𝟏, 𝟒 , 𝜹 𝟐, 𝟏 , 𝜹 𝟐, 𝟐 , 𝜹 𝟐, 𝟑 , 𝜹 𝟐, 𝟒 𝒊 𝒋 𝒄 𝒊, 𝒋 𝜹 𝒊, 𝒋 Sol 1 𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 𝟕 +𝟑 +𝟑 =𝟏𝟑 Sol 2 𝟎 , 𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎, 𝟏 𝟔 + 𝟑 =𝟗 Sol 3 𝟎 , 𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟏 ,𝟎, 𝟏 𝟔 + 𝟑 + 𝟑 =𝟏𝟐 Sol 4 𝟏 , 𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎, 𝟏 𝟕 + 𝟑 = 𝟏𝟎 Sol 5 Sol 6 𝟎 ,𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 𝟔 + 𝟑 + 𝟑 = 𝟏𝟐 Sol 7 𝟏 , 𝟎 , 𝟎,𝟏 ,𝟎 ,𝟎 ,𝟎, 𝟏 invalid as 4 channel is allocated to more than one user (users 1 and 2) so, this solution is not valid and discarded Sol 8 𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 invalid as there is no channel allocated to user 1 so, this solution is not valid and discarded

Genetics Algorithm (mutation example) 𝜹 𝟏, 𝟏 , 𝜹 𝟏, 𝟐 , 𝜹 𝟏, 𝟑 , 𝜹 𝟏, 𝟒 , 𝜹 𝟐, 𝟏 , 𝜹 𝟐, 𝟐 , 𝜹 𝟐, 𝟑 , 𝜹 𝟐, 𝟒 𝒊 𝒋 𝒄 𝒊, 𝒋 𝜹 𝒊, 𝒋 Sol 1 𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 𝟕 +𝟑 +𝟑 =𝟏𝟑 Sol 2 𝟎 , 𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎, 𝟏 𝟔 + 𝟑 =𝟗 Sol 3 𝟎 , 𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟏 ,𝟎, 𝟏 𝟔 + 𝟑 + 𝟑 =𝟏𝟐 Sol 4 𝟏 , 𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎, 𝟏 𝟕 + 𝟑 = 𝟏𝟎 Sol 5 Sol 6 𝟎 ,𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 𝟔 + 𝟑 + 𝟑 = 𝟏𝟐 Sol 7 𝟏 , 𝟎 , 𝟎,𝟏 ,𝟎 ,𝟎 ,𝟎, 𝟏 invalid as 4 channel is allocated to more than one user (users 1 and 2) so, this solution is not valid and discarded Sol 8 𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 invalid as there is no channel allocated to user 1 so, this solution is not valid and discarded Sol 9 𝟏 , 𝟏 ,𝟎 ,𝟎 ,𝟎 ,𝟎 ,𝟎, 𝟏 𝟕+ 𝟓 + 𝟑 = 𝟏𝟓 Sol 10 𝟏 ,𝟎 ,𝟏 ,𝟎 ,𝟎 ,𝟏 ,𝟎 , 𝟏 𝟕 + 𝟔 + 𝟑 + 𝟑 = 𝟏𝟗