Approximate computations

Size: px
Start display at page:

Download "Approximate computations"

Transcription

1 Living with floting-point numers Stndrd normlized representtion (sign + frction + exponent): Approximte computtions Rnges of vlues: Representtions for:, +, +0, 0, NN (not numer) Jordi Cortdell Deprtment of Computer Science Be creful when operting with rel numers: doule x, y; cin >> x >> y; // cout.precision(20); cout << x + y << endl; // Single nd doule-precision FP numers flot: doule: 1 sign e 1023 or 1 sign i 2 i 2 e 1023 i=1 Introduction to Progrmming Dept. CS, UPC 2 Compring floting-point numers Comprisons: = + c; if ( == c) Allow certin tolernce for equlity comprisons: if (expr1 == expr2) // Wrong! // my e flse if (s(expr1 expr2) < ) // Ok! Not every numer cn e represented. Exmple: 0.15 is stored s Introduction to Progrmming Dept. CS, UPC 3 Introduction to Progrmming Dept. CS, UPC 4

2 Root of continuous function Root of continuous function Bolzno s theorem: Let f e rel-vlued continuous function. Let nd e two vlues such tht < nd f() f() < 0. Then, there is vlue c [,] such tht f(c)=0. Design function tht finds root of continuous function f in the intervl [, ] ssuming the conditions of Bolzno s theorem re fulfilled. Given precision ( ), the function must return vlue c such tht the root of f is in the intervl [c, c+ ]. c c Introduction to Progrmming Dept. CS, UPC 5 Root of continuous function Strtegy: nrrow the intervl [, ] y hlf, checking whether the vlue of f in the middle of the intervl is positive or negtive. Iterte until the width of the intervl is smller. Introduction to Progrmming Dept. CS, UPC 6 Root of continuous function // Pre: f is continuous, < nd f()*f() < 0. // Returns c [,] such tht root exists in the // intervl [c,c+ ]. // Invrint: root of f exists in the intervl [,] Introduction to Progrmming Dept. CS, UPC 7 Introduction to Progrmming Dept. CS, UPC 8

