Lecture Notes CMSC 251. Figure 14: Partitioning intermediate structure.

Size: px
Start display at page:

Download "Lecture Notes CMSC 251. Figure 14: Partitioning intermediate structure."

Transcription

1 Lecture Note CMSC 51 p p x? x < x >= x? wap r r Itermediate cofiguratio Iitial cofiguratio < x x >= x Fial cofiguratio Figure 14: Partitioig itermediate tructure. all of the elemet have bee proceed. To fiih thig off we wap A[p] the pivot with A[], ad retur the value of. Here i the complete code: Partitio Partitioit p, it r, array A { x = A[p] = p for = p+1 to r do { if A[] < x { = +1 wap A[] with A[] wap A[p] with A[] retur // 3-way partitio of A[p..r] // pivot item i A[p] // put the pivot ito fial poitio // retur locatio of pivot A example i how below. Lecture 15: QuickSort Tueday, Mar 17, 1998 Revied: March 18. Fixed a bug i the aalyi. Read: Chapt 8 i CLR. My preetatio ad aalyi are omewhat differet tha the text. QuickSort ad Radomized Algorithm: Early i the emeter we dicued the fact that we uually tudy the wort-cae ruig time of algorithm, but ometime average-cae i a more meaigful meaure. Today we will tudy QuickSort. It i a wort-cae Θ algorithm, whoe expected-cae ruig time i Θ log. We will preet QuickSort a a radomized algorithm, that i, a algorithm which make radom choice. There are two commo type of radomized algorithm: Mote Carlo algorithm: Thee algorithm may produce the wrog reult, but the probability of thi occurrig ca be made arbitrarily mall by the uer. Uually the lower you make thi probability, the loger the algorithm take to ru. 47

2 Lecture Note CMSC 51 p r Fial wap Figure 15: Partitioig example. La Vega algorithm: Thee algorithm alway produce the correct reult, but the ruig time i a radom variable. I thee cae the expected ruig time, averaged over all poible radom choice i the meaure of the algorithm ruig time. The mot well kow Mote Carlo algorithm i oe for determiig whether a umber i prime. Thi i a importat problem i cryptography. The QuickSort algorithm that we will dicu today i a example of a La Vega algorithm. Note that QuickSort doe ot eed to be implemeted a a radomized algorithm, but a we hall ee, thi i geerally coidered the afet implemetatio. QuickSort Overview: QuickSort i alo baed o the divide-ad-couer deig paradigm. Ulike Merge- Sort where mot of the work i doe after the recurive call retur, i QuickSort the work i doe before the recurive call i made. Here i a overview of QuickSort. Note the imilarity with the electio algorithm, which we dicued earlier. Let A[p..r] be the ubarray to be orted. The iitial call i to A[1..]. Bai: If the lit cotai 0 or 1 elemet, the retur. Select pivot: Select a radom elemet x from the array, called the pivot. Partitio: Partitio the array i three ubarray, thoe elemet A[1.. 1] x, A[] = x, ad A[ +1..] x. Recure: Recurively ort A[1.. 1] ad A[ +1..]. The peudocode for QuickSort i give below. The iitial call i QuickSort1,, A. The Partitio routie wa dicued lat time. Recall that Partitio aume that the pivot i tored i the firt elemet of A. Sice we wat a radom pivot, we pick a radom idex i from p to r, ad the wap A[i] with A[p]. QuickSort QuickSortit p, it r, array A { if r <= p retur i = a radom idex from [p..r] // Sort A[p..r] // 0 or 1 item, retur // pick a radom elemet 48

3 Lecture Note CMSC 51 wap A[i] with A[p] = Partitiop, r, A QuickSortp, -1, A QuickSort+1, r, A // wap pivot ito A[p] // partitio A about pivot // ort A[p..-1] // ort A[+1..r] QuickSort Aalyi: The correcte of QuickSort hould be pretty obviou. However it aalyi i ot o obviou. It tur out that the ruig time of QuickSort deped heavily o how good a job we do i electig the pivot. I particular, if the rak of the pivot recall that thi mea it poitio i the fial orted lit i very large or very mall, the the partitio will be ubalaced. We will ee that ubalaced partitio like ubalaced biary tree are bad, ad reult i poor ruig time. However, if the rak of the pivot i aywhere ear the middle portio of the array, the the plit will be reaoably well balaced, ad the overall ruig time will be good. Sice the pivot i choe at radom by our algorithm, we may do well mot of the time ad poorly occaioally. We will ee that the expected ruig time i O log. Wort-cae Aalyi: Let begi by coiderig the wort-cae performace, becaue it i eaier tha the average cae. Sice thi i a recurive program, it i atural to ue a recurrece to decribe it ruig time. But ulike MergeSort, where we had cotrol over the ize of the recurive call, here we do ot. It deped o how the pivot i choe. Suppoe that we are ortig a array of ize, A[1..], ad further uppoe that the pivot that we elect i of rak, for ome i the rage 1 to. It take Θ time to do the partitioig ad other overhead, ad we make two recurive call. The firt i to the ubarray A[1.. 1] which ha 1 elemet, ad the other i to the ubarray A[ +1..] which ha r +1+1=r elemet. So if we igore the Θ a uual we get the recurrece: T =T 1 + T +. Thi deped o the value of. To get the wort cae, we maximize over all poible value of. Aa bai we have that T 0 = T 1 = Θ1. Puttig thi together we have { 1 if 1 T = max 1 T 1 + T + otherwie. Recurrece that have max ad mi embedded i them are very mey to olve. The key i determiig which value of give the maximum. A rule of thumb of algorithm aalyi i that the wort cae ted to happe either at the extreme or i the middle. So I would plug i the value =1,=, ad = / ad work each out. I thi cae, the wort cae happe at either of the extreme but ee the book for a more careful aalyi baed o a aalyi of the ecod derivative. If we expad the recurrece i the cae =1we get: T T 0 + T 1 + = 1+T 1 + = T 1++1 = T = T = T =... = k T k+ i. i= 1 49

4 Lecture Note CMSC 51 For the bai, T 1=1we et k = 1 ad get 3 T T 1 + i i= 1 = i = i= O. I fact, a more careful aalyi reveal that it i Θ i thi cae. Average-cae Aalyi: Next we how that i the average cae QuickSort ru i Θ log time. Whe we talked about average-cae aalyi at the begiig of the emeter, we aid that it deped o ome aumptio about the ditributio of iput. However, i thi cae, the aalyi doe ot deped o the iput ditributio at all it oly deped o the radom choice that the algorithm make. Thi i good, becaue it mea that the aalyi of the algorithm performace i the ame for all iput. I thi cae the average i computed over all poible radom choice that the algorithm might make for the choice of the pivot idex i the ecod tep of the QuickSort procedure above. To aalyze the average ruig time, we let T deote the average ruig time of QuickSort o a lit of ize. It will implify the aalyi to aume that all of the elemet are ditict. The algorithm ha radom choice for the pivot elemet, ad each choice ha a eual probability of 1/ of occurig. So we ca modify the above recurrece to compute a average rather tha a max, givig: { 1 if 1 T = 1 =1 T 1 + T + otherwie. Thi i ot a tadard recurrece, o we caot apply the Mater Theorem. Expaio i poible, but rather tricky. Itead, we will attempt a cotructive iductio to olve it. We kow that we wat a Θ log ruig time, o let try T a lg + b. Properly we hould write lg becaue ulike MergeSort, we caot aume that the recurive call will be made o array ize that are power of, but we ll be loppy becaue thig will be mey eough ayway. Theorem: There exit a cotat c uch that T c l, for all. Notice that we have replaced lg with l. Thi ha bee doe to make the proof eaier, a we hall ee. Proof: The proof i by cotructive iductio o. For the bai cae =we have T = 1 T 1 + T + =1 = 1 T 0 + T T 1 + T 0 + = 8 = 4. We wat thi to be at mot climplyig that c 4/ l.885. For the iductio tep, we aume that 3, ad the iductio hypothei i that for ay <, we have T c l. We wat to prove it i true for T. By expadig the defiitio of T, ad movig the factor of outide the um we have: T = 1 = 1 T 1 + T + =1 T 1 + T +. =1 50

5 Lecture Note CMSC 51 Oberve that if we plit the um ito two um, they both add the ame value T 0 + T T 1, jut that oe cout up ad the other cout dow. Thu we ca replace thi with 1 =0 T. Becaue they do t follow the formula, we ll extract T 0 ad T 1 ad treat them pecially. If we make thi ubtitutio ad apply the iductio hypothei to the remaiig um we have which we ca becaue <wehave T = 1 T + = 1 T 0 + T 1 + T + = c lg + = = c 1 c l = We have ever ee thi um before. Later we will how that 1 S = l l 4. Aumig thi for ow, we have = T = c l = c l c = c l + 1 c + 4. To fiih the proof, we wat all of thi to be at mot c l. If we cacel the commo c l we ee that thi will be true if we elect c uch that 1 c After ome imple maipulatio we ee that thi i euivalet to: = 0 c + 4 c + 4 c + 8. Sice 3, we oly eed to elect c o that c + 8 9, ad o electig c =3will work. From the bai cae we have c.885, o we may chooe c =3to atify both the cotrait. The Leftover Sum: The oly miig elemet to the proof i dealig with the um 1 S = l. = 51

6 Lecture Note CMSC 51 To boud thi, recall the itegratio formula for boudig ummatio which we paraphrae here. For ay mootoically icreaig fuctio fx b 1 fi i=a b a fxdx. The fuctio fx =xl x i mootoically icreaig, ad o we have S x l xdx. If you are a calculu macho ma, the you ca itegrate thi by part, ad if you are a calculu wimp like me the you ca look it up i a book of itegral x l xdx = x x l x 4 = l l 1 l 4 4. x= Thi complete the ummatio boud, ad hece the etire proof. Summary: So eve though the wort-cae ruig time of QuickSort i Θ, the average-cae ruig time i Θ log. Although we did ot how it, it tur out that thi doe t jut happe much of the time. For large value of, the ruig time i Θ log with high probability. I order to get Θ time the algorithm mut make poor choice for the pivot at virtually every tep. Poor choice are rare, ad o cotiuouly makig poor choice are very rare. You might ak, could we make QuickSort determiitic Θ log by callig the electio algorithm to ue the media a the pivot. The awer i that thi would work, but the reultig algorithm would be o low practically that o oe would ever ue it. QuickSort like MergeSort i ot formally a i-place ortig algorithm, becaue it doe make ue of a recurio tack. I MergeSort ad i the expected cae for QuickSort, the ize of the tack i Olog, o thi i ot really a problem. QuickSort i the mot popular algorithm for implemetatio becaue it actual performace o typical moder architecture i o good. The reao for thi tem from the fact that ulike Heaport which ca make large jump aroud i the array, the mai work i QuickSort i partitioig ped mot of it time acceig elemet that are cloe to oe aother. The reao it ted to outperform MergeSort which alo ha good locality of referece i that mot compario are made agait the pivot elemet, which ca be tored i a regiter. I MergeSort we are alway comparig two array elemet agait each other. The mot efficiet verio of QuickSort ue the recurio for large ubarray, but oce the ize of the ubarray fall below ome miimum ize e.g. 0 it witche to a imple iterative algorithm, uch a electio ort. Lecture 16: Lower Boud for Sortig Thurday, Mar 19, 1998 Read: Chapt. 9 of CLR. Review of Sortig: So far we have ee a umber of algorithm for ortig a lit of umber i acedig order. Recall that a i-place ortig algorithm i oe that ue o additioal array torage however, we allow QuickSort to be called i-place eve though they eed a tack of ize Olog for keepig track of the recurio. A ortig algorithm i table if duplicate elemet remai i the ame relative poitio after ortig. 5

Topic 5: Confidence Intervals (Chapter 9)

Topic 5: Confidence Intervals (Chapter 9) Topic 5: Cofidece Iterval (Chapter 9) 1. Itroductio The two geeral area of tatitical iferece are: 1) etimatio of parameter(), ch. 9 ) hypothei tetig of parameter(), ch. 10 Let X be ome radom variable with

More information

Confidence Intervals for Linear Regression Slope

Confidence Intervals for Linear Regression Slope Chapter 856 Cofidece Iterval for Liear Regreio Slope Itroductio Thi routie calculate the ample ize eceary to achieve a pecified ditace from the lope to the cofidece limit at a tated cofidece level for

More information

TI-89, TI-92 Plus or Voyage 200 for Non-Business Statistics

TI-89, TI-92 Plus or Voyage 200 for Non-Business Statistics Chapter 3 TI-89, TI-9 Plu or Voyage 00 for No-Buie Statitic Eterig Data Pre [APPS], elect FlahApp the pre [ENTER]. Highlight Stat/Lit Editor the pre [ENTER]. Pre [ENTER] agai to elect the mai folder. (Note:

More information

TI-83, TI-83 Plus or TI-84 for Non-Business Statistics

TI-83, TI-83 Plus or TI-84 for Non-Business Statistics TI-83, TI-83 Plu or TI-84 for No-Buie Statitic Chapter 3 Eterig Data Pre [STAT] the firt optio i already highlighted (:Edit) o you ca either pre [ENTER] or. Make ure the curor i i the lit, ot o the lit

More information

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008 I ite Sequeces Dr. Philippe B. Laval Keesaw State Uiversity October 9, 2008 Abstract This had out is a itroductio to i ite sequeces. mai de itios ad presets some elemetary results. It gives the I ite Sequeces

More information

Infinite Sequences and Series

Infinite Sequences and Series CHAPTER 4 Ifiite Sequeces ad Series 4.1. Sequeces A sequece is a ifiite ordered list of umbers, for example the sequece of odd positive itegers: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29...

More information

5 Boolean Decision Trees (February 11)

5 Boolean Decision Trees (February 11) 5 Boolea Decisio Trees (February 11) 5.1 Graph Coectivity Suppose we are give a udirected graph G, represeted as a boolea adjacecy matrix = (a ij ), where a ij = 1 if ad oly if vertices i ad j are coected

More information

Lecture 4: Cauchy sequences, Bolzano-Weierstrass, and the Squeeze theorem

Lecture 4: Cauchy sequences, Bolzano-Weierstrass, and the Squeeze theorem Lecture 4: Cauchy sequeces, Bolzao-Weierstrass, ad the Squeeze theorem The purpose of this lecture is more modest tha the previous oes. It is to state certai coditios uder which we are guarateed that limits

More information

Lecture 2: Karger s Min Cut Algorithm

Lecture 2: Karger s Min Cut Algorithm priceto uiv. F 3 cos 5: Advaced Algorithm Desig Lecture : Karger s Mi Cut Algorithm Lecturer: Sajeev Arora Scribe:Sajeev Today s topic is simple but gorgeous: Karger s mi cut algorithm ad its extesio.

More information

3. Greatest Common Divisor - Least Common Multiple

3. Greatest Common Divisor - Least Common Multiple 3 Greatest Commo Divisor - Least Commo Multiple Defiitio 31: The greatest commo divisor of two atural umbers a ad b is the largest atural umber c which divides both a ad b We deote the greatest commo gcd

More information

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method Chapter 6: Variace, the law of large umbers ad the Mote-Carlo method Expected value, variace, ad Chebyshev iequality. If X is a radom variable recall that the expected value of X, E[X] is the average value

More information

CS103X: Discrete Structures Homework 4 Solutions

CS103X: Discrete Structures Homework 4 Solutions CS103X: Discrete Structures Homewor 4 Solutios Due February 22, 2008 Exercise 1 10 poits. Silico Valley questios: a How may possible six-figure salaries i whole dollar amouts are there that cotai at least

More information

Soving Recurrence Relations

Soving Recurrence Relations Sovig Recurrece Relatios Part 1. Homogeeous liear 2d degree relatios with costat coefficiets. Cosider the recurrece relatio ( ) T () + at ( 1) + bt ( 2) = 0 This is called a homogeeous liear 2d degree

More information

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies ( 3.1.1) Limitations of Experiments. Pseudocode ( 3.1.2) Theoretical Analysis

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies ( 3.1.1) Limitations of Experiments. Pseudocode ( 3.1.2) Theoretical Analysis Ruig Time ( 3.) Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects.

More information

Confidence Intervals (2) QMET103

Confidence Intervals (2) QMET103 Cofidece Iterval () QMET03 Library, Teachig ad Learig Geeral Remember: three value are ued to cotruct all cofidece iterval: Samle tatitic Z or t Stadard error of amle tatitic Deciio ad Parameter to idetify:

More information

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13 EECS 70 Discrete Mathematics ad Probability Theory Sprig 2014 Aat Sahai Note 13 Itroductio At this poit, we have see eough examples that it is worth just takig stock of our model of probability ad may

More information

Properties of MLE: consistency, asymptotic normality. Fisher information.

Properties of MLE: consistency, asymptotic normality. Fisher information. Lecture 3 Properties of MLE: cosistecy, asymptotic ormality. Fisher iformatio. I this sectio we will try to uderstad why MLEs are good. Let us recall two facts from probability that we be used ofte throughout

More information

Section 11.3: The Integral Test

Section 11.3: The Integral Test Sectio.3: The Itegral Test Most of the series we have looked at have either diverged or have coverged ad we have bee able to fid what they coverge to. I geeral however, the problem is much more difficult

More information

More examples for Hypothesis Testing

More examples for Hypothesis Testing More example for Hypothei Tetig Part I: Compoet 1. Null ad alterative hypothee a. The ull hypothee (H 0 ) i a tatemet that the value of a populatio parameter (mea) i equal to ome claimed value. Ex H 0:

More information

0.7 0.6 0.2 0 0 96 96.5 97 97.5 98 98.5 99 99.5 100 100.5 96.5 97 97.5 98 98.5 99 99.5 100 100.5

0.7 0.6 0.2 0 0 96 96.5 97 97.5 98 98.5 99 99.5 100 100.5 96.5 97 97.5 98 98.5 99 99.5 100 100.5 Sectio 13 Kolmogorov-Smirov test. Suppose that we have a i.i.d. sample X 1,..., X with some ukow distributio P ad we would like to test the hypothesis that P is equal to a particular distributio P 0, i.e.

More information

1. C. The formula for the confidence interval for a population mean is: x t, which was

1. C. The formula for the confidence interval for a population mean is: x t, which was s 1. C. The formula for the cofidece iterval for a populatio mea is: x t, which was based o the sample Mea. So, x is guarateed to be i the iterval you form.. D. Use the rule : p-value

More information

Overview of some probability distributions.

Overview of some probability distributions. Lecture Overview of some probability distributios. I this lecture we will review several commo distributios that will be used ofte throughtout the class. Each distributio is usually described by its probability

More information

Project Deliverables. CS 361, Lecture 28. Outline. Project Deliverables. Administrative. Project Comments

Project Deliverables. CS 361, Lecture 28. Outline. Project Deliverables. Administrative. Project Comments Project Deliverables CS 361, Lecture 28 Jared Saia Uiversity of New Mexico Each Group should tur i oe group project cosistig of: About 6-12 pages of text (ca be loger with appedix) 6-12 figures (please

More information

Basic Elements of Arithmetic Sequences and Series

Basic Elements of Arithmetic Sequences and Series MA40S PRE-CALCULUS UNIT G GEOMETRIC SEQUENCES CLASS NOTES (COMPLETED NO NEED TO COPY NOTES FROM OVERHEAD) Basic Elemets of Arithmetic Sequeces ad Series Objective: To establish basic elemets of arithmetic

More information

A probabilistic proof of a binomial identity

A probabilistic proof of a binomial identity A probabilistic proof of a biomial idetity Joatho Peterso Abstract We give a elemetary probabilistic proof of a biomial idetity. The proof is obtaied by computig the probability of a certai evet i two

More information

Example 2 Find the square root of 0. The only square root of 0 is 0 (since 0 is not positive or negative, so those choices don t exist here).

Example 2 Find the square root of 0. The only square root of 0 is 0 (since 0 is not positive or negative, so those choices don t exist here). BEGINNING ALGEBRA Roots ad Radicals (revised summer, 00 Olso) Packet to Supplemet the Curret Textbook - Part Review of Square Roots & Irratioals (This portio ca be ay time before Part ad should mostly

More information

3D BUILDING MODEL RECONSTRUCTION FROM POINT CLOUDS AND GROUND PLANS

3D BUILDING MODEL RECONSTRUCTION FROM POINT CLOUDS AND GROUND PLANS 3D BUILDING MODEL RECONSTRUCTION FROM POINT CLOUDS AND GROUND PLANS George Voelma ad Sader Dijkma Departmet of Geodey Delft Uiverity of Techology The Netherlad g.voelma@geo.tudelft.l KEY WORDS: Buildig

More information

Repeating Decimals are decimal numbers that have number(s) after the decimal point that repeat in a pattern.

Repeating Decimals are decimal numbers that have number(s) after the decimal point that repeat in a pattern. 5.5 Fractios ad Decimals Steps for Chagig a Fractio to a Decimal. Simplify the fractio, if possible. 2. Divide the umerator by the deomiator. d d Repeatig Decimals Repeatig Decimals are decimal umbers

More information

.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth

.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth Questio 1: What is a ordiary auity? Let s look at a ordiary auity that is certai ad simple. By this, we mea a auity over a fixed term whose paymet period matches the iterest coversio period. Additioally,

More information

Domain 1: Designing a SQL Server Instance and a Database Solution

Domain 1: Designing a SQL Server Instance and a Database Solution Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) 1-800-418-6789 Domai 1: Desigig a SQL Server Istace ad a Database Solutio Desigig for CPU, Memory ad Storage Capacity Requiremets Whe desigig a

More information

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES Read Sectio 1.5 (pages 5 9) Overview I Sectio 1.5 we lear to work with summatio otatio ad formulas. We will also itroduce a brief overview of sequeces,

More information

Unit 11 Using Linear Regression to Describe Relationships

Unit 11 Using Linear Regression to Describe Relationships Unit 11 Uing Linear Regreion to Decribe Relationhip Objective: To obtain and interpret the lope and intercept of the leat quare line for predicting a quantitative repone variable from a quantitative explanatory

More information

T-test for dependent Samples. Difference Scores. The t Test for Dependent Samples. The t Test for Dependent Samples. s D

T-test for dependent Samples. Difference Scores. The t Test for Dependent Samples. The t Test for Dependent Samples. s D The t Tet for ependent Sample T-tet for dependent Sample (ak.a., Paired ample t-tet, Correlated Group eign, Within- Subject eign, Repeated Meaure,.. Repeated-Meaure eign When you have two et of core from

More information

CS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations

CS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations CS3A Hadout 3 Witer 00 February, 00 Solvig Recurrece Relatios Itroductio A wide variety of recurrece problems occur i models. Some of these recurrece relatios ca be solved usig iteratio or some other ad

More information

On k-connectivity and Minimum Vertex Degree in Random s-intersection Graphs

On k-connectivity and Minimum Vertex Degree in Random s-intersection Graphs O k-coectivity ad Miimum Vertex Degree i Radom -Iterectio Graph Ju Zhao Oma Yağa Virgil Gligor CyLab ad Dept. of ECE Caregie Mello Uiverity Email: {juzhao, oyaga, virgil}@adrew.cmu.edu Abtract Radom -iterectio

More information

Quantitative Computer Architecture

Quantitative Computer Architecture Performace Measuremet ad Aalysis i Computer Quatitative Computer Measuremet Model Iovatio Proposed How to measure, aalyze, ad specify computer system performace or My computer is faster tha your computer!

More information

On Formula to Compute Primes. and the n th Prime

On Formula to Compute Primes. and the n th Prime Applied Mathematical cieces, Vol., 0, o., 35-35 O Formula to Compute Primes ad the th Prime Issam Kaddoura Lebaese Iteratioal Uiversity Faculty of Arts ad cieces, Lebao issam.kaddoura@liu.edu.lb amih Abdul-Nabi

More information

A technical guide to 2014 key stage 2 to key stage 4 value added measures

A technical guide to 2014 key stage 2 to key stage 4 value added measures A technical guide to 2014 key tage 2 to key tage 4 value added meaure CONTENTS Introduction: PAGE NO. What i value added? 2 Change to value added methodology in 2014 4 Interpretation: Interpreting chool

More information

How To Solve The Homewor Problem Beautifully

How To Solve The Homewor Problem Beautifully Egieerig 33 eautiful Homewor et 3 of 7 Kuszmar roblem.5.5 large departmet store sells sport shirts i three sizes small, medium, ad large, three patters plaid, prit, ad stripe, ad two sleeve legths log

More information

Math C067 Sampling Distributions

Math C067 Sampling Distributions Math C067 Samplig Distributios Sample Mea ad Sample Proportio Richard Beigel Some time betwee April 16, 2007 ad April 16, 2007 Examples of Samplig A pollster may try to estimate the proportio of voters

More information

Concept: Types of algorithms

Concept: Types of algorithms Discrete Math for Bioiformatics WS 10/11:, by A. Bockmayr/K. Reiert, 18. Oktober 2010, 21:22 1001 Cocept: Types of algorithms The expositio is based o the followig sources, which are all required readig:

More information

Determining the sample size

Determining the sample size Determiig the sample size Oe of the most commo questios ay statisticia gets asked is How large a sample size do I eed? Researchers are ofte surprised to fid out that the aswer depeds o a umber of factors

More information

Incremental calculation of weighted mean and variance

Incremental calculation of weighted mean and variance Icremetal calculatio of weighted mea ad variace Toy Fich faf@cam.ac.uk dot@dotat.at Uiversity of Cambridge Computig Service February 009 Abstract I these otes I eplai how to derive formulae for umerically

More information

12.4 Problems. Excerpt from "Introduction to Geometry" 2014 AoPS Inc. Copyrighted Material CHAPTER 12. CIRCLES AND ANGLES

12.4 Problems. Excerpt from Introduction to Geometry 2014 AoPS Inc.  Copyrighted Material CHAPTER 12. CIRCLES AND ANGLES HTER 1. IRLES N NGLES Excerpt from "Introduction to Geometry" 014 os Inc. onider the circle with diameter O. all thi circle. Why mut hit O in at leat two di erent point? (b) Why i it impoible for to hit

More information

A Combined Continuous/Binary Genetic Algorithm for Microstrip Antenna Design

A Combined Continuous/Binary Genetic Algorithm for Microstrip Antenna Design A Combied Cotiuous/Biary Geetic Algorithm for Microstrip Atea Desig Rady L. Haupt The Pesylvaia State Uiversity Applied Research Laboratory P. O. Box 30 State College, PA 16804-0030 haupt@ieee.org Abstract:

More information

SAMPLE QUESTIONS FOR FINAL EXAM. (1) (2) (3) (4) Find the following using the definition of the Riemann integral: (2x + 1)dx

SAMPLE QUESTIONS FOR FINAL EXAM. (1) (2) (3) (4) Find the following using the definition of the Riemann integral: (2x + 1)dx SAMPLE QUESTIONS FOR FINAL EXAM REAL ANALYSIS I FALL 006 3 4 Fid the followig usig the defiitio of the Riema itegral: a 0 x + dx 3 Cosider the partitio P x 0 3, x 3 +, x 3 +,......, x 3 3 + 3 of the iterval

More information

Sequences and Series

Sequences and Series CHAPTER 9 Sequeces ad Series 9.. Covergece: Defiitio ad Examples Sequeces The purpose of this chapter is to itroduce a particular way of geeratig algorithms for fidig the values of fuctios defied by their

More information

Measures of Spread and Boxplots Discrete Math, Section 9.4

Measures of Spread and Boxplots Discrete Math, Section 9.4 Measures of Spread ad Boxplots Discrete Math, Sectio 9.4 We start with a example: Example 1: Comparig Mea ad Media Compute the mea ad media of each data set: S 1 = {4, 6, 8, 10, 1, 14, 16} S = {4, 7, 9,

More information

Chapter 14 Nonparametric Statistics

Chapter 14 Nonparametric Statistics Chapter 14 Noparametric Statistics A.K.A. distributio-free statistics! Does ot deped o the populatio fittig ay particular type of distributio (e.g, ormal). Sice these methods make fewer assumptios, they

More information

where: T = number of years of cash flow in investment's life n = the year in which the cash flow X n i = IRR = the internal rate of return

where: T = number of years of cash flow in investment's life n = the year in which the cash flow X n i = IRR = the internal rate of return EVALUATING ALTERNATIVE CAPITAL INVESTMENT PROGRAMS By Ke D. Duft, Extesio Ecoomist I the March 98 issue of this publicatio we reviewed the procedure by which a capital ivestmet project was assessed. The

More information

Asymptotic Growth of Functions

Asymptotic Growth of Functions CMPS Itroductio to Aalysis of Algorithms Fall 3 Asymptotic Growth of Fuctios We itroduce several types of asymptotic otatio which are used to compare the performace ad efficiecy of algorithms As we ll

More information

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature.

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature. Itegrated Productio ad Ivetory Cotrol System MRP ad MRP II Framework of Maufacturig System Ivetory cotrol, productio schedulig, capacity plaig ad fiacial ad busiess decisios i a productio system are iterrelated.

More information

THE REGRESSION MODEL IN MATRIX FORM. For simple linear regression, meaning one predictor, the model is. for i = 1, 2, 3,, n

THE REGRESSION MODEL IN MATRIX FORM. For simple linear regression, meaning one predictor, the model is. for i = 1, 2, 3,, n We will cosider the liear regressio model i matrix form. For simple liear regressio, meaig oe predictor, the model is i = + x i + ε i for i =,,,, This model icludes the assumptio that the ε i s are a sample

More information

Your organization has a Class B IP address of 166.144.0.0 Before you implement subnetting, the Network ID and Host ID are divided as follows:

Your organization has a Class B IP address of 166.144.0.0 Before you implement subnetting, the Network ID and Host ID are divided as follows: Subettig Subettig is used to subdivide a sigle class of etwork i to multiple smaller etworks. Example: Your orgaizatio has a Class B IP address of 166.144.0.0 Before you implemet subettig, the Network

More information

Definition. A variable X that takes on values X 1, X 2, X 3,...X k with respective frequencies f 1, f 2, f 3,...f k has mean

Definition. A variable X that takes on values X 1, X 2, X 3,...X k with respective frequencies f 1, f 2, f 3,...f k has mean 1 Social Studies 201 October 13, 2004 Note: The examples i these otes may be differet tha used i class. However, the examples are similar ad the methods used are idetical to what was preseted i class.

More information

Confidence Intervals. CI for a population mean (σ is known and n > 30 or the variable is normally distributed in the.

Confidence Intervals. CI for a population mean (σ is known and n > 30 or the variable is normally distributed in the. Cofidece Itervals A cofidece iterval is a iterval whose purpose is to estimate a parameter (a umber that could, i theory, be calculated from the populatio, if measuremets were available for the whole populatio).

More information

Notes on exponential generating functions and structures.

Notes on exponential generating functions and structures. Notes o expoetial geeratig fuctios ad structures. 1. The cocept of a structure. Cosider the followig coutig problems: (1) to fid for each the umber of partitios of a -elemet set, (2) to fid for each the

More information

v = x t = x 2 x 1 t 2 t 1 The average speed of the particle is absolute value of the average velocity and is given Distance travelled t

v = x t = x 2 x 1 t 2 t 1 The average speed of the particle is absolute value of the average velocity and is given Distance travelled t Chapter 2 Motion in One Dimenion 2.1 The Important Stuff 2.1.1 Poition, Time and Diplacement We begin our tudy of motion by conidering object which are very mall in comparion to the ize of their movement

More information

Output Analysis (2, Chapters 10 &11 Law)

Output Analysis (2, Chapters 10 &11 Law) B. Maddah ENMG 6 Simulatio 05/0/07 Output Aalysis (, Chapters 10 &11 Law) Comparig alterative system cofiguratio Sice the output of a simulatio is radom, the comparig differet systems via simulatio should

More information

LECTURE 13: Cross-validation

LECTURE 13: Cross-validation LECTURE 3: Cross-validatio Resampli methods Cross Validatio Bootstrap Bias ad variace estimatio with the Bootstrap Three-way data partitioi Itroductio to Patter Aalysis Ricardo Gutierrez-Osua Texas A&M

More information

THE ABRACADABRA PROBLEM

THE ABRACADABRA PROBLEM THE ABRACADABRA PROBLEM FRANCESCO CARAVENNA Abstract. We preset a detailed solutio of Exercise E0.6 i [Wil9]: i a radom sequece of letters, draw idepedetly ad uiformly from the Eglish alphabet, the expected

More information

Our aim is to show that under reasonable assumptions a given 2π-periodic function f can be represented as convergent series

Our aim is to show that under reasonable assumptions a given 2π-periodic function f can be represented as convergent series 8 Fourier Series Our aim is to show that uder reasoable assumptios a give -periodic fuctio f ca be represeted as coverget series f(x) = a + (a cos x + b si x). (8.) By defiitio, the covergece of the series

More information

CASE STUDY ALLOCATE SOFTWARE

CASE STUDY ALLOCATE SOFTWARE CASE STUDY ALLOCATE SOFTWARE allocate caetud y TABLE OF CONTENTS #1 ABOUT THE CLIENT #2 OUR ROLE #3 EFFECTS OF OUR COOPERATION #4 BUSINESS PROBLEM THAT WE SOLVED #5 CHALLENGES #6 WORKING IN SCRUM #7 WHAT

More information

CHAPTER 7: Central Limit Theorem: CLT for Averages (Means)

CHAPTER 7: Central Limit Theorem: CLT for Averages (Means) CHAPTER 7: Cetral Limit Theorem: CLT for Averages (Meas) X = the umber obtaied whe rollig oe six sided die oce. If we roll a six sided die oce, the mea of the probability distributio is X P(X = x) Simulatio:

More information

Universal coding for classes of sources

Universal coding for classes of sources Coexios module: m46228 Uiversal codig for classes of sources Dever Greee This work is produced by The Coexios Project ad licesed uder the Creative Commos Attributio Licese We have discussed several parametric

More information

Review of Multiple Regression Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised January 13, 2015

Review of Multiple Regression Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised January 13, 2015 Review of Multiple Regreion Richard William, Univerity of Notre Dame, http://www3.nd.edu/~rwilliam/ Lat revied January 13, 015 Aumption about prior nowledge. Thi handout attempt to ummarize and yntheize

More information

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed. This documet was writte ad copyrighted by Paul Dawkis. Use of this documet ad its olie versio is govered by the Terms ad Coditios of Use located at http://tutorial.math.lamar.edu/terms.asp. The olie versio

More information

INFINITE SERIES KEITH CONRAD

INFINITE SERIES KEITH CONRAD INFINITE SERIES KEITH CONRAD. Itroductio The two basic cocepts of calculus, differetiatio ad itegratio, are defied i terms of limits (Newto quotiets ad Riema sums). I additio to these is a third fudametal

More information

WHEN IS THE (CO)SINE OF A RATIONAL ANGLE EQUAL TO A RATIONAL NUMBER?

WHEN IS THE (CO)SINE OF A RATIONAL ANGLE EQUAL TO A RATIONAL NUMBER? WHEN IS THE (CO)SINE OF A RATIONAL ANGLE EQUAL TO A RATIONAL NUMBER? JÖRG JAHNEL 1. My Motivatio Some Sort of a Itroductio Last term I tought Topological Groups at the Göttige Georg August Uiversity. This

More information

Rainbow options. A rainbow is an option on a basket that pays in its most common form, a nonequally

Rainbow options. A rainbow is an option on a basket that pays in its most common form, a nonequally Raibow optios INRODUCION A raibow is a optio o a basket that pays i its most commo form, a oequally weighted average of the assets of the basket accordig to their performace. he umber of assets is called

More information

Lecture 4: Cheeger s Inequality

Lecture 4: Cheeger s Inequality Spectral Graph Theory ad Applicatios WS 0/0 Lecture 4: Cheeger s Iequality Lecturer: Thomas Sauerwald & He Su Statemet of Cheeger s Iequality I this lecture we assume for simplicity that G is a d-regular

More information

CHAPTER 3 THE TIME VALUE OF MONEY

CHAPTER 3 THE TIME VALUE OF MONEY CHAPTER 3 THE TIME VALUE OF MONEY OVERVIEW A dollar i the had today is worth more tha a dollar to be received i the future because, if you had it ow, you could ivest that dollar ad ear iterest. Of all

More information

1. MATHEMATICAL INDUCTION

1. MATHEMATICAL INDUCTION 1. MATHEMATICAL INDUCTION EXAMPLE 1: Prove that for ay iteger 1. Proof: 1 + 2 + 3 +... + ( + 1 2 (1.1 STEP 1: For 1 (1.1 is true, sice 1 1(1 + 1. 2 STEP 2: Suppose (1.1 is true for some k 1, that is 1

More information

TIME SERIES ANALYSIS AND TRENDS BY USING SPSS PROGRAMME

TIME SERIES ANALYSIS AND TRENDS BY USING SPSS PROGRAMME TIME SERIES ANALYSIS AND TRENDS BY USING SPSS PROGRAMME RADMILA KOCURKOVÁ Sileian Univerity in Opava School of Buine Adminitration in Karviná Department of Mathematical Method in Economic Czech Republic

More information

Factoring x n 1: cyclotomic and Aurifeuillian polynomials Paul Garrett <garrett@math.umn.edu>

Factoring x n 1: cyclotomic and Aurifeuillian polynomials Paul Garrett <garrett@math.umn.edu> (March 16, 004) Factorig x 1: cyclotomic ad Aurifeuillia polyomials Paul Garrett Polyomials of the form x 1, x 3 1, x 4 1 have at least oe systematic factorizatio x 1 = (x 1)(x 1

More information

How Euler Did It. In a more modern treatment, Hardy and Wright [H+W] state this same theorem as. n n+ is perfect.

How Euler Did It. In a more modern treatment, Hardy and Wright [H+W] state this same theorem as. n n+ is perfect. Amicable umbers November 005 How Euler Did It by Ed Sadifer Six is a special umber. It is divisible by, ad 3, ad, i what at first looks like a strage coicidece, 6 = + + 3. The umber 8 shares this remarkable

More information

The Stable Marriage Problem

The Stable Marriage Problem The Stable Marriage Problem William Hut Lae Departmet of Computer Sciece ad Electrical Egieerig, West Virgiia Uiversity, Morgatow, WV William.Hut@mail.wvu.edu 1 Itroductio Imagie you are a matchmaker,

More information

CHAPTER 3 DIGITAL CODING OF SIGNALS

CHAPTER 3 DIGITAL CODING OF SIGNALS CHAPTER 3 DIGITAL CODING OF SIGNALS Computers are ofte used to automate the recordig of measuremets. The trasducers ad sigal coditioig circuits produce a voltage sigal that is proportioal to a quatity

More information

THE PRINCIPLE OF THE ACTIVE JMC SCATTERER. Seppo Uosukainen

THE PRINCIPLE OF THE ACTIVE JMC SCATTERER. Seppo Uosukainen THE PRINCIPLE OF THE ACTIVE JC SCATTERER Seppo Uoukaie VTT Buildig ad Tapot Ai Hadlig Techology ad Acoutic P. O. Bo 1803, FIN 02044 VTT, Filad Seppo.Uoukaie@vtt.fi ABSTRACT The piciple of fomulatig the

More information

(VCP-310) 1-800-418-6789

(VCP-310) 1-800-418-6789 Maual VMware Lesso 1: Uderstadig the VMware Product Lie I this lesso, you will first lear what virtualizatio is. Next, you ll explore the products offered by VMware that provide virtualizatio services.

More information

GCSE STATISTICS. 4) How to calculate the range: The difference between the biggest number and the smallest number.

GCSE STATISTICS. 4) How to calculate the range: The difference between the biggest number and the smallest number. GCSE STATISTICS You should kow: 1) How to draw a frequecy diagram: e.g. NUMBER TALLY FREQUENCY 1 3 5 ) How to draw a bar chart, a pictogram, ad a pie chart. 3) How to use averages: a) Mea - add up all

More information

Normal Distribution.

Normal Distribution. Normal Distributio www.icrf.l Normal distributio I probability theory, the ormal or Gaussia distributio, is a cotiuous probability distributio that is ofte used as a first approimatio to describe realvalued

More information

Convexity, Inequalities, and Norms

Convexity, Inequalities, and Norms Covexity, Iequalities, ad Norms Covex Fuctios You are probably familiar with the otio of cocavity of fuctios. Give a twicedifferetiable fuctio ϕ: R R, We say that ϕ is covex (or cocave up) if ϕ (x) 0 for

More information

S. Tanny MAT 344 Spring 1999. be the minimum number of moves required.

S. Tanny MAT 344 Spring 1999. be the minimum number of moves required. S. Tay MAT 344 Sprig 999 Recurrece Relatios Tower of Haoi Let T be the miimum umber of moves required. T 0 = 0, T = 7 Iitial Coditios * T = T + $ T is a sequece (f. o itegers). Solve for T? * is a recurrece,

More information

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling Taig DCOP to the Real World: Efficiet Complete Solutios for Distributed Multi-Evet Schedulig Rajiv T. Maheswara, Milid Tambe, Emma Bowrig, Joatha P. Pearce, ad Pradeep araatham Uiversity of Souther Califoria

More information

Chapter 7 Methods of Finding Estimators

Chapter 7 Methods of Finding Estimators Chapter 7 for BST 695: Special Topics i Statistical Theory. Kui Zhag, 011 Chapter 7 Methods of Fidig Estimators Sectio 7.1 Itroductio Defiitio 7.1.1 A poit estimator is ay fuctio W( X) W( X1, X,, X ) of

More information

Now here is the important step

Now here is the important step LINEST i Excel The Excel spreadsheet fuctio "liest" is a complete liear least squares curve fittig routie that produces ucertaity estimates for the fit values. There are two ways to access the "liest"

More information

Lesson 15 ANOVA (analysis of variance)

Lesson 15 ANOVA (analysis of variance) Outlie Variability -betwee group variability -withi group variability -total variability -F-ratio Computatio -sums of squares (betwee/withi/total -degrees of freedom (betwee/withi/total -mea square (betwee/withi

More information

Center, Spread, and Shape in Inference: Claims, Caveats, and Insights

Center, Spread, and Shape in Inference: Claims, Caveats, and Insights Ceter, Spread, ad Shape i Iferece: Claims, Caveats, ad Isights Dr. Nacy Pfeig (Uiversity of Pittsburgh) AMATYC November 2008 Prelimiary Activities 1. I would like to produce a iterval estimate for the

More information

FEDERATION OF ARAB SCIENTIFIC RESEARCH COUNCILS

FEDERATION OF ARAB SCIENTIFIC RESEARCH COUNCILS Aignment Report RP/98-983/5/0./03 Etablihment of cientific and technological information ervice for economic and ocial development FOR INTERNAL UE NOT FOR GENERAL DITRIBUTION FEDERATION OF ARAB CIENTIFIC

More information

Chair for Network Architectures and Services Institute of Informatics TU München Prof. Carle. Network Security. Chapter 2 Basics

Chair for Network Architectures and Services Institute of Informatics TU München Prof. Carle. Network Security. Chapter 2 Basics Chair for Network Architectures ad Services Istitute of Iformatics TU Müche Prof. Carle Network Security Chapter 2 Basics 2.4 Radom Number Geeratio for Cryptographic Protocols Motivatio It is crucial to

More information

A Guide to the Pricing Conventions of SFE Interest Rate Products

A Guide to the Pricing Conventions of SFE Interest Rate Products A Guide to the Pricig Covetios of SFE Iterest Rate Products SFE 30 Day Iterbak Cash Rate Futures Physical 90 Day Bak Bills SFE 90 Day Bak Bill Futures SFE 90 Day Bak Bill Futures Tick Value Calculatios

More information

Multiplexers and Demultiplexers

Multiplexers and Demultiplexers I this lesso, you will lear about: Multiplexers ad Demultiplexers 1. Multiplexers 2. Combiatioal circuit implemetatio with multiplexers 3. Demultiplexers 4. Some examples Multiplexer A Multiplexer (see

More information

Approximating Area under a curve with rectangles. To find the area under a curve we approximate the area using rectangles and then use limits to find

Approximating Area under a curve with rectangles. To find the area under a curve we approximate the area using rectangles and then use limits to find 1.8 Approximatig Area uder a curve with rectagles 1.6 To fid the area uder a curve we approximate the area usig rectagles ad the use limits to fid 1.4 the area. Example 1 Suppose we wat to estimate 1.

More information

Domain 1: Configuring Domain Name System (DNS) for Active Directory

Domain 1: Configuring Domain Name System (DNS) for Active Directory Maual Widows Domai 1: Cofigurig Domai Name System (DNS) for Active Directory Cofigure zoes I Domai Name System (DNS), a DNS amespace ca be divided ito zoes. The zoes store ame iformatio about oe or more

More information

Chapter 7 - Sampling Distributions. 1 Introduction. What is statistics? It consist of three major areas:

Chapter 7 - Sampling Distributions. 1 Introduction. What is statistics? It consist of three major areas: Chapter 7 - Samplig Distributios 1 Itroductio What is statistics? It cosist of three major areas: Data Collectio: samplig plas ad experimetal desigs Descriptive Statistics: umerical ad graphical summaries

More information

Hypothesis testing. Null and alternative hypotheses

Hypothesis testing. Null and alternative hypotheses Hypothesis testig Aother importat use of samplig distributios is to test hypotheses about populatio parameters, e.g. mea, proportio, regressio coefficiets, etc. For example, it is possible to stipulate

More information

THE ARITHMETIC OF INTEGERS. - multiplication, exponentiation, division, addition, and subtraction

THE ARITHMETIC OF INTEGERS. - multiplication, exponentiation, division, addition, and subtraction THE ARITHMETIC OF INTEGERS - multiplicatio, expoetiatio, divisio, additio, ad subtractio What to do ad what ot to do. THE INTEGERS Recall that a iteger is oe of the whole umbers, which may be either positive,

More information

Week 3 Conditional probabilities, Bayes formula, WEEK 3 page 1 Expected value of a random variable

Week 3 Conditional probabilities, Bayes formula, WEEK 3 page 1 Expected value of a random variable Week 3 Coditioal probabilities, Bayes formula, WEEK 3 page 1 Expected value of a radom variable We recall our discussio of 5 card poker hads. Example 13 : a) What is the probability of evet A that a 5

More information

5.4 Amortization. Question 1: How do you find the present value of an annuity? Question 2: How is a loan amortized?

5.4 Amortization. Question 1: How do you find the present value of an annuity? Question 2: How is a loan amortized? 5.4 Amortizatio Questio 1: How do you fid the preset value of a auity? Questio 2: How is a loa amortized? Questio 3: How do you make a amortizatio table? Oe of the most commo fiacial istrumets a perso

More information