# The DOACROSS statement

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 The DOACROSS sttement Is prllel loop similr to DOALL, ut it llows prouer-onsumer type of synhroniztion. Synhroniztion is llowe from lower to higher itertions sine it is ssume tht lower itertions re selete first y the impliit tsks. If synhroniztion were not from lower to higher itertions, elok oul our. Assume for exmple tht the first itertion wits t point w for n event from the seon itertion. If there were only one impliit tsk it woul wit forever t w sine there is no ontext swithing. 1

2 Exmples of DOACROSS * exmple 1. no ely * post (ev(0)) oross i=1,n (i) = (i) + (i) post(ev(i)) wit(ev(i-1)) x(i) = (i-1) + 2 en oross P1 (1) x(1) (4) x(4) P2 (2) x(2) (5) x(5) P3 (3) x(3) (6) x(6) 2

3 * exmple 2. ely etween onseutive itertions * post(ev(0)) oross i = 1, n wit(ev(i-1)) (i) = (i) + (i-1) post(ev(i)) x(i) = (i) + 2 en oross P1 (1) x(1) (4) x(4) P2 (2) x(2) (5) x(5) P3 (3) x(3) (6) 3

4 * exmple 3. ely etween non-onseutive itertions. * post (ev(0)) post(ev(1)) oross i = 2, n wit(ev(i-2)) (i) = (i) + (i-2) post(ev(i)) x(i) = (i) + 2 en oross P1 (1) x(1) (7) x(7) P2 (2) x(2) (8) x(8) P3 (3) x(3) (9) x(9) P4 (4) x(4) (10) x(10) P5 (5) x(5) (11) P6 (6) x(6) (12) 4

5 * exmple 4. ouly neste loop * oross i = 1, n integer j o j = 1, n wit (ev(i-1,j)) (i,j) = (i-1,j) + (i,j- 1) post (ev(i,j)) en o en oross P1 (1,1) (1,2) (1,3) (1,4) P2 (2,1) (2,2) (2,3) P3 (3,1) (3,2) P4 (4,1) 5

6 Exeution time of DOACROSS when orere ritil setions hve onstnt exeution time. Consier the loop oross i=1,n \$orer \$enorer \$orer... \$orer... \$orer... \$orer e... en oross Assume its exeution time lines hve the following form: 6

7 e e e e whih in terms of performne is equivlent to the following time lines: e II e II II e II II II e where onstnt ely II etween the strt of onseutive itertions is evient. This ely is equl to the time of the longest orere ritil setion (i.e II=T() in this se). 7

8 The exeution time of the previous loop using n proessors is: s n e seen next: T()+T()+nT()+T()+T(e) T()+T() nt()=nii T()+T(e) e e e In generl the exeution time when there re s mny proessors s itertions is nii+(b-ii)=(n-1)ii+b where B is the exeution time of the whole loop oy. S p = nb/[(n-1)ii+b] B/II 8

9 When there re p < n proessors the exeution time of the loop epens on whether B >= pii or not. Cse 1: B >= pii If p = 3, for the previous loop we hve: T(loop) = n/3 B + T()((n-1) mo 3) n/3 B II II e e e e e e e e In generl the formul is: n/p B+II((n-1) mo p) 9

10 Cse 2: B < pii For the previous loop, n in generl we hve T(loop) = nii + B - II B-II T()+T() nt() = nii T()+T(e) e e e e e e e e e e e e 10

11 From the previous two sttements we hve tht T(loop)= if B pii then ( n/p -1)B + II ((n-1) mo p) + B else (n-1)ii + B ut n-1 = p( n/p - 1) + (n-1) mo p therefore T(loop)= if B pii then ( n/p -1)B + II ((n-1) mo p) + B else (p( n/p - 1) + (n-1) mo p)ii + B n T(loop)= ( n/p -1) mx(b,pii) + II ((n-1) mo p) + B 11

12 Cyli Depenenes -- DOPIPE Assume loop with two or more epenene yles (strongly onnete omponents or π-loks) The first pproh evelope for onurrentiztion of o loops is illustrte elow: o i=1,n (i) = (i) + (i-1) (i) = (i) + (i-1) en o oegin o i=1,n (i) = (i) + (i-1) V(σ) en o // o i=1,n P(σ) (i) = (i) + (i-1) en o oen 12

13 i.e. to tke loop with two or more π-loks suh s: n exeute olletions of π-loks on seprte proessors in pipeline fshion: 13

14 Exeution time of DOPIPE Assume the epenene grph shown to the right. Assume lso tht T()=mx(T(),T(),T(),T(),T(e)) Then the exeution time of the DOPIPE on 4 proessors is T()+T()+nT()+T()+T(e) e T()+T() nt() T()+T(e) e e e e e 14