3 Root of continuous function Root of continuous function doule root(doule, doule, doule epsilon) { while ( > epsilon) { doule c = ( + )/2; if (f() f(c) <= 0) = c; else = c; return ; // A recursive version doule root(doule, doule, doule epsilon) { if ( <= epsilon) return ; doule c = ( + )/2; if (f() f(c) <= 0) return root(,c,epsilon); else return root(c,,epsilon); Introduction to Progrmming Dept. CS, UPC 9 The Newton-Rphson method Introduction to Progrmming Dept. CS, UPC 10 The Newton-Rphson method A method for finding successively pproximtions to the roots of rel-vlued function. The function must e differentile. Introduction to Progrmming Dept. CS, UPC 11 Introduction to Progrmming Dept. CS, UPC 12

4 The Newton-Rphson method Squre root (using Newton-Rphson) Clculte Find the zero of the following function: where Recurrence: source: s_method Introduction to Progrmming Dept. CS, UPC 13 Squre root (using Newton-Rphson) // Pre: >= 0 // Returns x such tht x 2 - < doule squre_root(doule ) { doule x = 1.0; // Mkes n initil guess // Itertes using the Newton-Rphson recurrence while (s(x x ) >= epsilon) x = 0.5 (x + /x); return x; Introduction to Progrmming Dept. CS, UPC 15 Introduction to Progrmming Dept. CS, UPC 14 Squre root (using Newton-Rphson) Exmple: squre_root(1024.0) x Introduction to Progrmming Dept. CS, UPC 16

5 Approximting definite integrls Approximting definite integrls There re vrious methods to pproximte definite integrl: The pproximtion is etter if severl intervls re used: The trpezoidl method pproximtes the re with trpezoid: Introduction to Progrmming Dept. CS, UPC 17 Approximting definite integrls Introduction to Progrmming Dept. CS, UPC 18 Approximting definite integrls // Pre: >=, n > 0 // Returns n pproximtion of the definite integrl of f // etween nd using n intervls. doule integrl(doule, doule, int n) { doule h = ( )/n; h doule s = 0; for (int i = 1; i < n; ++i) s = s + f( + i h); return (f() + f() + 2 s) h/2; Introduction to Progrmming Dept. CS, UPC 19 Introduction to Progrmming Dept. CS, UPC 20

6 Monte Crlo methods Algorithms tht use repeted genertion of rndom numers to perform numericl computtions. The methods often rely on the existence of n lgorithm tht genertes rndom numers uniformly distriuted over n intervl. In C++ we cn use rnd(), tht genertes numers in the intervl [0, RAND_MAX) Introduction to Progrmming Dept. CS, UPC 21 Approximting Approximting Let us pick rndom point within the unit squre. Q: Wht is the proility for the point to e inside the circle? A: The proility is /4 Algorithm: Generte n rndom points in the unit squre Count the numer of points inside the circle (n in ) Approximte /4 n in /n Introduction to Progrmming Dept. CS, UPC 22 Approximting #include <cstdli> // Pre: n is the numer of generted points // Returns n pproximtion of using n rndom points doule pprox_pi(int n) { int nin = 0; doule rndmx = doule(rand_max); for (int i = 0; i < n; ++i) { doule x = rnd()/rndmx; doule y = rnd()/rndmx; if (x x + y y < 1.0) nin = nin + 1; return 4.0 nin/n; n , , , ,000, ,000, ,000, ,000,000, Introduction to Progrmming Dept. CS, UPC 23 Introduction to Progrmming Dept. CS, UPC 24

7 Generting rndom numers in n intervl Monte Crlo pplictions: exmples Assume rnd() genertes rndom nturl numer r in the intervl [0, R). Domin Intervl Rndom numer R [0,1) Τ r R R [0, ) rτr R [, ) + rτr Z [0, ) r mod Z [, ) + r mod ( ) Note: Be creful with integer divisions when delivering rel numers (enforce rel division). Determine the pproximte numer of lttice points in sphere of rdius r centered in the origin. Determine the volume of 3D region R defined s follows: A point P = (x, y, z) is in R if nd only if x 2 + y 2 + 2z nd 3x 2 + y 2 + z And mny other ppliction domins: Mthemtics, Computtionl Physics, Finnces, Simultion, Artificil Intelligence, Gmes, Computer Grphics, etc. Introduction to Progrmming Dept. CS, UPC 25 Exmple: intersection of two odies Determine the volume of 3D region R defined s follows: A point P = (x, y, z) is in R if nd only if x 2 + y 2 + 2z nd 3x 2 + y 2 + z The intersection of the two odies is inside rectngulr cuoid C, with center in the origin, such tht: x 2 50 y z 2 50 The volume of the cuoid is: Introduction to Progrmming Dept. CS, UPC 26 Exmple: intersection of two odies // Returns n estimtion of the volume of the // intersection of two odies with n rndom smples. doule volume_intersection(int n) { int nin = 0; doule s50 = sqrt(50)/rand_max; // scling for numers in [0,sqrt(50)) doule s10 = 10.0/RAND_MAX; // scling for numers in [0,10) // Generte n rndom smples for (int i = 0; i < n; ++i) { // Generte rndom point inside the cuoid doule x = s50 rnd(); doule y = s10 rnd(); doule z = s50 rnd(); // Check whether the point is inside the intersection if (x x + y y + 2 z z <= 100 nd 3 x x + y y + z z <= 150) ++nin; Volume C = = 4000 return nin/n; Introduction to Progrmming Dept. CS, UPC 27 Introduction to Progrmming Dept. CS, UPC 28

8 Exmple: intersection of two odies Volume Summry Approximte computtions is resort when no exct solutions cn e found numericlly. Intervls of tolernce re often used to define the level of ccurcy of the computtion. Rndom smpling methods cn e used to sttisticlly estimte the result of some complex prolems. numer of smples Introduction to Progrmming Dept. CS, UPC 29 Introduction to Progrmming Dept. CS, UPC 30

Product of polynomials. Introduction to Programming (in C++) Numerical algorithms. Product of polynomials. Product of polynomials

Product of polynomials. Introduction to Programming (in C++) Numerical algorithms. Product of polynomials. Product of polynomials Product of polynomils Introduction to Progrmming (in C++) Numericl lgorithms Jordi Cortdell, Ricrd Gvldà, Fernndo Orejs Dept. of Computer Science, UPC Given two polynomils on one vrile nd rel coefficients,

More information

P(r)dr = probability of generating a random number in the interval dr near r. For this probability idea to make sense we must have

P(r)dr = probability of generating a random number in the interval dr near r. For this probability idea to make sense we must have Rndom Numers nd Monte Crlo Methods Rndom Numer Methods The integrtion methods discussed so fr ll re sed upon mking polynomil pproximtions to the integrnd. Another clss of numericl methods relies upon using

More information

Representation of Numbers. Number Representation. Representation of Numbers. 32-bit Unsigned Integers 3/24/2014. Fixed point Integer Representation

Representation of Numbers. Number Representation. Representation of Numbers. 32-bit Unsigned Integers 3/24/2014. Fixed point Integer Representation Representtion of Numbers Number Representtion Computer represent ll numbers, other thn integers nd some frctions with imprecision. Numbers re stored in some pproximtion which cn be represented by fixed

More information

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming Lecture 10 Evolutionry Computtion: Evolution strtegies nd genetic progrmming Evolution strtegies Genetic progrmming Summry Negnevitsky, Person Eduction, 2011 1 Evolution Strtegies Another pproch to simulting

More information

Area & Volume. Chapter 6.1 & 6.2 September 25, y = 1! x 2. Back to Area:

Area & Volume. Chapter 6.1 & 6.2 September 25, y = 1! x 2. Back to Area: Bck to Are: Are & Volume Chpter 6. & 6. Septemer 5, 6 We cn clculte the re etween the x-xis nd continuous function f on the intervl [,] using the definite integrl:! f x = lim$ f x * i )%x n i= Where fx

More information

Introduction to Integration

Introduction to Integration Introduction to Integrtion Definite integrls of piecewise constnt functions A constnt function is function of the form Integrtion is two things t the sme time: A form of summtion. The opposite of differentition.

More information

6.2 Volumes of Revolution: The Disk Method

6.2 Volumes of Revolution: The Disk Method mth ppliction: volumes by disks: volume prt ii 6 6 Volumes of Revolution: The Disk Method One of the simplest pplictions of integrtion (Theorem 6) nd the ccumultion process is to determine so-clled volumes

More information

Floating Point Numbers and Interval Arithmetic

Floating Point Numbers and Interval Arithmetic 480: 05092008 -- floting point; intervl rith Floting Point Numbers nd Intervl Arithmetic Are floting point numbers just broken? (from http://www.cs.princeton.edu/introcs) To mthemticin like me floting

More information

Questions About Numbers. Number Systems and Arithmetic. Introduction to Binary Numbers. Negative Numbers?

Questions About Numbers. Number Systems and Arithmetic. Introduction to Binary Numbers. Negative Numbers? Questions About Numbers Number Systems nd Arithmetic or Computers go to elementry school How do you represent negtive numbers? frctions? relly lrge numbers? relly smll numbers? How do you do rithmetic?

More information

10/9/2012. Operator is an operation performed over data at runtime. Arithmetic, Logical, Comparison, Assignment, Etc. Operators have precedence

10/9/2012. Operator is an operation performed over data at runtime. Arithmetic, Logical, Comparison, Assignment, Etc. Operators have precedence /9/22 P f Performing i Si Simple l Clcultions C l l ti with ith C#. Opertors in C# nd Opertor Precedence 2. Arithmetic Opertors 3. Logicl Opertors 4. Bitwise Opertors 5. Comprison Opertors 6. Assignment

More information

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers Wht do ll those bits men now? bits (...) Number Systems nd Arithmetic or Computers go to elementry school instruction R-formt I-formt... integer dt number text chrs... floting point signed unsigned single

More information

Graphing Conic Sections

Graphing Conic Sections Grphing Conic Sections Definition of Circle Set of ll points in plne tht re n equl distnce, clled the rdius, from fixed point in tht plne, clled the center. Grphing Circle (x h) 2 + (y k) 2 = r 2 where

More information

Explicit Decoupled Group Iterative Method for the Triangle Element Solution of 2D Helmholtz Equations

Explicit Decoupled Group Iterative Method for the Triangle Element Solution of 2D Helmholtz Equations Interntionl Mthemticl Forum, Vol. 12, 2017, no. 16, 771-779 HIKARI Ltd, www.m-hikri.com https://doi.org/10.12988/imf.2017.7654 Explicit Decoupled Group Itertive Method for the Tringle Element Solution

More information

If f(x, y) is a surface that lies above r(t), we can think about the area between the surface and the curve.

If f(x, y) is a surface that lies above r(t), we can think about the area between the surface and the curve. Line Integrls The ide of line integrl is very similr to tht of single integrls. If the function f(x) is bove the x-xis on the intervl [, b], then the integrl of f(x) over [, b] is the re under f over the

More information

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1 Mth 33 Volume Stewrt 5.2 Geometry of integrls. In this section, we will lern how to compute volumes using integrls defined by slice nlysis. First, we recll from Clculus I how to compute res. Given the

More information

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1):

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1): Overview (): Before We Begin Administrtive detils Review some questions to consider Winter 2006 Imge Enhncement in the Sptil Domin: Bsics of Sptil Filtering, Smoothing Sptil Filters, Order Sttistics Filters

