ELEC 5270-001/6270-001 (Fall 2006) Low-Power Design of Electronic Circuits (Formerly ELEC 5970-003/6970-003) Linear Programming - PowerPoint PPT Presentation

About This Presentation
Title:

ELEC 5270-001/6270-001 (Fall 2006) Low-Power Design of Electronic Circuits (Formerly ELEC 5970-003/6970-003) Linear Programming

Description:

Title: Slide 1 Author: Vishwani Agrawal Last modified by: Prathima Created Date: 8/13/2004 4:53:40 PM Document presentation format: On-screen Show Company – PowerPoint PPT presentation

Number of Views:156
Avg rating:3.0/5.0
Slides: 28
Provided by: Vishwani3
Category:

less

Transcript and Presenter's Notes

Title: ELEC 5270-001/6270-001 (Fall 2006) Low-Power Design of Electronic Circuits (Formerly ELEC 5970-003/6970-003) Linear Programming


1
ELEC 5270-001/6270-001 (Fall 2006)Low-Power
Design of Electronic Circuits(Formerly ELEC
5970-003/6970-003) Linear Programming A
Mathematical Optimization Technique
  • Vishwani D. Agrawal
  • James J. Danaher Professor
  • Department of Electrical and Computer Engineering
  • Auburn University, Auburn, AL 36849
  • http//www.eng.auburn.edu/vagrawal
  • vagrawal_at_eng.auburn.edu

2
What is Linear Programming
  • Linear programming (LP) is a mathematical method
    for selecting the best solution from the
    available solutions of a problem.
  • Method
  • State the problem and define variables whose
    values will be determined.
  • Develop a linear programming model
  • Write the problem as an optimization formula (a
    linear expression to be minimized or maximized)
  • Write a set of linear constraints
  • An available LP solver (computer program) gives
    the values of variables.

3
Types of LPs
  • LP all variables are real.
  • ILP all variables are integers.
  • MILP some variables are integers, others are
    real.
  • A reference
  • S. I. Gass, An Illustrated Guide to Linear
    Programming, New York Dover, 1990.

4
A Single-Variable Problem
  • Consider variable x
  • Problem find the maximum value of x subject to
    constraint, 0 x 15.
  • Solution x 15.

5
Single Variable Problem (Cont.)
  • Consider more complex constraints
  • Maximize x, subject to following constraints
  • x 0 (1)
  • 5x 75 (2)
  • 6x 30 (3)
  • x 10 (4)

0 5 10 15 x
(1)
(2)
(3)
(4)
All constraints satisfied
Solution, x 5
6
A Two-Variable Problem
  • Manufacture of x1 chairs and x2 tables
  • Maximize profit, P 45x1 80x2 dollars
  • Subject to resource constraints
  • 400 boards of wood, 5x1 20x2 400 (1)
  • 450 man-hours of labor, 10x1 15x2 450 (2)
  • x1 0 (3)
  • x2 0 (4)

7
Solution Two-Variable Problem
40 30 20 10 0
P 2200
Best solution 24 chairs, 14 tables Profit
4524 8014 2200 dollars
(1)
Tables, x2
(24, 14)
P 0
0 10 20 30 40 50
60 70 80 90
Chairs, x1
increasing
(2)
Profit
decresing
8
Change Chair Profit, 64/Unit
  • Manufacture of x1 chairs and x2 tables
  • Maximize profit, P 64x1 80x2 dollars
  • Subject to resource constraints
  • 400 boards of wood, 5x1 20x2 400 (1)
  • 450 man-hours of labor, 10x1 15x2 450 (2)
  • x1 0 (3)
  • x2 0 (4)

9
Solution 64 Profit/Chair
P 2880
40 30 20 10 0
Best solution 45 chairs, 0 tables Profit 6445
800 2880 dollars
(1)
Tables, x2
(24, 14)
P 0
0 10 20 30 40 50
60 70 80 90
Chairs, x1
(2)
increasing
Profit
decresing
10
Primal-Dual Problems
  • Primal problem
  • Variables
  • x1 (number of chairs)
  • x2 (number of tables)
  • Maximize profit 45x1 80x2
  • Subject to
  • 5x1 20x2 400
  • 10x1 15x2 450
  • x1 0
  • x2 0
  • Solution
  • x1 24 chairs, x2 14 tables
  • Profit 2200
  • Dual Problem
  • Variables
  • w1 ( cost/board of wood)
  • w2 ( cost/man-hour)
  • Minimize cost 400w1 450w2
  • Subject to
  • 5w1 10w2 45
  • 20w1 15w2 80
  • w1 0
  • w2 0
  • Solution
  • w1 1, w2 4
  • Cost 2200

11
The Duality Theorem
  • If the primal has a finite optimal solution, so
    does the dual, and the optimum values of the
    objective functions are equal.

12
LP for n Variables
n minimize S cj xj Objective
function j 1
n subject to S aij xj bi, i 1,
2, . . ., m j 1
n S cij xj di, i 1, 2, . . .,
p j 1
Variables xj Constants cj, aij, bi, cij, di
13
Algorithms for Solving LP
  • Simplex method
  • G. B. Dantzig, Linear Programming and Extension,
    Princeton, New Jersey, Princeton University
    Press, 1963.
  • Ellipsoid method
  • L. G. Khachiyan, A Polynomial Algorithm for
    Linear Programming, Soviet Math. Dokl., vol. 20,
    pp. 191-194, 1984.
  • Interior-point method
  • N. K. Karmarkar, A New Polynomial-Time Algorithm
    for Linear Programming, Combinatorica, vol. 4,
    pp. 373-395, 1984.
  • Course website of Prof. Lieven Vandenberghe
    (UCLA), http//www.ee.ucla.edu/ee236a/ee236a.html