15 DOPIPE n Loop Distriution Assume loop with the epenene grph shown on the right The loop oul e istriute to proue: o i=1,n en o o i=1,n en o The first loop oul e trnsforme into DOALL, n the seon into DOPIPE. The resulting time lines woul e: 15

16 However, exeuting the originl loop s DOPIPE proues the sme exeution time with fewer proessor (if numer of itertions >4): 16

17 Prolems with DOPIPE 1. Proessor llotion is fixe t ompile-time, i.e. loops re ompile for fixe numer of proessors. Exmple 1: A loop with the epenene grph shown to the right, oul e ompile for three proessors s: oegin o i=1,n en o // o i=1,n en o // o i=1,n en o oen 17

18 ut for two proessors it shoul e ompile s oegin o i=1,n en o // o i=1,n en o oen 18

19 Exmple 2: The loop n e trnslte into oegin o i=1,n en o // o i=1,n en o // o i=1,n en o oen 19

20 or into oegin o i=1,n oen // o i=1,n,2 oegin // oen en o // o i=1,n en o oen If the exeution time of is unknown, (e.g. it inlues while loop), it is not possile to eie t ompile-time how mny opies of to o in prllel. 20

21 2. There is the nee to o pking whih is NP-hr Prtition: Given set A Z +, is there suset A A suh tht Σ ( A ) = Σ ( A-A )? DOPIPE trnsltion: Given loop with the following epenene grph 1 2 n with T() = (T( 1 )+T( 2 )+...+ T( n ))/2. Compute is n optiml sheule of the loop on 3 proessors. Clerly, solving the DOPIPE trnsltion prolem lso solves Prtition. 21

22 3. Cyles fore sequentil exeution Exmple 3 o i=3,n S: (i)=(i-2)-1 T: (i)=(i-3)*k en o S T Exmple 4 o i=1,n o j=1,n S: (i,j)=(i-1,j)+(i,j-1) en o en o S 22

23 Cyli epenenes -- DOACROSS A loop with yli epenenes n e trnsforme into DOACROSS s shown next: o i=1,n (i) = (i) + (i-1) (i) = (i) + (i-1) en o \$oross orer(,),shre(,,) o i=1,n \$orer (i) = (i) + (i-1) \$enorer \$orer (i) = (i) + (i-1) \$enorer en o DOACROSS hs the vntge tht ll impliit tsks eseute the sme oe. This filittes oe ssignment. Other vntge of the DOACROSS onstrut over the DOPIPE onstrut re illustrte in the following exmples. 23

24 Exmple 1: The sme trnsltion works for two or three proessors: Two proessors Three proessors 24

25 Exmple 2: Inresing the numer of proessors improve performne 25

26 Exmple 3 When the following loop is exeute s oross on two proessors o i=1,n S: (i) = (i-2) -1 T: (i) = (i-3) * k en o we get the following time lines ( S i stns for sttement S in itertion i) Pro. 1 2 S 1 S 2 T 2 T 1 S 3 S 4 T 3 T 4 Cyle shrinking tkes ple utomtilly. This is lso true in the se of multiply-neste loops where ll wht is neee is to use tuple s the loop inex s in oross (i,j,k)=[1..n 1 ]..[1..n 2 ]..[1..n 3 ] 26

27 Exmple 4: The following loop o i=1,n o j=1,n S: (i,j) = (i-1,j) + (i.j-1) en o en o n e trnslte into the following oross loop: oross (i,j) = [1..n]..[1..n] wit (ev(i-1,j)); wit (ev(i,j-1)) S: (i,j) = (i-1,j) + (i.j-1) post (ev(i,j)) en oross 27

28 The itertion spe of the previous loop is: S 1,1 S 1,2 S 1,3 S 1,4 S 2,1 S 2,2 S 2,3 S 2,4 S 3,1 S 3,2 S 3,3 S 3,4 S 4,1 S 4,2 S 4,3 S 4,4 n its time lines when exeute on n proessors re: S 1,1 S 1,2 S 1,3 S 1,1 S 1,2 S 1,3 S 1,1 S 1,2 S 1,3 28

29 Sttement Sheuling n DOACROSS Exeution Time. Consier the following epenene grph for the oy of singly-neste o loop. S 1 S 2 S 3 S 4 S 5 When the DOACROSS oy hs the originl sttement orer, there is no speeup (S 1 of itertion i+1 nnot strt exeuting until S 5 of itertion i ompletes exeution). When the oy is permute into the orer S 1 S 4 S 5 S 2 S 3, then there will e speeup s shown in the following time lines S 1 S 4 S 5 S 2 S 3 S 1 S 4 S 5 S 2 S 3 S 1 S 4 S 5 S 2 S 4 S 5 S 3 S 1 29