More information

Midterm 2 Sample solution

Midterm 2 Sample solution Nme: Instructions Midterm 2 Smple solution CMSC 430 Introduction to Compilers Fll 2012 November 28, 2012 This exm contins 9 pges, including this one. Mke sure you hve ll the pges. Write your nme on the

More information

2 Computing all Intersections of a Set of Segments Line Segment Intersection

2 Computing all Intersections of a Set of Segments Line Segment Intersection 15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design

More information

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits Systems I Logic Design I Topics Digitl logic Logic gtes Simple comintionl logic circuits Simple C sttement.. C = + ; Wht pieces of hrdwre do you think you might need? Storge - for vlues,, C Computtion

More information

MSTH 236 ELAC SUMMER 2017 CP 1 SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.

MSTH 236 ELAC SUMMER 2017 CP 1 SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question. MSTH 236 ELAC SUMMER 2017 CP 1 SHORT ANSWER. Write the word or phrse tht best completes ech sttement or nswers the question. Find the product. 1) (8y + 11)(4y 2-2y - 9) 1) Simplify the expression by combining

More information

Accelerating 3D convolution using streaming architectures on FPGAs

Accelerating 3D convolution using streaming architectures on FPGAs Accelerting 3D convolution using streming rchitectures on FPGAs Hohun Fu, Robert G. Clpp, Oskr Mencer, nd Oliver Pell ABSTRACT We investigte FPGA rchitectures for ccelerting pplictions whose dominnt cost

More information

Computing offsets of freeform curves using quadratic trigonometric splines

Computing offsets of freeform curves using quadratic trigonometric splines Computing offsets of freeform curves using qudrtic trigonometric splines JIULONG GU, JAE-DEUK YUN, YOONG-HO JUNG*, TAE-GYEONG KIM,JEONG-WOON LEE, BONG-JUN KIM School of Mechnicl Engineering Pusn Ntionl

More information

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Winter 2016

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Winter 2016 Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence Winter 2016 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl

More information

COMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples

COMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples COMPUTER SCIENCE 123 Foundtions of Computer Science 6. Tuples Summry: This lecture introduces tuples in Hskell. Reference: Thompson Sections 5.1 2 R.L. While, 2000 3 Tuples Most dt comes with structure

More information

6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it.

6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it. 6.3 Volumes Just s re is lwys positive, so is volume nd our ttitudes towrds finding it. Let s review how to find the volume of regulr geometric prism, tht is, 3-dimensionl oject with two regulr fces seprted

More information

Orthogonal line segment intersection

Orthogonal line segment intersection Computtionl Geometry [csci 3250] Line segment intersection The prolem (wht) Computtionl Geometry [csci 3250] Orthogonl line segment intersection Applictions (why) Algorithms (how) A specil cse: Orthogonl

More information

Grade 7/8 Math Circles Geometric Arithmetic October 31, 2012

Grade 7/8 Math Circles Geometric Arithmetic October 31, 2012 Fculty of Mthemtics Wterloo, Ontrio N2L 3G1 Grde 7/8 Mth Circles Geometric Arithmetic Octoer 31, 2012 Centre for Eduction in Mthemtics nd Computing Ancient Greece hs given irth to some of the most importnt