14
Basic Ideas of Solution methods
Extreme points
Extreme points
Objective function
Objective function
Constraints
Constraints
Interior-point methods Successively iterate
with interior spaces of analytic convex
boundaries.
Simplex search on extreme points.
15
Integer Linear Programming (ILP)
  • Variables are integers.
  • Complexity is exponential higher than LP.
  • LP relaxation
  • Convert all variables to real, preserve ranges.
  • LP solution provides guidance.
  • Rounding LP solution can provide a non-optimal
    solution.

16
ILP Example Test Minimization
  • A combinational circuit has n test vectors that
    detect m faults. Each test detects a subset of
    faults. Find the smallest subset of test vectors
    that detects all m faults.
  • ILP model
  • Assign an integer ti e 0,1 variable to ith test
    vector such that ti 1, if we select ti,
    otherwise ti 0.
  • Define an integer constant fij e 0,1 such that
    fij 1, if ith vector detects jth fault,
    otherwise fij 0. Values of constants fij are
    determined by fault simulation.

17
Test Minimization by ILP
n minimize S ti Objective function i1
n subject to S fij ti 1, j 1, 2, .
. ., m i1

18
3V3F A 3-Vector 3-Fault Example
Test vector i
Variables t1, t2, t3 e 0,1 Minimize t1 t2
t3 Subject to t1 t2 1 t2 t3 1 t1
t3 1
fij i1 i2 i3
j1 1 1 0
j2 0 1 1
j3 1 0 1
Fault j
19
3V3F Solution Space
t3
ILP solutions (optimum)
1
Non-optimum solution
LP solution (0.5, 0.5, 0.5) and iterative
rounding
t2
1
1
t1
20
Characteristics of ILP
  • Worst-case complexity is exponential in number of
    variables.
  • Linear programming (LP) relaxation, where integer
    variables are treated as real, gives a lower
    bound on the objective function.
  • Recursive rounding of relaxed LP solution to
    nearest integers gives an approximate solution to
    the ILP problem.
  • K. R. Kantipudi and V. D. Agrawal, A Reduced
    Complexity Algorithm for Minimizing N-Detect
    Tests, Proc. 20th International Conf. VLSI
    Design, January 2007, pp. 492-497.

21
3V3F LP Relaxation and Rounding
ILP Variables t1, t2, t3 e 0,1 Minimize t1
t2 t3 Subject to t1 t2 1 t2 t3
1 t1 t3 1
  • LP relaxation t1, t2, t3 e (0.0, 1.0)
  • Solution t1 t2 t3 0.5
  • Iterative rounding
  • round one variable, t1 1.0
  • Two-variable LP problem
  • Minimize t2 t3
  • subject to t2 t3 1.0
  • LP solution t2 t3 0.5
  • (2) round a variable, t2 1.0
  • ILP constraints are satisfied
  • solution is t1 1, t2 1, t3 0

22
Recursive Rounding Algorithm
  1. Obtain a relaxed LP solution. Stop if each
    variable in the solution is an integer.
  2. Round the variable closest to an integer.
  3. Remove any constraints that are now
    unconditionally satisfied.
  4. Go to step 1.

23
Recursive Rounding
  • ILP has exponential complexity.
  • Recursive rounding
  • ILP is transformed into k LPs with progressively
    reducing number of variables.
  • Number of LPs, k, is the size of the final
    solution, i.e., the number of non-zero variables
    in the test minimization problem.
  • Recursive rounding complexity is k O(np), where
    k n, n is number of variables.

24
Four-Bit ALU Circuit
Initial vectors ILP ILP Recursive rounding Recursive rounding
Initial vectors Vectors CPU s Vectors CPU s
285 14 0.65 14 0.42
400 13 1.07 13 1.00
500 12 4.38 13 3.00
1,000 12 4.17 12 3.00
5,000 12 12.95 12 9.00
10,000 12 34.61 12 17.0
16,384 12 87.47 12 37.0
25
CPU Time ILP vs. Recursive Rounding
100 75 50 25 0
ILP Recursive Rounding
CPU s
0 5,000 10,000 15,000 Vectors
26
N-Detect Tests (N 5)
Circuit Unoptimized vectors Relaxed LP/Recur. rounding Relaxed LP/Recur. rounding Relaxed LP/Recur. rounding ILP (exact) ILP (exact)
Circuit Unoptimized vectors Lower bound Min. vectors CPU s Min. vectors CPU s
c432 608 196.38 197 1.0 197 1.0
c499 379 260.00 260 1.2 260 2.3
c880 1,023 125.97 128 14.0 127 881.8
c1355 755 420.00 420 3.2 420 4.4
c1908 1,055 543.00 543 4.6 543 6.9
c2670 959 477.00 477 4.7 477 7.2
c3540 1,971 467.25 477 72.0 471 20008.5
c5315 1,079 374.33 377 18.0 376 40.7
c6288 243 52.52 57 39.0 57 34740.0
c7552 2,165 841.00 841 52.0 841 114.3
27
Finding LP/ILP Solvers
  • R. Fourer, D. M. Gay and B. W. Kernighan, AMPL A
    Modeling Language for Mathematical Programming,
    South San Francisco, California Scientific
    Press, 1993. Several of programs described in
    this book are available to Auburn users.
  • MATLAB?
  • Search the web. Many programs with small number
    of variables can be downloaded free.
Write a Comment
User Comments (0)
About PowerShow.com