30 Seleting n optimum sttement orering to minimize the ely is NP-Hr(Cytron s PhD Thesis). When the oross is ouly-neste o loop, the orer of the inex (if the loops re interhngele) lso influenes the exeution time.(tng et l 1988) 30

31 Cyli epenenes -- Loop Pipelining This metho ssumes the presene of no if sttements n tht ll epenene istnes re 0 or 1. (Aiken n Niolu 1988) It proees y (greey) sheuling the oy of the loop in prllel for the first itertion, n then for the seon, n so on until pttern is etete. One the pttern is etete, prllel oe n e esily generte s illustrte next.(the numers next to the rs represent A 0 0 F I J K L 1 M 0 0 N 0 1 E 0 P Q R 0 B 1 H 0 1 D 0 0 C 1 G epenene istnes.) The resulting progrm n e exeute in VLIW mhine or in n synhronous multiproessor.

32 itertion time ABC A A DEFI I I GHJKL CK KL A M BDM M I N EFGN FN KL PQR PQR CPQR M A HJ DJ FN I BG PQR KL E J M A - 10 H C FN I - 11 BD PQR KL - 12 EG J M A 13 H C FN I 14 BD PQR KL 15 EG J M 16 H C FN 17 BD PQR 18 EG J 19 H C 20 BD 21 EG 22 H Finl Progrm Grph: H 1 C 2 F 3 N 3 I 4 B 2 D 2 P 3 Q 3 R 3 K 4 L 4 E 2 G 2 J 3 M 4 A 5

### Solutions to Problem Set #1

CSE 233 Spring, 2016 Solutions to Prolem Set #1 1. The movie tse onsists of the following two reltions movie: title, iretor, tor sheule: theter, title The first reltion provies titles, iretors, n tors

### Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Solutions for HW9 Exerise 28. () Drw C 6, W 6 K 6, n K 5,3. C 6 : W 6 : K 6 : K 5,3 : () Whih of the following re iprtite? Justify your nswer. Biprtite: put the re verties in V 1 n the lk in V 2. Biprtite:

### Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

GCSE C Emple 7 Work out 9 Give your nswer in its simplest form Numers n inies Reiprote mens invert or turn upsie own The reiprol of is 9 9 Mke sure you only invert the frtion you re iviing y 7 You multiply

### CIT 596 Theory of Computation 1. Graphs and Digraphs

CIT 596 Theory of Computtion 1 A grph G = (V (G), E(G)) onsists of two finite sets: V (G), the vertex set of the grph, often enote y just V, whih is nonempty set of elements lle verties, n E(G), the ege

### STRAND J: TRANSFORMATIONS, VECTORS and MATRICES

Mthemtics SKE: STRN J STRN J: TRNSFORMTIONS, VETORS nd MTRIES J3 Vectors Text ontents Section J3.1 Vectors nd Sclrs * J3. Vectors nd Geometry Mthemtics SKE: STRN J J3 Vectors J3.1 Vectors nd Sclrs Vectors

### Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

Grph Theory Simple Grph G = (V, E). V ={verties}, E={eges}. h k g f e V={,,,,e,f,g,h,k} E={(,),(,g),(,h),(,k),(,),(,k),...,(h,k)} E =16. 1 Grph or Multi-Grph We llow loops n multiple eges. G = (V, E.ψ)

### Outline Data Structures and Algorithms. Data compression. Data compression. Lossy vs. Lossless. Data Compression

5-2 Dt Strutures n Algorithms Dt Compression n Huffmn s Algorithm th Fe 2003 Rjshekr Rey Outline Dt ompression Lossy n lossless Exmples Forml view Coes Definition Fixe length vs. vrile length Huffmn s

Introdution to Olympid Inequlities Edutionl Studies Progrm HSSP Msshusetts Institute of Tehnology Snj Simonovikj Spring 207 Contents Wrm up nd Am-Gm inequlity 2. Elementry inequlities......................

### for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx

Applitions of Integrtion Are of Region Between Two Curves Ojetive: Fin the re of region etween two urves using integrtion. Fin the re of region etween interseting urves using integrtion. Desrie integrtion

### NON-DETERMINISTIC FSA

Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is

### Resources. Introduction: Binding. Resource Types. Resource Sharing. The type of a resource denotes its ability to perform different operations

Introduction: Binding Prt of 4-lecture introduction Scheduling Resource inding Are nd performnce estimtion Control unit synthesis This lecture covers Resources nd resource types Resource shring nd inding

### CS 360 Exam 2 Fall 2014 Name