More information

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES)

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES) Numbers nd Opertions, Algebr, nd Functions 45. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES) In sequence of terms involving eponentil growth, which the testing service lso clls geometric

More information

Numerical integration methods

Numerical integration methods Chpter 1 Numericl integrtion methods The bility to clculte integrls is quite importnt. The uthor ws told tht, in the old dys, the gun ports were cut into ship only fter it ws flot, loded with equivlent

More information

Math 142, Exam 1 Information.

Math 142, Exam 1 Information. Mth 14, Exm 1 Informtion. 9/14/10, LC 41, 9:30-10:45. Exm 1 will be bsed on: Sections 7.1-7.5. The corresponding ssigned homework problems (see http://www.mth.sc.edu/ boyln/sccourses/14f10/14.html) At

More information

ZZ - Advanced Math Review 2017

ZZ - Advanced Math Review 2017 ZZ - Advnced Mth Review Mtrix Multipliction Given! nd! find the sum of the elements of the product BA First, rewrite the mtrices in the correct order to multiply The product is BA hs order x since B is

More information

Summer Review Packet For Algebra 2 CP/Honors

Summer Review Packet For Algebra 2 CP/Honors Summer Review Pcket For Alger CP/Honors Nme Current Course Mth Techer Introduction Alger uilds on topics studied from oth Alger nd Geometr. Certin topics re sufficientl involved tht the cll for some review

More information

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl component

More information

Section 5.3 : Finding Area Between Curves

Section 5.3 : Finding Area Between Curves MATH 9 Section 5. : Finding Are Between Curves Importnt: In this section we will lern just how to set up the integrls to find re etween curves. The finl nswer for ech emple in this hndout is given for

More information

Agilent Mass Hunter Software

Agilent Mass Hunter Software Agilent Mss Hunter Softwre Quick Strt Guide Use this guide to get strted with the Mss Hunter softwre. Wht is Mss Hunter Softwre? Mss Hunter is n integrl prt of Agilent TOF softwre (version A.02.00). Mss

More information

Double Integrals. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Double Integrals

Double Integrals. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Double Integrals Double Integrls MATH 375 Numericl Anlysis J. Robert Buchnn Deprtment of Mthemtics Fll 2013 J. Robert Buchnn Double Integrls Objectives Now tht we hve discussed severl methods for pproximting definite integrls

More information

6.3 Definite Integrals and Antiderivatives

6.3 Definite Integrals and Antiderivatives Section 6. Definite Integrls nd Antiderivtives 8 6. Definite Integrls nd Antiderivtives Wht ou will lern out... Properties of Definite Integrls Averge Vlue of Function Men Vlue Theorem for Definite Integrls

More information

Union-Find Problem. Using Arrays And Chains. A Set As A Tree. Result Of A Find Operation

Union-Find Problem. Using Arrays And Chains. A Set As A Tree. Result Of A Find Operation Union-Find Problem Given set {,,, n} of n elements. Initilly ech element is in different set. ƒ {}, {},, {n} An intermixed sequence of union nd find opertions is performed. A union opertion combines two

More information

9 Graph Cutting Procedures

9 Graph Cutting Procedures 9 Grph Cutting Procedures Lst clss we begn looking t how to embed rbitrry metrics into distributions of trees, nd proved the following theorem due to Brtl (1996): Theorem 9.1 (Brtl (1996)) Given metric

More information

box Boxes and Arrows 3 true 7.59 'X' An object is drawn as a box that contains its data members, for example:

box Boxes and Arrows 3 true 7.59 'X' An object is drawn as a box that contains its data members, for example: Boxes nd Arrows There re two kinds of vriles in Jv: those tht store primitive vlues nd those tht store references. Primitive vlues re vlues of type long, int, short, chr, yte, oolen, doule, nd flot. References

More information

Today. CS 188: Artificial Intelligence Fall Recap: Search. Example: Pancake Problem. Example: Pancake Problem. General Tree Search.

Today. CS 188: Artificial Intelligence Fall Recap: Search. Example: Pancake Problem. Example: Pancake Problem. General Tree Search. CS 88: Artificil Intelligence Fll 00 Lecture : A* Serch 9//00 A* Serch rph Serch Tody Heuristic Design Dn Klein UC Berkeley Multiple slides from Sturt Russell or Andrew Moore Recp: Serch Exmple: Pncke

More information

The Fundamental Theorem of Calculus

The Fundamental Theorem of Calculus MATH 6 The Fundmentl Theorem of Clculus The Fundmentl Theorem of Clculus (FTC) gives method of finding the signed re etween the grph of f nd the x-xis on the intervl [, ]. The theorem is: FTC: If f is

More information

Lecture 7: Integration Techniques

Lecture 7: Integration Techniques Lecture 7: Integrtion Techniques Antiderivtives nd Indefinite Integrls. In differentil clculus, we were interested in the derivtive of given rel-vlued function, whether it ws lgeric, eponentil or logrithmic.

More information

Slides for Data Mining by I. H. Witten and E. Frank

Slides for Data Mining by I. H. Witten and E. Frank Slides for Dt Mining y I. H. Witten nd E. Frnk Simplicity first Simple lgorithms often work very well! There re mny kinds of simple structure, eg: One ttriute does ll the work All ttriutes contriute eqully

More information

f[a] x + f[a + x] x + f[a +2 x] x + + f[b x] x

f[a] x + f[a + x] x + f[a +2 x] x + + f[b x] x Bsic Integrtion This chpter contins the fundmentl theory of integrtion. We begin with some problems to motivte the min ide: pproximtion by sum of slices. The chpter confronts this squrely, nd Chpter 3

More information

PARALLEL AND DISTRIBUTED COMPUTING

PARALLEL AND DISTRIBUTED COMPUTING PARALLEL AND DISTRIBUTED COMPUTING 2009/2010 1 st Semester Teste Jnury 9, 2010 Durtion: 2h00 - No extr mteril llowed. This includes notes, scrtch pper, clcultor, etc. - Give your nswers in the ville spce

More information

Fault injection attacks on cryptographic devices and countermeasures Part 2

Fault injection attacks on cryptographic devices and countermeasures Part 2 Fult injection ttcks on cryptogrphic devices nd countermesures Prt Isrel Koren Deprtment of Electricl nd Computer Engineering University of Msschusetts Amherst, MA Countermesures - Exmples Must first detect

More information

Very sad code. Abstraction, List, & Cons. CS61A Lecture 7. Happier Code. Goals. Constructors. Constructors 6/29/2011. Selectors.

Very sad code. Abstraction, List, & Cons. CS61A Lecture 7. Happier Code. Goals. Constructors. Constructors 6/29/2011. Selectors. 6/9/ Abstrction, List, & Cons CS6A Lecture 7-6-9 Colleen Lewis Very sd code (define (totl hnd) (if (empty? hnd) (+ (butlst (lst hnd)) (totl (butlst hnd))))) STk> (totl (h c d)) 7 STk> (totl (h ks d)) ;;;EEEK!

More information

Unit 5 Vocabulary. A function is a special relationship where each input has a single output.

Unit 5 Vocabulary. A function is a special relationship where each input has a single output. MODULE 3 Terms Definition Picture/Exmple/Nottion 1 Function Nottion Function nottion is n efficient nd effective wy to write functions of ll types. This nottion llows you to identify the input vlue with

More information

1.5 Extrema and the Mean Value Theorem

1.5 Extrema and the Mean Value Theorem .5 Extrem nd the Men Vlue Theorem.5. Mximum nd Minimum Vlues Definition.5. (Glol Mximum). Let f : D! R e function with domin D. Then f hs n glol mximum vlue t point c, iff(c) f(x) for ll x D. The vlue

More information

Stained Glass Design. Teaching Goals:

Stained Glass Design. Teaching Goals: Stined Glss Design Time required 45-90 minutes Teching Gols: 1. Students pply grphic methods to design vrious shpes on the plne.. Students pply geometric trnsformtions of grphs of functions in order to

More information

Ranking of Hexagonal Fuzzy Numbers for Solving Multi Objective Fuzzy Linear Programming Problem

Ranking of Hexagonal Fuzzy Numbers for Solving Multi Objective Fuzzy Linear Programming Problem Interntionl Journl of Computer pplictions 097 8887 Volume 8 No 8 Decemer 0 nking of egonl Fuzzy Numers Solving ulti Ojective Fuzzy Liner Progrmming Prolem jrjeswri. P Deprtment of themtics Chikknn Government

More information

9.1 apply the distance and midpoint formulas

9.1 apply the distance and midpoint formulas 9.1 pply the distnce nd midpoint formuls DISTANCE FORMULA MIDPOINT FORMULA To find the midpoint between two points x, y nd x y 1 1,, we Exmple 1: Find the distnce between the two points. Then, find the

More information

APPLICATIONS OF INTEGRATION

APPLICATIONS OF INTEGRATION Chpter 3 DACS 1 Lok 004/05 CHAPTER 5 APPLICATIONS OF INTEGRATION 5.1 Geometricl Interprettion-Definite Integrl (pge 36) 5. Are of Region (pge 369) 5..1 Are of Region Under Grph (pge 369) Figure 5.7 shows

More information

Lecture Overview. Knowledge-based systems in Bioinformatics, 1MB602. Procedural abstraction. The sum procedure. Integration as a procedure

Lecture Overview. Knowledge-based systems in Bioinformatics, 1MB602. Procedural abstraction. The sum procedure. Integration as a procedure Lecture Overview Knowledge-bsed systems in Bioinformtics, MB6 Scheme lecture Procedurl bstrction Higher order procedures Procedures s rguments Procedures s returned vlues Locl vribles Dt bstrction Compound

More information

INTRODUCTION TO SIMPLICIAL COMPLEXES

INTRODUCTION TO SIMPLICIAL COMPLEXES INTRODUCTION TO SIMPLICIAL COMPLEXES CASEY KELLEHER AND ALESSANDRA PANTANO 0.1. Introduction. In this ctivity set we re going to introduce notion from Algebric Topology clled simplicil homology. The min

More information

5/9/17. Lesson 51 - FTC PART 2. Review FTC, PART 1. statement as the Integral Evaluation Theorem as it tells us HOW to evaluate the definite integral

5/9/17. Lesson 51 - FTC PART 2. Review FTC, PART 1. statement as the Integral Evaluation Theorem as it tells us HOW to evaluate the definite integral Lesson - FTC PART 2 Review! We hve seen definition/formul for definite integrl s n b A() = lim f ( i )Δ = f ()d = F() = F(b) F() n i=! where F () = f() (or F() is the ntiderivtive of f() b! And hve seen

More information

Lily Yen and Mogens Hansen

Lily Yen and Mogens Hansen SKOLID / SKOLID No. 8 Lily Yen nd Mogens Hnsen Skolid hs joined Mthemticl Myhem which is eing reformtted s stnd-lone mthemtics journl for high school students. Solutions to prolems tht ppered in the lst

More information

50 AMC LECTURES Lecture 2 Analytic Geometry Distance and Lines. can be calculated by the following formula:

50 AMC LECTURES Lecture 2 Analytic Geometry Distance and Lines. can be calculated by the following formula: 5 AMC LECTURES Lecture Anlytic Geometry Distnce nd Lines BASIC KNOWLEDGE. Distnce formul The distnce (d) between two points P ( x, y) nd P ( x, y) cn be clculted by the following formul: d ( x y () x )

More information

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards A Tutology Checker loosely relted to Stålmrck s Algorithm y Mrtin Richrds mr@cl.cm.c.uk http://www.cl.cm.c.uk/users/mr/ University Computer Lortory New Museum Site Pemroke Street Cmridge, CB2 3QG Mrtin

More information

Hyperbolas. Definition of Hyperbola

Hyperbolas. Definition of Hyperbola CHAT Pre-Clculus Hyperols The third type of conic is clled hyperol. For n ellipse, the sum of the distnces from the foci nd point on the ellipse is fixed numer. For hyperol, the difference of the distnces

More information

Thirty-fourth Annual Columbus State Invitational Mathematics Tournament. Instructions

Thirty-fourth Annual Columbus State Invitational Mathematics Tournament. Instructions Thirty-fourth Annul Columbus Stte Invittionl Mthemtics Tournment Sponsored by Columbus Stte University Deprtment of Mthemtics Februry, 008 ************************* The Mthemtics Deprtment t Columbus Stte

More information

ASTs, Regex, Parsing, and Pretty Printing

ASTs, Regex, Parsing, and Pretty Printing ASTs, Regex, Prsing, nd Pretty Printing CS 2112 Fll 2016 1 Algeric Expressions To strt, consider integer rithmetic. Suppose we hve the following 1. The lphet we will use is the digits {0, 1, 2, 3, 4, 5,

More information

Math 464 Fall 2012 Notes on Marginal and Conditional Densities October 18, 2012

Math 464 Fall 2012 Notes on Marginal and Conditional Densities October 18, 2012 Mth 464 Fll 2012 Notes on Mrginl nd Conditionl Densities klin@mth.rizon.edu October 18, 2012 Mrginl densities. Suppose you hve 3 continuous rndom vribles X, Y, nd Z, with joint density f(x,y,z. The mrginl

More information

MA 124 (Calculus II) Lecture 2: January 24, 2019 Section A3. Professor Jennifer Balakrishnan,

MA 124 (Calculus II) Lecture 2: January 24, 2019 Section A3. Professor Jennifer Balakrishnan, Wht is on tody Professor Jennifer Blkrishnn, jbl@bu.edu 1 Velocity nd net chnge 1 2 Regions between curves 3 1 Velocity nd net chnge Briggs-Cochrn-Gillett 6.1 pp. 398-46 Suppose you re driving long stright

More information

Efficient K-NN Search in Polyphonic Music Databases Using a Lower Bounding Mechanism

Efficient K-NN Search in Polyphonic Music Databases Using a Lower Bounding Mechanism Efficient K-NN Serch in Polyphonic Music Dtses Using Lower Bounding Mechnism Ning-Hn Liu Deprtment of Computer Science Ntionl Tsing Hu University Hsinchu,Tiwn 300, R.O.C 886-3-575679 nhliou@yhoo.com.tw

More information

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples Outline Introduction to Programming (in C++) Introduction Programming examples Algorithms, programming languages and computer programs Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer

More information

Matlab s Numerical Integration Commands

Matlab s Numerical Integration Commands Mtlb s Numericl Integrtion Commnds The relevnt commnds we consider re qud nd dblqud, triplequd. See the Mtlb help files for other integrtion commnds. By the wy, qud refers to dptive qudrture. To integrte:

More information

Engineer To Engineer Note

Engineer To Engineer Note Engineer To Engineer Note EE-186 Technicl Notes on using Anlog Devices' DSP components nd development tools Contct our technicl support by phone: (800) ANALOG-D or e-mil: dsp.support@nlog.com Or visit

More information

Simplifying Algebra. Simplifying Algebra. Curriculum Ready.

Simplifying Algebra. Simplifying Algebra. Curriculum Ready. Simplifying Alger Curriculum Redy www.mthletics.com This ooklet is ll out turning complex prolems into something simple. You will e le to do something like this! ( 9- # + 4 ' ) ' ( 9- + 7-) ' ' Give this

More information

Data-Types Optimization for Floating-Point Formats by Program Transformation

Data-Types Optimization for Floating-Point Formats by Program Transformation Dt-Types Optimiztion for Floting-Point Formts by Progrm Trnsformtion Nsrine Dmouche University of Perpignn LAbortory of Mthemtics nd PhysicS 52 Avenue Pul Alduy 66860 Perpignn, Frnce Emil: nsrine.dmouche@univ-perp.fr

More information

6/23/2011. Review: IEEE-754. CSE 2021: Computer Organization. Exercises. Examples. Shakil M. Khan (adapted from Profs. Roumani & Asif)

6/23/2011. Review: IEEE-754. CSE 2021: Computer Organization. Exercises. Examples. Shakil M. Khan (adapted from Profs. Roumani & Asif) 6/23/2 CSE 22: Computer Orgniztion Lecture-8() Floting point computing (IEEE 754) Review: IEEE-754 single: 8 its doule: its single: 23 its doule: 52 its S Exponent Frction S x ( ) ( Frction) 2 (Exponent

More information

B. Definition: The volume of a solid of known integrable cross-section area A(x) from x = a

B. Definition: The volume of a solid of known integrable cross-section area A(x) from x = a Mth 176 Clculus Sec. 6.: Volume I. Volume By Slicing A. Introduction We will e trying to find the volume of solid shped using the sum of cross section res times width. We will e driving towrd developing

More information

Lexical Analysis. Amitabha Sanyal. (www.cse.iitb.ac.in/ as) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay

Lexical Analysis. Amitabha Sanyal. (www.cse.iitb.ac.in/ as) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay Lexicl Anlysis Amith Snyl (www.cse.iit.c.in/ s) Deprtment of Computer Science nd Engineering, Indin Institute of Technology, Bomy Septemer 27 College of Engineering, Pune Lexicl Anlysis: 2/6 Recp The input

More information

Math/CS 467/667 Programming Assignment 01. Adaptive Gauss Quadrature. q(x)p 4 (x) = 0

Math/CS 467/667 Programming Assignment 01. Adaptive Gauss Quadrature. q(x)p 4 (x) = 0 Adptive Guss Qudrture 1. Find n orthogonl polynomil p 4 of degree 4 such tht 1 1 q(x)p 4 (x) = 0 for every polynomil q(x) of degree 3 or less. You my use Mple nd the Grm Schmidt process s done in clss.

More information

Qubit allocation for quantum circuit compilers

Qubit allocation for quantum circuit compilers Quit lloction for quntum circuit compilers Nov. 10, 2017 JIQ 2017 Mrcos Yukio Sirichi Sylvin Collnge Vinícius Fernndes dos Sntos Fernndo Mgno Quintão Pereir Compilers for quntum computing The first genertion

More information

Basics of Logic Design Arithmetic Logic Unit (ALU)

Basics of Logic Design Arithmetic Logic Unit (ALU) Bsics of Logic Design Arithmetic Logic Unit (ALU) CPS 4 Lecture 9 Tody s Lecture Homework #3 Assigned Due Mrch 3 Project Groups ssigned & posted to lckord. Project Specifiction is on We Due April 9 Building

More information

MATH 25 CLASS 5 NOTES, SEP

MATH 25 CLASS 5 NOTES, SEP MATH 25 CLASS 5 NOTES, SEP 30 2011 Contents 1. A brief diversion: reltively prime numbers 1 2. Lest common multiples 3 3. Finding ll solutions to x + by = c 4 Quick links to definitions/theorems Euclid

More information

Recursive Spoke Darts: Local Hyperplane Sampling for Delaunay and Voronoi Meshing in Arbitrary Dimensions

Recursive Spoke Darts: Local Hyperplane Sampling for Delaunay and Voronoi Meshing in Arbitrary Dimensions Aville online t www.sciencedirect.com Procedi Engineering 124 (2016) 96 108 www.elsevier.com/locte/procedi 25th Interntionl Meshing Roundtle (IMR25) Recursive Spoke Drts: Locl Hyperplne Smpling for Deluny

More information

Solutions to Math 41 Final Exam December 12, 2011

Solutions to Math 41 Final Exam December 12, 2011 Solutions to Mth Finl Em December,. ( points) Find ech of the following its, with justifiction. If there is n infinite it, then eplin whether it is or. ( ) / ln() () (5 points) First we compute the it:

More information

Complete Coverage Path Planning of Mobile Robot Based on Dynamic Programming Algorithm Peng Zhou, Zhong-min Wang, Zhen-nan Li, Yang Li

Complete Coverage Path Planning of Mobile Robot Based on Dynamic Programming Algorithm Peng Zhou, Zhong-min Wang, Zhen-nan Li, Yang Li 2nd Interntionl Conference on Electronic & Mechnicl Engineering nd Informtion Technology (EMEIT-212) Complete Coverge Pth Plnning of Mobile Robot Bsed on Dynmic Progrmming Algorithm Peng Zhou, Zhong-min

More information

Parallel Square and Cube Computations

Parallel Square and Cube Computations Prllel Squre nd Cube Computtions Albert A. Liddicot nd Michel J. Flynn Computer Systems Lbortory, Deprtment of Electricl Engineering Stnford University Gtes Building 5 Serr Mll, Stnford, CA 945, USA liddicot@stnford.edu

More information

Mathematics Interventi. and Focused Mathematics Booster Packs Alignment to Eureka Math and Common Core State Standards

Mathematics Interventi. and Focused Mathematics Booster Packs Alignment to Eureka Math and Common Core State Standards Focused Mthemtics Intervention nd Focused Mthemtics Booster Pcks lignment to Eurek Mth nd Common Core Stte Stndrds Grdes K Finding Fctor Pirs Independent Prctice Lerning Obje ctives Write number tht is

More information

Chapter 2 Sensitivity Analysis: Differential Calculus of Models

Chapter 2 Sensitivity Analysis: Differential Calculus of Models Chpter 2 Sensitivity Anlysis: Differentil Clculus of Models Abstrct Models in remote sensing nd in science nd engineering, in generl re, essentilly, functions of discrete model input prmeters, nd/or functionls

More information

Performance enhancement of IEEE DCF using novel backoff algorithm

Performance enhancement of IEEE DCF using novel backoff algorithm Kuo et l. EURASIP Journl on Wireless Communictions nd Networking 212, 212:274 http://jis.eursipjournls.com/content/212/1/274 RESEARCH Open Access Performnce enhncement of IEEE 82.11 using novel ckoff lgorithm

More information

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012 Dynmic Progrmming Andres Klppenecker [prtilly bsed on slides by Prof. Welch] 1 Dynmic Progrmming Optiml substructure An optiml solution to the problem contins within it optiml solutions to subproblems.

More information

The notation y = f(x) gives a way to denote specific values of a function. The value of f at a can be written as f( a ), read f of a.

The notation y = f(x) gives a way to denote specific values of a function. The value of f at a can be written as f( a ), read f of a. Chpter Prerequisites for Clculus. Functions nd Grphs Wht ou will lern out... Functions Domins nd Rnges Viewing nd Interpreting Grphs Even Functions nd Odd Functions Smmetr Functions Defined in Pieces Asolute

More information

TOWARDS GRADIENT BASED AERODYNAMIC OPTIMIZATION OF WIND TURBINE BLADES USING OVERSET GRIDS

TOWARDS GRADIENT BASED AERODYNAMIC OPTIMIZATION OF WIND TURBINE BLADES USING OVERSET GRIDS TOWARDS GRADIENT BASED AERODYNAMIC OPTIMIZATION OF WIND TURBINE BLADES USING OVERSET GRIDS S. H. Jongsm E. T. A. vn de Weide H. W. M. Hoeijmkers Overset symposium 10-18-2012 Deprtment of mechnicl engineering

More information

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications.

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications. 15-112 Fll 2018 Midterm 1 October 11, 2018 Nme: Andrew ID: Recittion Section: ˆ You my not use ny books, notes, extr pper, or electronic devices during this exm. There should be nothing on your desk or

More information

Solution of Linear Algebraic Equations using the Gauss-Jordan Method

Solution of Linear Algebraic Equations using the Gauss-Jordan Method Solution of Liner Algebric Equtions using the Guss-Jordn Method Populr pproch for solving liner equtions The Guss Jordn method depends on two properties of liner equtions: Scling one or more of ny of the

More information

ScienceDirect. Recursive Spoke Darts: Local Hyperplane Sampling for Delaunay and Voronoi Meshing in Arbitrary Dimensions

ScienceDirect. Recursive Spoke Darts: Local Hyperplane Sampling for Delaunay and Voronoi Meshing in Arbitrary Dimensions Aville online t www.sciencedirect.com ScienceDirect Procedi Engineering 163 (2016 ) 110 122 25th Interntionl Meshing Roundtle (IMR25) Recursive Spoke Drts: Locl Hyperplne Smpling for Deluny nd Voronoi

More information

1.1. Interval Notation and Set Notation Essential Question When is it convenient to use set-builder notation to represent a set of numbers?

1.1. Interval Notation and Set Notation Essential Question When is it convenient to use set-builder notation to represent a set of numbers? 1.1 TEXAS ESSENTIAL KNOWLEDGE AND SKILLS Prepring for 2A.6.K, 2A.7.I Intervl Nottion nd Set Nottion Essentil Question When is it convenient to use set-uilder nottion to represent set of numers? A collection

More information

Final Exam Review F 06 M 236 Be sure to look over all of your tests, as well as over the activities you did in the activity book

Final Exam Review F 06 M 236 Be sure to look over all of your tests, as well as over the activities you did in the activity book inl xm Review 06 M 236 e sure to loo over ll of your tests, s well s over the tivities you did in the tivity oo 1 1. ind the mesures of the numered ngles nd justify your wor. Line j is prllel to line.

More information

8.2 Areas in the Plane

8.2 Areas in the Plane 39 Chpter 8 Applictions of Definite Integrls 8. Ares in the Plne Wht ou will lern out... Are Between Curves Are Enclosed Intersecting Curves Boundries with Chnging Functions Integrting with Respect to

More information

Topic: Software Model Checking via Counter-Example Guided Abstraction Refinement. Having a BLAST with SLAM. Combining Strengths. SLAM Overview SLAM

Topic: Software Model Checking via Counter-Example Guided Abstraction Refinement. Having a BLAST with SLAM. Combining Strengths. SLAM Overview SLAM Hving BLAST with SLAM Topic: Softwre Model Checking vi Counter-Exmple Guided Abstrction Refinement There re esily two dozen SLAM/BLAST/MAGIC ppers; I will skim. # # Theorem Proving Combining Strengths

More information

Announcements. CS 188: Artificial Intelligence Fall Recap: Search. Today. General Tree Search. Uniform Cost. Lecture 3: A* Search 9/4/2007

Announcements. CS 188: Artificial Intelligence Fall Recap: Search. Today. General Tree Search. Uniform Cost. Lecture 3: A* Search 9/4/2007 CS 88: Artificil Intelligence Fll 2007 Lecture : A* Serch 9/4/2007 Dn Klein UC Berkeley Mny slides over the course dpted from either Sturt Russell or Andrew Moore Announcements Sections: New section 06:

More information

AI Adjacent Fields. This slide deck courtesy of Dan Klein at UC Berkeley

AI Adjacent Fields. This slide deck courtesy of Dan Klein at UC Berkeley AI Adjcent Fields Philosophy: Logic, methods of resoning Mind s physicl system Foundtions of lerning, lnguge, rtionlity Mthemtics Forml representtion nd proof Algorithms, computtion, (un)decidility, (in)trctility

More information

MATH 2530: WORKSHEET 7. x 2 y dz dy dx =

MATH 2530: WORKSHEET 7. x 2 y dz dy dx = MATH 253: WORKSHT 7 () Wrm-up: () Review: polr coordintes, integrls involving polr coordintes, triple Riemnn sums, triple integrls, the pplictions of triple integrls (especilly to volume), nd cylindricl

More information

Lexical analysis, scanners. Construction of a scanner

Lexical analysis, scanners. Construction of a scanner Lexicl nlysis scnners (NB. Pges 4-5 re for those who need to refresh their knowledge of DFAs nd NFAs. These re not presented during the lectures) Construction of scnner Tools: stte utomt nd trnsition digrms.

More information

Engineer To Engineer Note

Engineer To Engineer Note Engineer To Engineer Note EE-169 Technicl Notes on using Anlog Devices' DSP components nd development tools Contct our technicl support by phone: (800) ANALOG-D or e-mil: dsp.support@nlog.com Or visit

More information