Fundamental Algorithms for System Modeling, Analysis, and Optimization

Similar documents
a b v a v b v c v = a d + bd +c d +ae r = p + a 0 s = r + b 0 4 ac + ad + bc + bd + e 5 = a + b = q 0 c + qc 0 + qc (a) s v (b)

Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals

INTEGRALS. Chapter 7. d dx. 7.1 Overview Let d dx F (x) = f (x). Then, we write f ( x)

HIGHER ORDER DIFFERENTIAL EQUATIONS

Last time: introduced our first computational model the DFA.

COMP108 Algorithmic Foundations

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, *

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

CIVL 8/ D Boundary Value Problems - Rectangular Elements 1/7

TOPIC 5: INTEGRATION

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

Section 3: Antiderivatives of Formulas

SOLVED EXAMPLES. be the foci of an ellipse with eccentricity e. For any point P on the ellipse, prove that. tan

Present state Next state Q + M N

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA.

Constructive Geometric Constraint Solving

MULTIPLE-LEVEL LOGIC OPTIMIZATION II

Logarithms. Secondary Mathematics 3 Page 164 Jordan School District

1 Introduction to Modulo 7 Arithmetic

Garnir Polynomial and their Properties

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

(a) v 1. v a. v i. v s. (b)

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

Binomials and Pascal s Triangle

Seven-Segment Display Driver

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued...

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)

Limits Indeterminate Forms and L Hospital s Rule

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

Chapter 16. 1) is a particular point on the graph of the function. 1. y, where x y 1

ECE 407 Computer Aided Design for Electronic Systems. Instructor: Maria K. Michael. Overview. CAD tools for multi-level logic synthesis:

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

Instructions for Section 1

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

Formal Concept Analysis

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

u r du = ur+1 r + 1 du = ln u + C u sin u du = cos u + C cos u du = sin u + C sec u tan u du = sec u + C e u du = e u + C

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation

Minimum Spanning Trees

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

Problem solving by search

Single Correct Type. cos z + k, then the value of k equals. dx = 2 dz. (a) 1 (b) 0 (c)1 (d) 2 (code-v2t3paq10) l (c) ( l ) x.

CSC Design and Analysis of Algorithms. Example: Change-Making Problem

This Week. Computer Graphics. Introduction. Introduction. Graphics Maths by Example. Graphics Maths by Example

Weighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

Construction 11: Book I, Proposition 42

