cas 721 course project implementing branch and bound, and tabu search for combinatorial computing...
TRANSCRIPT
![Page 1: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/1.jpg)
CAS 721CAS 721Course ProjectCourse Project
Implementing Branch and Bound, and TabImplementing Branch and Bound, and Tabu search for combinatorial computing prou search for combinatorial computing pro
blemblem
By Ho Fai Ko (9700749)By Ho Fai Ko (9700749)
![Page 2: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/2.jpg)
OverviewOverview
Background of problemBackground of problem Background of algorithmsBackground of algorithms
Branch and BoundBranch and Bound Tabu SearchTabu Search
Implementation detailImplementation detail Analysis of algorithmAnalysis of algorithm
![Page 3: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/3.jpg)
Chip Realization ProcessChip Realization ProcessRequirements
Specification
Design Implementation
Chip Fabrication
Good chips
Source: Essentials of Electronic Testing, Kluwer 2000
Audit
Design verification
Manufacturing test
![Page 4: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/4.jpg)
Manufacturing TestManufacturing Test Identify faulty chips before Identify faulty chips before
shipping them to customersshipping them to customers During volume production During volume production
phase for mature process phase for mature process technologiestechnologies
Improve yield through fault Improve yield through fault diagnosisdiagnosis During yield ramp phase for During yield ramp phase for
new process technologiesnew process technologies * Technology yield learning rates
* Source Intel corporation
Defect density
![Page 5: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/5.jpg)
Introduction of SOCIntroduction of SOC System-on-a-chip (SOC) integrates System-on-a-chip (SOC) integrates
multiple functional components multiple functional components (cores) on a single silicon die(cores) on a single silicon die
Sample SOC*Sample SOC* 8 million-gate design8 million-gate design 2 ARM processors and 8 ADSL cores2 ARM processors and 8 ADSL cores
Compared to board-level system, Compared to board-level system, SOCs are:SOCs are: Smaller and fasterSmaller and faster More reliable, More reliable, lower power and costlower power and cost Facing more challenges for testFacing more challenges for test
*Source: A DFT and Test Generation Methodology for a Large SoC Design , SNUG Europe 2001
![Page 6: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/6.jpg)
Testing cores in SOCsTesting cores in SOCs
To test a core in a SOCTo test a core in a SOC Test patterns are applied to the circuit-under-test (CUT)Test patterns are applied to the circuit-under-test (CUT) Test responses from the CUT are obtained for failure Test responses from the CUT are obtained for failure
analysisanalysis Questions to be answered:Questions to be answered:
How to apply test patterns to CUT?How to apply test patterns to CUT? How to obtain test responses from CUT?How to obtain test responses from CUT?
Problems:Problems: Limited number of primary inputs and outputs on chipsLimited number of primary inputs and outputs on chips
Solution:Solution: Using test access mechanism (TAM) to transport test dataUsing test access mechanism (TAM) to transport test data
![Page 7: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/7.jpg)
Background of problemBackground of problem
TAM
outputs
Primary Outputs
C1 C3 C4
C2
C7
C8
C5 C6 C9
Primary Inputs
TAM
Inputs
![Page 8: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/8.jpg)
Problem formulationProblem formulation
Given m TAM linesGiven m TAM lines Given n cores in a SOCGiven n cores in a SOC Given connectivity matrix C, such thatGiven connectivity matrix C, such that
C[i][j] = 1 if TAM (i) can cover core (j)C[i][j] = 1 if TAM (i) can cover core (j) Find the assignment for each TAM line to cover all thFind the assignment for each TAM line to cover all th
e cores in the SOC such thate cores in the SOC such that Number of TAM lines needed is sufficiently smallNumber of TAM lines needed is sufficiently small
Objective function: min sum c[i][j] for all i and jObjective function: min sum c[i][j] for all i and j Subject to:Subject to:
c[i][j] <= C[i][j]c[i][j] <= C[i][j] Sum[i=1..m] c[i][j] >= 1Sum[i=1..m] c[i][j] >= 1 c[i][j] = 0 or 1c[i][j] = 0 or 1
![Page 9: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/9.jpg)
Branch and Bound (BB)Branch and Bound (BB)
A general exhaustive search algorithmA general exhaustive search algorithm Can be implemented as a backtracking algorithmCan be implemented as a backtracking algorithm
Depth-first search approachDepth-first search approach Can be implemented using a priority queueCan be implemented using a priority queue
Breadth-first search approachBreadth-first search approach Terminate when lower bound of solution is found, or Terminate when lower bound of solution is found, or
when all possible solution are checkedwhen all possible solution are checked Can speed up algorithm by carefully choosing the Can speed up algorithm by carefully choosing the
branch conditionbranch condition
![Page 10: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/10.jpg)
Tabu search (TS)Tabu search (TS) Originally developed by Glover in 1986Originally developed by Glover in 1986 History-based heuristic search techniqueHistory-based heuristic search technique Prohibits (Tabu) the reversal of previous movesProhibits (Tabu) the reversal of previous moves Encourage exploration of parts of the solution space Encourage exploration of parts of the solution space
that have not been visited previouslythat have not been visited previously Speed and quality of solution depends on:Speed and quality of solution depends on:
Choice of initial solutionChoice of initial solution The size, variability, and adaptability of the Tabu memory The size, variability, and adaptability of the Tabu memory
How it works:How it works: Begins by marching to a local optimumBegins by marching to a local optimum Since recent moved are tabu, it is forced to search in new sSince recent moved are tabu, it is forced to search in new s
olution spaceolution space Do not guarantee to reach the optimal solutionDo not guarantee to reach the optimal solution
![Page 11: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/11.jpg)
Why choose Tabu search?Why choose Tabu search?
Other heuristics take advantage on exploring the relOther heuristics take advantage on exploring the relationships between decisionsationships between decisions Simulated AnnealingSimulated Annealing Genetic AlgorithmGenetic Algorithm
Decision on a variable c[i][j] = 0 or 1 does not depenDecision on a variable c[i][j] = 0 or 1 does not depends on the decisions for other variablesds on the decisions for other variables
The only concern for this problem is to not go backwThe only concern for this problem is to not go backward so often when searching in solution spaceard so often when searching in solution space
Thus, by changing the Tabu length, the search directThus, by changing the Tabu length, the search direction from Tabu search can be better directedion from Tabu search can be better directed
![Page 12: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/12.jpg)
Implementation – Data structureImplementation – Data structure
Double link listDouble link list Store location of 1’s in the sparse matrixStore location of 1’s in the sparse matrix Double link to speed up search processDouble link to speed up search process
Priority queuePriority queue Simple PUSH and POP operation to the queueSimple PUSH and POP operation to the queue For branch and boundFor branch and bound
Breadth-first-search techniqueBreadth-first-search technique For Tabu searchFor Tabu search
Act as a FIFO queue with variable lengthAct as a FIFO queue with variable length
![Page 13: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/13.jpg)
Implementation – ProblemImplementation – Problem
Randomly generate a problemRandomly generate a problem ParametersParameters
m: Number of TAM lines availablem: Number of TAM lines available n: Number of Cores to be covered in a SOCn: Number of Cores to be covered in a SOC K: A TAM line has to cover at least K coresK: A TAM line has to cover at least K cores
The smaller K is, the less likely to find a solutionThe smaller K is, the less likely to find a solution K <= nK <= n
To ensure randomness of the problemTo ensure randomness of the problem If use a single random number generator, the problem is If use a single random number generator, the problem is
skewedskewed Use multiple generators to generate problem iterativelyUse multiple generators to generate problem iteratively
![Page 14: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/14.jpg)
Implementation - ProblemImplementation - Problem Example: n = 10, and K = 5Example: n = 10, and K = 5 Single generatorSingle generator
Choose random number R between K and nChoose random number R between K and n How to randomly distribute the R 1’s in n column?How to randomly distribute the R 1’s in n column?
Multiple generatorsMultiple generators Random select a sample size 1 <= S <= n for 1 iterationRandom select a sample size 1 <= S <= n for 1 iteration Randomly decide if a 1 is assigned to a columnRandomly decide if a 1 is assigned to a column If total 1’s are not enough (i.e. < K), repeatIf total 1’s are not enough (i.e. < K), repeat
Iteration | Sample size | Selected size | |C|Iteration | Sample size | Selected size | |C| 1 |1 | 4 | 4 | 3 | 3 3 | 3 2 |2 | 2 | 2 | 1 | 4 1 | 4 3 |3 | 6 | 6 | 4 | 8 4 | 8
![Page 15: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/15.jpg)
Implementation – BBImplementation – BB Use priority queue and breadth first search techniquUse priority queue and breadth first search techniqu
e for branch and bounde for branch and bound The lower bound:The lower bound:
The value of objective function has to be >= nThe value of objective function has to be >= n If the constraint is satisfied:If the constraint is satisfied:
Sum[i=1..m] c[i][j] >= 1 for all jSum[i=1..m] c[i][j] >= 1 for all j Solution is foundSolution is found
The branching condition:The branching condition: The constraint to the problem:The constraint to the problem:
c[i][j] <= C[i][j]c[i][j] <= C[i][j] If constraint is violated, it is a dead endIf constraint is violated, it is a dead end
If the cost of unfinished solution + number of cores that yet If the cost of unfinished solution + number of cores that yet to be covered is already higher than the best one found so fto be covered is already higher than the best one found so far, declare it as dead endar, declare it as dead end
![Page 16: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/16.jpg)
Implementation - TSImplementation - TS Use a FIFO queue with length specified as Tabu listUse a FIFO queue with length specified as Tabu list Start by trying to find an initial solution that satisfies Start by trying to find an initial solution that satisfies
all constraints without worrying about optimalityall constraints without worrying about optimality Length of Tabu list is changed every 20 iterationLength of Tabu list is changed every 20 iteration
To helps exploring new solution spaceTo helps exploring new solution space For each iteration:For each iteration:
Find the column with most 1’s to changeFind the column with most 1’s to change Check changes for each element in the column for constraiCheck changes for each element in the column for constrai
nt violationnt violation If not violated, check if solution is betterIf not violated, check if solution is better If is better, keep the current best solution, and Tabu the movIf is better, keep the current best solution, and Tabu the mov
e to avoid reversal movese to avoid reversal moves
![Page 17: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/17.jpg)
Program outputProgram output
![Page 18: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/18.jpg)
AnalysisAnalysis
The size of solution space is 2^(mn)The size of solution space is 2^(mn) Even with really good branching conditionEven with really good branching condition
The size of solution space is 2^(Kn)The size of solution space is 2^(Kn) Still really largeStill really large
Thus, execution time increases exponentiallyThus, execution time increases exponentially For Branch and boundFor Branch and bound
Impossible to perform exhaustive searchImpossible to perform exhaustive search For Tabu searchFor Tabu search
FastFast Does not know optimal solution is reached unless it reacheDoes not know optimal solution is reached unless it reache
s the lower bound of the solution spaces the lower bound of the solution space Does not guarantee the optimality of solutionDoes not guarantee the optimality of solution
![Page 19: CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko (9700749)](https://reader036.vdocument.in/reader036/viewer/2022083006/56649f355503460f94c53a81/html5/thumbnails/19.jpg)
SummarySummary
Implemented two algorithms for a combinatorial comImplemented two algorithms for a combinatorial computing problemputing problem Branch and BoundBranch and Bound
Exhaustive searchExhaustive search Execution time grows exponentiallyExecution time grows exponentially
Tabu searchTabu search FastFast Does not guarantee to reach optimalityDoes not guarantee to reach optimality