CS 360 Exm 2 Fll 2014 Nme 1. The lsses shown elow efine singly-linke list n stk. Write three ifferent O(n)-time versions of the reverse_print metho s speifie elow. Eh version of the metho shoul output

### Automata and Regular Languages

Chpter 9 Automt n Regulr Lnguges 9. Introution This hpter looks t mthemtil moels of omputtion n lnguges tht esrie them. The moel-lnguge reltionship hs multiple levels. We shll explore the simplest level,

### U Q W The First Law of Thermodynamics. Efficiency. Closed cycle steam power plant. First page of S. Carnot s paper. Sadi Carnot ( )

0-9-0 he First Lw of hermoynmis Effiieny When severl lterntive proesses involving het n work re ville to hnge system from n initil stte hrterize y given vlues of the mrosopi prmeters (pressure p i, temperture

### 6.5 Improper integrals

Eerpt from "Clulus" 3 AoPS In. www.rtofprolemsolving.om 6.5. IMPROPER INTEGRALS 6.5 Improper integrls As we ve seen, we use the definite integrl R f to ompute the re of the region under the grph of y =

### Chapter 4 State-Space Planning

Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different

### Chapter 19: The Second Law of Thermodynamics

hpter 9: he Seon Lw of hermoynmis Diretions of thermoynmi proesses Irreversile n reversile proesses hermoynmi proesses tht our in nture re ll irreversile proesses whih proee spontneously in one iretion

### Project 6: Minigoals Towards Simplifying and Rewriting Expressions

MAT 51 Wldis Projet 6: Minigols Towrds Simplifying nd Rewriting Expressions The distriutive property nd like terms You hve proly lerned in previous lsses out dding like terms ut one prolem with the wy

### SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 2014

SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 014 Mrk Scheme: Ech prt of Question 1 is worth four mrks which re wrded solely for the correct nswer.

### Section 6.1 Definite Integral

Section 6.1 Definite Integrl Suppose we wnt to find the re of region tht is not so nicely shped. For exmple, consider the function shown elow. The re elow the curve nd ove the x xis cnnot e determined

### Lecture 11 Binary Decision Diagrams (BDDs)

C 474A/57A Computer-Aie Logi Design Leture Binry Deision Digrms (BDDs) C 474/575 Susn Lyseky o 3 Boolen Logi untions Representtions untion n e represente in ierent wys ruth tle, eqution, K-mp, iruit, et

### T b a(f) [f ] +. P b a(f) = Conclude that if f is in AC then it is the difference of two monotone absolutely continuous functions.

Rel Vribles, Fll 2014 Problem set 5 Solution suggestions Exerise 1. Let f be bsolutely ontinuous on [, b] Show tht nd T b (f) P b (f) f (x) dx [f ] +. Conlude tht if f is in AC then it is the differene

QUADRATIC EQUATION Contents Topi Pge No. Theory 0-04 Exerise - 05-09 Exerise - 09-3 Exerise - 3 4-5 Exerise - 4 6 Answer Key 7-8 Syllus Qudrti equtions with rel oeffiients, reltions etween roots nd oeffiients,

### Monochromatic Plane Matchings in Bicolored Point Set

CCCG 2017, Ottw, Ontrio, July 26 28, 2017 Monohromti Plne Mthings in Biolore Point Set A. Krim Au-Affsh Sujoy Bhore Pz Crmi Astrt Motivte y networks interply, we stuy the prolem of omputing monohromti

### CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

### Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

### Key compiler algorithms (for embedded systems)

Key ompiler lgorithms (for emee systems) Peter Mrweel University of Dortmun, Germny P. Mrweel, Univ. Dortmun/Informtik 2 ICD/ES, 2006 Fri 0 0. 0.0 Universität Dortmun Opertions/Wtt [MOPS/mW].0µ ASIC Reonfigurle

### 1 From NFA to regular expression

Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

### 2. VECTORS AND MATRICES IN 3 DIMENSIONS

2 VECTORS AND MATRICES IN 3 DIMENSIONS 21 Extending the Theory of 2-dimensionl Vectors x A point in 3-dimensionl spce cn e represented y column vector of the form y z z-xis y-xis z x y x-xis Most of the

### Homework 3 Solutions

CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

### Introduction to Graphical Models

Introution to Grhil Moels Kenji Fukumizu The Institute of Sttistil Mthemtis Comuttionl Methoology in Sttistil Inferene II Introution n Review 2 Grhil Moels Rough Sketh Grhil moels Grh: G V E V: the set

### CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

### MA123, Chapter 10: Formulas for integrals: integrals, antiderivatives, and the Fundamental Theorem of Calculus (pp.

MA123, Chpter 1: Formuls for integrls: integrls, ntiderivtives, nd the Fundmentl Theorem of Clculus (pp. 27-233, Gootmn) Chpter Gols: Assignments: Understnd the sttement of the Fundmentl Theorem of Clculus.

### The Stirling Engine: The Heat Engine

Memoril University of Newfounln Deprtment of Physis n Physil Oenogrphy Physis 2053 Lortory he Stirling Engine: he Het Engine Do not ttempt to operte the engine without supervision. Introution Het engines

### Thermal energy 2 U Q W. 23 April The First Law of Thermodynamics. Or, if we want to obtain external work: The trick of using steam

April 08 Therml energy Soures of het Trnsport of het How to use het The First Lw of Thermoynmis U W Or, if we wnt to otin externl work: U W 009 vrije Universiteit msterm Close yle stem power plnt The trik

### What else can you do?

Wht else cn you do? ngle sums The size of specil ngle types lernt erlier cn e used to find unknown ngles. tht form stright line dd to 180c. lculte the size of + M, if L is stright line M + L = 180c( stright

### Algorithm Design and Analysis

Algorithm Design nd Anlysis LECTURE 8 Mx. lteness ont d Optiml Ching Adm Smith 9/12/2008 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K. Wyne Sheduling to Minimizing Lteness Minimizing

### Non-deterministic Finite Automata

Non-deterministic Finite Automt From Regulr Expressions to NFA- Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion

### Separable discrete functions: recognition and sufficient conditions

Seprle isrete funtions: reognition n suffiient onitions Enre Boros Onřej Čepek Vlimir Gurvih Novemer 21, 217 rxiv:1711.6772v1 [mth.co] 17 Nov 217 Astrt A isrete funtion of n vriles is mpping g : X 1...

### 4 VECTORS. 4.0 Introduction. Objectives. Activity 1

4 VECTRS Chpter 4 Vectors jectives fter studying this chpter you should understnd the difference etween vectors nd sclrs; e le to find the mgnitude nd direction of vector; e le to dd vectors, nd multiply

### Chapter 4 Regular Grammar and Regular Sets. (Solutions / Hints)

C K Ngpl Forml Lnguges nd utomt Theory Chpter 4 Regulr Grmmr nd Regulr ets (olutions / Hints) ol. (),,,,,,,,,,,,,,,,,,,,,,,,,, (),, (c) c c, c c, c, c, c c, c, c, c, c, c, c, c c,c, c, c, c, c, c, c, c,

### Thermodynamics. Question 1. Question 2. Question 3 3/10/2010. Practice Questions PV TR PV T R

/10/010 Question 1 1 mole of idel gs is rought to finl stte F y one of three proesses tht hve different initil sttes s shown in the figure. Wht is true for the temperture hnge etween initil nd finl sttes?

### where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

CS 294-2 9/11/04 Quntum Ciruit Model, Solovy-Kitev Theorem, BQP Fll 2004 Leture 4 1 Quntum Ciruit Model 1.1 Clssil Ciruits - Universl Gte Sets A lssil iruit implements multi-output oolen funtion f : {0,1}

### 10. AREAS BETWEEN CURVES

. AREAS BETWEEN CURVES.. Ares etween curves So res ove the x-xis re positive nd res elow re negtive, right? Wrong! We lied! Well, when you first lern out integrtion it s convenient fiction tht s true in

GENERALIZATIONS OF THE FLOOR AND CEILING FUNCTIONS USING THE STERN-BROCOT TREE Håkn Lennerstd, Lrs Lunderg Blekinge Institute of Tehnology Reserh report No. 2006:02 Generliztions of the floor nd eiling

### Mining Frequent Web Access Patterns with Partial Enumeration

Mining Frequent We Aess Ptterns with Prtil Enumertion Peiyi Tng Deprtment of Computer Siene University of Arknss t Little Rok 2801 S. University Ave. Little Rok, AR 72204 Mrkus P. Turki Deprtment of Computer

### Designing Information Devices and Systems I Spring 2018 Homework 8

EECS 16A Designing Informtion Devices nd Systems I Spring 2018 Homework 8 This homework is due Mrch 19, 2018, t 23:59. Self-grdes re due Mrch 22, 2018, t 23:59. Sumission Formt Your homework sumission

### How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

XII. LINEAR ALGEBRA: SOLVING SYSTEMS OF EQUATIONS Tody we re going to tlk out solving systems of liner equtions. These re prolems tht give couple of equtions with couple of unknowns, like: 6= x + x 7=

### Proving the Pythagorean Theorem

Proving the Pythgoren Theorem W. Bline Dowler June 30, 2010 Astrt Most people re fmilir with the formul 2 + 2 = 2. However, in most ses, this ws presented in lssroom s n solute with no ttempt t proof or

### Geometry of the Circle - Chords and Angles. Geometry of the Circle. Chord and Angles. Curriculum Ready ACMMG: 272.

Geometry of the irle - hords nd ngles Geometry of the irle hord nd ngles urriulum Redy MMG: 272 www.mthletis.om hords nd ngles HRS N NGLES The irle is si shpe nd so it n e found lmost nywhere. This setion

### Nondeterministic Finite Automata

Nondeterministi Finite utomt The Power of Guessing Tuesdy, Otoer 4, 2 Reding: Sipser.2 (first prt); Stoughton 3.3 3.5 S235 Lnguges nd utomt eprtment of omputer Siene Wellesley ollege Finite utomton (F)

### Preview 11/1/2017. Greedy Algorithms. Coin Change. Coin Change. Coin Change. Coin Change. Greedy algorithms. Greedy Algorithms

Preview Greed Algorithms Greed Algorithms Coin Chnge Huffmn Code Greed lgorithms end to e simple nd strightforwrd. Are often used to solve optimiztion prolems. Alws mke the choice tht looks est t the moment,

### 38 Riemann sums and existence of the definite integral.

38 Riemnn sums nd existence of the definite integrl. In the clcultion of the re of the region X bounded by the grph of g(x) = x 2, the x-xis nd 0 x b, two sums ppered: ( n (k 1) 2) b 3 n 3 re(x) ( n These

### Lexical Analysis Finite Automate

Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition

### STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada

STRUCTURE OF CONCURRENCY Ryszrd Jnicki Deprtment of Computing nd Softwre McMster University Hmilton, ON, L8S 4K1 Cnd jnicki@mcmster.c 1 Introduction Wht is concurrency? How it cn e modelled? Wht re the

### 1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

### 1.3 SCALARS AND VECTORS

Bridge Course Phy I PUC 24 1.3 SCLRS ND VECTORS Introdution: Physis is the study of nturl phenomen. The study of ny nturl phenomenon involves mesurements. For exmple, the distne etween the plnet erth nd

### PART 1 MULTIPLE CHOICE Circle the appropriate response to each of the questions below. Each question has a value of 1 point.

PART MULTIPLE CHOICE Circle the pproprite response to ech of the questions below. Ech question hs vlue of point.. If in sequence the second level difference is constnt, thn the sequence is:. rithmetic

### u( t) + K 2 ( ) = 1 t > 0 Analyzing Damped Oscillations Problem (Meador, example 2-18, pp 44-48): Determine the equation of the following graph.

nlyzing Dmped Oscilltions Prolem (Medor, exmple 2-18, pp 44-48): Determine the eqution of the following grph. The eqution is ssumed to e of the following form f ( t) = K 1 u( t) + K 2 e!"t sin (#t + \$

### a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points.

Prole 3: Crnot Cyle of n Idel Gs In this prole, the strting pressure P nd volue of n idel gs in stte, re given he rtio R = / > of the volues of the sttes nd is given Finlly onstnt γ = 5/3 is given You

### 12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

### expression simply by forming an OR of the ANDs of all input variables for which the output is

2.4 Logic Minimiztion nd Krnugh Mps As we found ove, given truth tle, it is lwys possile to write down correct logic expression simply y forming n OR of the ANDs of ll input vriles for which the output

### A CLASS OF GENERAL SUPERTREE METHODS FOR NESTED TAXA

A CLASS OF GENERAL SUPERTREE METHODS FOR NESTED TAXA PHILIP DANIEL AND CHARLES SEMPLE Astrt. Amlgmting smller evolutionry trees into single prent tree is n importnt tsk in evolutionry iology. Trditionlly,

### dx dt dy = G(t, x, y), dt where the functions are defined on I Ω, and are locally Lipschitz w.r.t. variable (x, y) Ω.

Chpter 8 Stility theory We discuss properties of solutions of first order two dimensionl system, nd stility theory for specil clss of liner systems. We denote the independent vrile y t in plce of x, nd

### x = a To determine the volume of the solid, we use a definite integral to sum the volumes of the slices as we let!x " 0 :

Clculus II MAT 146 Integrtion Applictions: Volumes of 3D Solids Our gol is to determine volumes of vrious shpes. Some of the shpes re the result of rotting curve out n xis nd other shpes re simply given

### Chapter Five - Eigenvalues, Eigenfunctions, and All That

Chpter Five - Eigenvlues, Eigenfunctions, n All Tht The prtil ifferentil eqution methos escrie in the previous chpter is specil cse of more generl setting in which we hve n eqution of the form L 1 xux,tl

### Section 4.4. Green s Theorem

The Clulus of Funtions of Severl Vriles Setion 4.4 Green s Theorem Green s theorem is n exmple from fmily of theorems whih onnet line integrls (nd their higher-dimensionl nlogues) with the definite integrls

### Lecture 3. Limits of Functions and Continuity

Lecture 3 Limits of Functions nd Continuity Audrey Terrs April 26, 21 1 Limits of Functions Notes I m skipping the lst section of Chpter 6 of Lng; the section bout open nd closed sets We cn probbly live

### MATH 573 FINAL EXAM. May 30, 2007

MATH 573 FINAL EXAM My 30, 007 NAME: Solutions 1. This exm is due Wednesdy, June 6 efore the 1:30 pm. After 1:30 pm I will NOT ccept the exm.. This exm hs 1 pges including this cover. There re 10 prolems.

### Chapter 2 Finite Automata

Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

### Calculus Cheat Sheet. Integrals Definitions. where F( x ) is an anti-derivative of f ( x ). Fundamental Theorem of Calculus. dx = f x dx g x dx

Clulus Chet Sheet Integrls Definitions Definite Integrl: Suppose f ( ) is ontinuous Anti-Derivtive : An nti-derivtive of f ( ) on [, ]. Divide [, ] into n suintervls of is funtion, F( ), suh tht F = f.

### The Word Problem in Quandles

The Word Prolem in Qundles Benjmin Fish Advisor: Ren Levitt April 5, 2013 1 1 Introdution A word over n lger A is finite sequene of elements of A, prentheses, nd opertions of A defined reursively: Given

### INTRODUCTION TO AUTOMATA THEORY

Chpter 3 INTRODUCTION TO AUTOMATA THEORY In this hpter we stuy the most si strt moel of omputtion. This moel els with mhines tht hve finite memory pity. Setion 3. els with mhines tht operte eterministilly

### Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

Dt Strutures, Spring 24 L. Joskowiz Dt Strutures LEURE Humn oing Motivtion Uniquel eipherle oes Prei oes Humn oe onstrution Etensions n pplitions hpter 6.3 pp 385 392 in tetook Motivtion Suppose we wnt

### New centroid index for ordering fuzzy numbers

Interntionl Sientifi Journl Journl of Mmtis http://mmtissientifi-journlom New entroi inex for orering numers Tyee Hjjri Deprtment of Mmtis, Firoozkooh Brnh, Islmi z University, Firoozkooh, Irn Emil: tyeehjjri@yhooom

### Lecture 2 : Propositions DRAFT

CS/Mth 240: Introduction to Discrete Mthemtics 1/20/2010 Lecture 2 : Propositions Instructor: Dieter vn Melkeeek Scrie: Dlior Zelený DRAFT Lst time we nlyzed vrious mze solving lgorithms in order to illustrte

### Prefix-Free Regular-Expression Matching

Prefix-Free Regulr-Expression Mthing Yo-Su Hn, Yjun Wng nd Derik Wood Deprtment of Computer Siene HKUST Prefix-Free Regulr-Expression Mthing p.1/15 Pttern Mthing Given pttern P nd text T, find ll sustrings

### ILLUSTRATING THE EXTENSION OF A SPECIAL PROPERTY OF CUBIC POLYNOMIALS TO NTH DEGREE POLYNOMIALS

ILLUSTRATING THE EXTENSION OF A SPECIAL PROPERTY OF CUBIC POLYNOMIALS TO NTH DEGREE POLYNOMIALS Dvid Miller West Virgini University P.O. BOX 6310 30 Armstrong Hll Morgntown, WV 6506 millerd@mth.wvu.edu

QUADRATIC EQUATION EXERCISE - 0 CHECK YOUR GRASP. Sine sum of oeffiients 0. Hint : It's one root is nd other root is 8 nd 5 5. tn other root 9. q 4p 0 q p q p, q 4 p,,, 4 Hene 7 vlues of (p, q) 7 equtions

### Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

### Lecture 1 - Introduction and Basic Facts about PDEs

* 18.15 - Introdution to PDEs, Fll 004 Prof. Gigliol Stffilni Leture 1 - Introdution nd Bsi Fts bout PDEs The Content of the Course Definition of Prtil Differentil Eqution (PDE) Liner PDEs VVVVVVVVVVVVVVVVVVVV

### 1.3 Regular Expressions

56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

### Homework Solution - Set 5 Due: Friday 10/03/08

CE 96 Introduction to the Theory of Computtion ll 2008 Homework olution - et 5 Due: ridy 10/0/08 1. Textook, Pge 86, Exercise 1.21. () 1 2 Add new strt stte nd finl stte. Mke originl finl stte non-finl.

### APPROXIMATION AND ESTIMATION MATHEMATICAL LANGUAGE THE FUNDAMENTAL THEOREM OF ARITHMETIC LAWS OF ALGEBRA ORDER OF OPERATIONS

TOPIC 2: MATHEMATICAL LANGUAGE NUMBER AND ALGEBRA You shoul unerstn these mthemtil terms, n e le to use them ppropritely: ² ition, sutrtion, multiplition, ivision ² sum, ifferene, prout, quotient ² inex

### Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

U.U.D.M. Project Report 07:4 Frey Frctions Rickrd Fernström Exmensrete i mtemtik, 5 hp Hledre: Andres Strömergsson Exmintor: Jörgen Östensson Juni 07 Deprtment of Mthemtics Uppsl University Frey Frctions

### On Determinisation of History-Deterministic Automata.

On Deterministion of History-Deterministic Automt. Denis Kupererg Mich l Skrzypczk University of Wrsw YR-ICALP 2014 Copenhgen Introduction Deterministic utomt re centrl tool in utomt theory: Polynomil

### Matrix & Vector Basic Linear Algebra & Calculus

Mtrix & Vector Bsic Liner lgebr & lculus Wht is mtrix? rectngulr rry of numbers (we will concentrte on rel numbers). nxm mtrix hs n rows n m columns M x4 M M M M M M M M M M M M 4 4 4 First row Secon row

### Parallel Projection Theorem (Midpoint Connector Theorem):

rllel rojection Theorem (Midpoint onnector Theorem): The segment joining the midpoints of two sides of tringle is prllel to the third side nd hs length one-hlf the third side. onversely, If line isects

### Ranking Generalized Fuzzy Numbers using centroid of centroids

Interntionl Journl of Fuzzy Logi Systems (IJFLS) Vol. No. July ning Generlize Fuzzy Numers using entroi of entrois S.Suresh u Y.L.P. Thorni N.vi Shnr Dept. of pplie Mthemtis GIS GITM University Vishptnm

### EE273 Lecture 15 Asynchronous Design November 16, Today s Assignment

EE273 Lecture 15 Asynchronous Design Novemer 16, 199 Willim J. Dlly Computer Systems Lortory Stnford University illd@csl.stnford.edu 1 Tody s Assignment Term Project see project updte hndout on we checkpoint

### 4. Statements Reasons

Chpter 9 Answers Prentie-Hll In. Alterntive Ativity 9-. Chek students work.. Opposite sides re prllel. 3. Opposite sides re ongruent. 4. Opposite ngles re ongruent. 5. Digonls iset eh other. 6. Students

### Triangles The following examples explore aspects of triangles:

Tringles The following exmples explore spects of tringles: xmple 1: ltitude of right ngled tringle + xmple : tringle ltitude of the symmetricl ltitude of n isosceles x x - 4 +x xmple 3: ltitude of the

### Chapter 6 Continuous Random Variables and Distributions

Chpter 6 Continuous Rndom Vriles nd Distriutions Mny economic nd usiness mesures such s sles investment consumption nd cost cn hve the continuous numericl vlues so tht they cn not e represented y discrete

### More Properties of the Riemann Integral

More Properties of the Riemnn Integrl Jmes K. Peterson Deprtment of Biologil Sienes nd Deprtment of Mthemtil Sienes Clemson University Februry 15, 2018 Outline More Riemnn Integrl Properties The Fundmentl

### H (2a, a) (u 2a) 2 (E) Show that u v 4a. Explain why this implies that u v 4a, with equality if and only u a if u v 2a.

Chpter Review 89 IGURE ol hord GH of the prol 4. G u v H (, ) (A) Use the distne formul to show tht u. (B) Show tht G nd H lie on the line m, where m ( )/( ). (C) Solve m for nd sustitute in 4, otining

### m m m m m m m m P m P m ( ) m m P( ) ( ). The o-ordinte of the point P( ) dividing the line segment joining the two points ( ) nd ( ) eternll in the r

CO-ORDINTE GEOMETR II I Qudrnt Qudrnt (-.+) (++) X X - - - 0 - III IV Qudrnt - Qudrnt (--) - (+-) Region CRTESIN CO-ORDINTE SSTEM : Retngulr Co-ordinte Sstem : Let X' OX nd 'O e two mutull perpendiulr

### 13.3 CLASSICAL STRAIGHTEDGE AND COMPASS CONSTRUCTIONS

33 CLASSICAL STRAIGHTEDGE AND COMPASS CONSTRUCTIONS As simple ppliction of the results we hve obtined on lgebric extensions, nd in prticulr on the multiplictivity of extension degrees, we cn nswer (in

### Non Right Angled Triangles

Non Right ngled Tringles Non Right ngled Tringles urriulum Redy www.mthletis.om Non Right ngled Tringles NON RIGHT NGLED TRINGLES sin i, os i nd tn i re lso useful in non-right ngled tringles. This unit