, between the vertical lines x a and x b. Given a demand curve, having price as a function of quantity, p f (x) at height k is the curve f ( x,

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

Basic Polyhedral theory

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

u x v x dx u x v x v x u x dx d u x v x u x v x dx u x v x dx Integration by Parts Formula

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

( ) Differential Equations. Unit-7. Exact Differential Equations: M d x + N d y = 0. Verify the condition

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals

EE1000 Project 4 Digital Volt Meter

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

CONTINUITY AND DIFFERENTIABILITY

Multi-Section Coupled Line Couplers

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

Ch 1.2: Solutions of Some Differential Equations

CS September 2018

Fourier Transforms and the Wave Equation. Key Mathematics: More Fourier transform theory, especially as applied to solving the wave equation.

8Algebraic UNCORRECTED SAMPLE PAGES. techniques. What you will learn. Australian curriculum. Chapter 8A 8B 8C 8D 8E 8F

Exercise sheet 6: Solutions

PH427/PH527: Periodic systems Spring Overview of the PH427 website (syllabus, assignments etc.) 2. Coupled oscillations.

( ) Geometric Operations and Morphing. Geometric Transformation. Forward v.s. Inverse Mapping. I (x,y ) Image Processing - Lesson 4 IDC-CG 1

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

Integration by Parts

AP Calculus BC Problem Drill 16: Indeterminate Forms, L Hopital s Rule, & Improper Intergals

INTEGRATION BY PARTS

Algebra 2 Semester 1 Practice Final

MATHEMATICS FOR MANAGEMENT BBMP1103


UNCORRECTED SAMPLE PAGES 4-1. Naming fractions KEY IDEAS. 1 Each shape represents ONE whole. a i ii. b i ii

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

COHORT MBA. Exponential function. MATH review (part2) by Lucian Mitroiu. The LOG and EXP functions. Properties: e e. lim.

The Theory of Small Reflections

10. Limits involving infinity

Calculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved.

University of Sioux Falls. MAT204/205 Calculus I/II

1 Finite Automata and Regular Expressions

Section 11.6: Directional Derivatives and the Gradient Vector

Calculus Revision A2 Level

IIT JEE MATHS MATRICES AND DETERMINANTS

SECTION A STUDENT MATERIAL. Part 1. What and Why.?

Note If the candidate believes that e x = 0 solves to x = 0 or gives an extra solution of x = 0, then withhold the final accuracy mark.

CS 241 Analysis of Algorithms

Transcription:

Fundmntl Algorithms for Sstm Modling, Anlsis, nd Optimiztion Edwrd A. L, Jijt Rohowdhur, Snjit A. Sshi UC Brkl EECS 144/244 Fll 2011 Copright 2010-11, E. A. L, J. Rohowdhur, S. A. Sshi, All rights rsrvd L 11: Booln Algr nd Logi Optimiztion- 2 Thnks to S. Dvds, K. Kutzr, S. Mlik, R. Rutnr for svrl slids Multi-lvl Logi Optimiztion: Outlin Ovrviw of Multi-lvl Optimiztion: An Empl Cor Conpts: Booln Funtion Domposition Booln nd Algri Division Idntifing Divisors EECS 144/244, UC Brkl: 2

Rprsnttion: Booln Ntwork Nods lld with SOP prssions + EECS 144/244, UC Brkl: 3 Booln Ntwork, Eplind It s grph: Primr inputs (vrils) Primr outputs Intrmdit nods (in SOP form in trms of its inputs) Qulit of ntwork: r, dl, msurd in trms of #(litrls), dpth, EECS 144/244, UC Brkl: 4

Th.-Indpndnt Multi-Lvl Optimiztion: Oprtions on Booln Ntwork Involvs prforming th following oprtions itrtivl until good nough rsult is otind: 1. Simplifition Minimizing two-lvl logi funtion (SOP for singl nod) 2. Elimintion Sustituting on prssion into nothr. 3. Domposition Eprssing singl SOP with 2 or mor simplr forms 4. Etrtion Finding & pulling out suprssions ommon to mn nods 5. Sustitution Lik trtion, ut nods in th ntwork r r-usd EECS 144/244, UC Brkl: 5 Empl (du to G. D Mihli) d v = d + d + d + p = + d r = p + s = r + t = + d + + d + w q = + u = q + q + q z #litrls = 33, dpth = 3 EECS 144/244, UC Brkl: 6

Empl: Elimintion d v = d + d + d + p = + d r = p + s = r + t = + d + + d + w q = + u = q + q + q z #litrls = 33, dpth = 3 EECS 144/244, UC Brkl: 7 Empl: Elimint nod r d v = d + d + d + p = + d s = p + + t = + d + + d + w q = + u = q + q + q z #litrls = 32, dpth = 2 EECS 144/244, UC Brkl: 8

Empl: Simplifition d v = d + d + d + p = + d s = p + + t = + d + + d + w q = + u = q + q + q z #litrls = 32, dpth = 2 EECS 144/244, UC Brkl: 9 Empl: Simplifing nod u d v = d + d + d + p = + d s = p + + t = + d + + d + w q = + u = q + z #litrls = 28, dpth = 2 EECS 144/244, UC Brkl: 10

Empl: Domposition d v = d + d + d + p = + d s = p + + t = + d + + d + w q = + u = q + z #litrls = 28, dpth = 2 EECS 144/244, UC Brkl: 11 Empl: Domposing nod v j = + + v = jd + w d p = + d s = p + + t = + d + + d + q = + u = q + z #litrls = 27, dpth = 2 EECS 144/244, UC Brkl: 12

Empl: Etrtion j = + + v = jd + w d p = + d s = p + + t = + d + + d + q = + u = q + z #litrls = 27, dpth = 2 EECS 144/244, UC Brkl: 13 Empl: Etrting from p nd t j = + + v = jd + w p = k s = p + + d k = + d t = k + k + q = + u = q + z #litrls = 23, dpth = 3 EECS 144/244, UC Brkl: 14

Empl: Wht nt? Cn w improv furthr? j = + + v = jd + w p = k s = p + + d k = + d t = k + k + q = + u = q + z #litrls = 23, dpth = 3 EECS 144/244, UC Brkl: 15 Whih Oprtions Do W Know How to Do? 1. Simplifition Minimizing two-lvl logi funtion (SOP for singl nod) 2. Elimintion Sustituting on prssion into nothr. 3. Domposition Eprssing singl SOP with 2 or mor simplr forms 4. Etrtion Finding & pulling out suprssions ommon to mn nods 5. Sustitution Lik trtion, ut nods in th ntwork r r-usd EECS 144/244, UC Brkl: 16

Domposition Ftoring/Division Strting with SOP Form f = + d + + d + W wnt to gnrt n quivlnt Ftord form f = ( + ) ( + d) + Rson: Ftord forms r nturl multi-lvl rprsnttions tr-lik prssions To do ftoring, w nd to Idntif divisors Prform division EECS 144/244, UC Brkl: 17 Divisors nd Domposition Givn Booln funtion F, w wnt to writ it s F = D. Q + R whr D Divisor, Q Quotint, R Rmindr Domposition: Srhing for divisors whih r ommon to mn funtions in th ntwork idntif divisors whih r ommon to svrl funtions introdu ommon divisor s nw nod r-prss isting nods using th nw divisor EECS 144/244, UC Brkl: 18

Topis Wht is division? Booln vs. Algri How to prform division How to idntif divisors EECS 144/244, UC Brkl: 19 Booln Division Givn Booln funtion F, w wnt to writ it s F = D. Q + R Dfinition: D is Booln divisor of F if Q nd R ist suh tht F = DQ + R, DQ 0. (F 0) D is sid to ftor of F if, D is divisor of F nd in ddition, R = 0; i.., F = DQ. EECS 144/244, UC Brkl: 20

Booln Division: K Rsults D is ftor of F iff F. D = 0 ON-SET(D) ontins ON-SET(F) F. D!= 0 iff D is divisor of F How mn possil ftors D n thr for givn F? EECS 144/244, UC Brkl: 21 Booln Division: Proof Ids D is ftor of F iff F. D = 0 (onl if prt): F = DQ, so F.D = 0 (if prt): Givn tht F.D = 0, F D, so F = DF, or F =D(F+X) whr X.D = 0. Thus, F = DH for som H. F. D!= 0 iff D is divisor of F (if): F = DQ + R, FD = DQ + DR, sin DQ!= 0, FD!= 0 (onl if): FD!= 0 nd F = FD + FD, tk Q=F+d, R=FD, whr dd = 0. How mn possil ftors D n thr for givn F? Doul ponntil in numr of vrils EECS 144/244, UC Brkl: 22

Algri Modl Id: Prform division using onl th ruls (ioms) of rl numrs, not ll of Booln lgr Rl Numrs. =. + = +.(.) = (.). +(+) = (+)+.(+) =. +..1 =.0 = 0 +0 = Booln Algr. =. + = +.(.) = (.). +(+) = (+)+.(+) =. +..1 =.0 = 0 +0 = +(.) = (+). (+) + = 1. = 0. = += +1 = 1 + =.(+) = EECS 144/244, UC Brkl: 23 Algri Division A litrl nd its omplmnt r trtd s unrltd Eh litrl s frsh vril E.g. f = + + s f = + d + Trt SOP prssion s polnomil Division/ftoring thn oms polnomil division/ftoring Booln idntitis r ignord o Ept in pr-prossing o Simpl lol simplifitions lik + prformd EECS 144/244, UC Brkl: 24

Algri vs. Booln ftoriztion f = + + + + + Algri ftoriztion produs f = ( + ) + ( + ) + + Booln ftoriztion produs f = ( + + )( + + ) EECS 144/244, UC Brkl: 25 Algri Division Empl F = + d + + d + Wnt to gt Q, R, whr F = D Q + R 1. D = + for 2. D = EECS 144/244, UC Brkl: 26

Algri Division Algorithm Wht w wnt: Givn F, D, find Q, R F, D prssd s sts of us (sm for Q, R) Approh: For h u C in D { lt B = {us in F ontind in C} if (B is mpt) rturn Q = { }, R = F lt B = {us in B with vrils in C rmovd} if (C is th first u in D w r looking t) lt Q = B; ls Q = Q B; } Complit? R = F \ (Q D); EECS 144/244, UC Brkl: 27 Tking Stok Wht w know: How to prform Algri division givn divisor D Wht w don t How to find divisor D? Rll wht w wntd to do: Givn 2 funtions F nd G, find ommon divisor D nd ftoriz thm s F = D Q1 + R1 G = D Q2 + R2 EECS 144/244, UC Brkl: 28

Nw Trminolog: Krnls A krnl of Booln prssion F is u-fr prssion tht rsults whn ou divid F singl u Tht singl u is lld o-krnl Cu-fr prssion: Cnnot ftor out singl u tht lvs hind no rmindr Empls: Whih r u-fr? F1 = + F2 = + d EECS 144/244, UC Brkl: 29 Krnls: Empls F = + + d + K(f) Krnl Co-krnl {,,d} {,}?? {,,d,}? Not: n viw krnls s sts of us EECS 144/244, UC Brkl: 30

Wh r Krnls Usful? Multi-lvl logi optimizr wnts to find ommon divisors of two (or mor) funtions f nd g Thorm: [Brton & MMulln] f nd g hv non-trivil (multipl-u) ommon divisor d if nd onl if thr ist krnls k f K( f ), k g K( g ) suh tht k f k g is non-trivil, i.., not u (hr st intrstion is pplid to th sts of us in k f nd k g ) n us krnls of f nd g to lot ommon divisors EECS 144/244, UC Brkl: 31 Thorm, Skthd Informll F = D1. K1 + R1 G = D2. K2 + R2 K1 = (X + Y + ) + stuff1 K2 = (X + Y + ) + stuff2 Thn, F = (X + Y + ) D1 + stuff3 G = (X + Y + ) D2 + stuff4 So, if w find krnls nd intrst thm, th intrstion givs us our ommon divisor EECS 144/244, UC Brkl: 32

Krnl Intrstion: Empl F = + + d + G = d + + d + + K(f) Krnl Co-krnl {,,d} {,} {,} {,,d,} 1 K(g) Krnl Co-krnl {,} d or {d,} or {d,,} {d,,d,,} 1 EECS 144/244, UC Brkl: 33 How do w find Krnls? Ovrviw: Givn funtion F 1. Pik vril ppring in F, nd us it s divisor 2. Find th orrsponding krnl K if on ists (t lst 2 us in F ontin ) If not, go k to (1) nd pik nothr vril 3. Us K in pl of F nd rurs to find krnls of K F = K + R nd K = M + S F = M + Add krnls of K to thos of F 4. Go k to (1) nd pik nothr vril to kp finding krnls EECS 144/244, UC Brkl: 34

Finding Krnls: Empl F = + d + d + d + d + d + d + EECS 144/244, UC Brkl: 35 Finding Krnls: Empl F = + d + d + d + d + d & d oth ontin. Intrstion is. Rurs on F/ = +d + Tk intrstion of ll us ontining vril EECS 144/244, UC Brkl: 36

Krnl Finding Algorithm FindKrnls(F) { K = { }; for (h vril in F) { if (F hs t lst 2 us ontining ) { lt S = {us in F ontining }; lt = u rsulting from intrstion of ll us in S K = K FindKrnls(F/); //rursion } } K = K F ; rturn K; } EECS 144/244, UC Brkl: 37 Strong (or Booln) Division [optionl rding] Givn funtion f to strong dividd g Add n tr input to f orrsponding to g, nml G nd otin funtion h s follows Inputs to f tht h DC = Gg+ G g nnot our h ON = f ON h DC = f ON. h DC h OFF f ON h DC Gt: h = Q G + R Minimiz h using two-lvl minimizr EECS 144/244, UC Brkl: 38

Rding R. Brton, G. Hhtl, A. Sngiovnni-Vinntlli, Multilvl Logi Snthsis, Prodings of th IEEE, F 90. EECS 144/244, UC Brkl: 39