Design and Analysis of Algorithms

Size: px
Start display at page:

Download "Design and Analysis of Algorithms"

Transcription

1 Desig ad Aalysis of Algorithms Probabilistic aalysis ad Radomized algorithms Referece: CLRS Chapter 5 Topics: Hirig problem Idicatio radom variables Radomized algorithms Huo Hogwei 1

2 The hirig problem Sceario You eed to hire a assistat. A employmet agecy seds you a cadidate each day. You are committed to havig the best cadidate, so that if you iterview a cadidate who is better tha your curret assistat, you hire the ew cadidate. Each time you hire a ew assistat you pay $c. Goal What is the price of this strategy? We are ot iterested i the ruig time of this algorithm. Istead we would like to kow the cost of employig the algorithm, perhaps switchig to a differet strategy if it achieves the same goal but with lower cost. Huo Hogwei 2

3 The hirig problem Assume that the cadidates are umbered 1 through. HIRE-ASSISTANT HIRE-ASSISTANT() 1 best 0 2 for i 1 to 3 if cadidate i is better tha best 4 the best i 5 hire cadicate i Best case Cadidate 1 is the best cadidate: Θ(1) Worst case Cadidate is the best cadidate: Θ(c h ) Probabilistic aalysis Sice we do t kow what order the cadidates appear i, we could assume that they show up i radom order, i. e., each of the! orderigs of the cadidates are equally likely. What is the expected value of the cost uder this distributio? Huo Hogwei 3

4 A radomized algorithm If we radomize the iput we ca impose a distributio o it (istead of assumig oe). For the hirig problem: if we had a list of the cadidates, each day we could pick oe uiformly at radom from the cadidates that have t bee iterviewed yet. [Exercise. Check that this iduces a uiform distributio o the! orderigs of the cadidates.] The executio of a radomized algorithm o the same iput chages from oe ru to the ext. We assume the existece of a fuctio RANDOM(a, b) that returs a uiformly radom iteger i the set {a,..., b}. Huo Hogwei 4

5 A radomized algorithm Give a evet A i a probability space (S, Pr), the idicator of A is defied as the radom variable I{A} = 1 if A occurs, 0 if A does ot occur. Lemma. E[X A ]= Pr[A]. Proof. E[X A ]= E[I{A}] = 1 Pr[A] + 0 (1- Pr[A]) = Pr[A]. This lemma (combied with liearity of expectatio) is useful for computig expectatios of radom variables that ca be writte as sums of idicators. Huo Hogwei 5

6 Example X := umber of heads i coi flips. What is EX? Method 1. E[X]= k Pr[X = k] k=0 = k 1 k 1 -k k 2 2 k=0 = 1 2 k k=1 k = k=1 k -1 = = 2 2 Huo Hogwei 6

7 Example X := umber of heads i coi flips. What is E[X]? Method2. Recogize that X = X i i=1 By liearity of expectatio, 1 E[X] = E X i = E[X i ] = 2 = i=1 i=1 Remark. Liearity of expectatio is applicable eve if the radom variable are depedet. (Not a issue i this example) i=1 2 Huo Hogwei 7

8 Hirig problem: probabilistic aalysis or radomized algorithm X = umber of times we hire a ew assistat. By the defiitio of expected value from C.19. E[X] = x Pr{X = x} x=1 The calculatio is cumbersome, we istead use idicator radom variable to simplify the calculatio Let X i be the idicator radom variable associated with the evet i which the ith cadidate is hired, i =1,,, X i = I{cadicate i is hired} = 1 if cadicate i is hired, 0 if cadicate i is ot hired, Huo Hogwei 8

9 Hirig problem: We ca compute E[X] E[X] = E X i i=1 = E[X i ] = i=1 i=1 1 i = l + O(1) By equatio A.7 Eve we iterview people, we oly actually hire approximately l of the o the average. Lemma: Assumig that the cadidate are preseted i a radom order, algorithm HIRE-ASSISTANT has a total hirig cost of O(c h l ). Huo Hogwei 9

10 Radom permutatio Goal. Produce a uiformly radom permutatio. (Each of the! permutatio is equally likely.) Idea. At the i th iteratio, swap A[i] with a radom elemet from A[i,..., ]. RANDOMIZE-IN-PLACE RANDOMIZE-IN-PLACE(A) 1 Legth[A] 2 for i 1 to 3 A[i] A[RANDOM(i,)] Huo Hogwei 10

11 Radom permutatio Goal. Produce a uiformly radom permutatio. (Each of the! permutatio is equally likely.) Idea. At the i th iteratio, swap A[i] with a radom elemet from A[i,..., ]. RANDOMIZE-IN-PLACE RANDOMIZE-IN-PLACE(A) 1 Legth[A] 2 for i 1 to 3 A[i] A[RANDOM(i,)] Loop ivariat. At the start of the for loop, A[1,..., i -1]cotais each of the (i -1)! C i -1 possible (i -1)-permutatios with equal probability. Iitializatio. i = 1. Trivial. Termiatio. i = + 1. A[1,..., ] cotais each of the! permutatios with equal probability. Huo Hogwei 11

12 Radom permutatio Maiteace. Cosider the ith iteratio. Assumig that whe the loop was etered A[1,..., i-1] cotai a uiformly radom (i -1)-permutatio of A, show that whe the loop is exited A[1,..., i] cotais a uiformly radom i -permutatio of A. Let <x 1,..., x i > deote the elemets i A[1,..., i] after the ith iteratio. It cosists of <x 1,..., x i-1 >, a (i-1)- permutatio followed by x i. E 1 := evet that the first i-1 iteratios produced <x 1,...,x i-1 >. E 2 := evet that the ith iteratio puts x i ito A[i]. Note that E 1 E 2 is the evet that we get the i-permutatio <x 1,...,x i >. The (-(i-1))! Pr[E 1 E 2 ] = Pr[E 1 E 2 ]Pr[E 1 ]= 1 (-i)! = -i+1!! Huo Hogwei 12

13 O-lie hirig problem Variat o the hirig problem. We ll settle for ot ecessarily the best office assistat i exchage for hirig exactly oce, which will make our cost O(1) [as opposed to O() i the worst- case or O(log ) o average]. Strategy. Look at the first k < cadidates. Reject each of them, otig the score of the best cadidate see so far. The, hire the first cadidate whose score exceeds this best score. (If o such cadidate is foud, hire the th cadidate.) Goal. Fid a k which maximizes the probability of hirig the best cadidate. Huo Hogwei 13

14 O-lie hirig problem Aalysis. S = evet that the best cadidate is foud, S i = evet that the best cadidate is foud by hirig the ith cadidate. The, S = i=1.. S i, ad sice the evets are idepedet ad we re discardig the first k cadidates, Pr[S] = Pr[S i ] = Pr[S i ] i=1 i=k+1 Notice that S i = B i O i where B i = evet that the ith cadidate is the best cadidate, O i = evet that oe of cadidates k + 1,..., i -1 are picked. Huo Hogwei 14

15 O-lie hirig problem Claim. The evets B i ad O i are idepedet. Proof. O i oly depeds o the relative order of the cadidates 1,..., i -1, i.e., kowig that the ith cadidate is the best does ot affect whether cadidates k+1,..., i-1 are goig to be picked by the strategy. Pr[S i ] = Pr[B i O i ] = Pr[B i ] Pr[O i ] = the last equality follows sice O i is the same evet as havig ay oe of the first k cadidates be the best amog the first i -1. Puttig everythig together k I order to maximize Pr[S], we should choose k/ to be a costat c < 1. (What would happe if we chose k to be a costat istead?) 1 k i-1 Pr[S i ] = = = [H -1 H k-1 ] i=k+1 1 i-1 k -1 1 k i=k i Huo Hogwei 15

16 O-lie hirig problem Heuristic argumet. (See the text for a precise argumet usig itegral approximatios to sums.) k Pr[S] [l lk] = c l c -1 which is maximized whe c = 1/ e Thus, if we choose k = 0. 37, with probability 0.37 we will pick the best cadidate. Huo Hogwei 16

17 Recap Probabilistic aalysis: assume distributio o the iputs ad examie expected value of cost. Radomized algorithms: iduce a distributio o the iputs by makig radom choices o determiistic iput. Tools: Idicators, liearity of expectatio,.... Huo Hogwei 17

18 For example oe who likes logic programmig - prolog ad who does ot like c, c++, java,... The first step is dowload (it is a free) xsb software package. The package has a lot of documetatio - prit ad start to read... The goal may be a implemetatio of the system to simulate da-computatio i the prolog programmig laguage... Somebody who is good i theory... ca prove equivalece betwee prolog computig model ad da computig model... The third who is good i compilers ca improve prolog laguage itroducig multyhead rules istead a:-b,c,d,... ad x:-b,c,... => a&x :- b,c,d Huo Hogwei 18

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018) Radomized Algorithms I, Sprig 08, Departmet of Computer Sciece, Uiversity of Helsiki Homework : Solutios Discussed Jauary 5, 08). Exercise.: Cosider the followig balls-ad-bi game. We start with oe black

More information

CS / MCS 401 Homework 3 grader solutions

CS / MCS 401 Homework 3 grader solutions CS / MCS 401 Homework 3 grader solutios assigmet due July 6, 016 writte by Jāis Lazovskis maximum poits: 33 Some questios from CLRS. Questios marked with a asterisk were ot graded. 1 Use the defiitio of

More information

CS 330 Discussion - Probability

CS 330 Discussion - Probability CS 330 Discussio - Probability March 24 2017 1 Fudametals of Probability 11 Radom Variables ad Evets A radom variable X is oe whose value is o-determiistic For example, suppose we flip a coi ad set X =

More information

Problem Set 2 Solutions

Problem Set 2 Solutions CS271 Radomess & Computatio, Sprig 2018 Problem Set 2 Solutios Poit totals are i the margi; the maximum total umber of poits was 52. 1. Probabilistic method for domiatig sets 6pts Pick a radom subset S

More information

Lecture 2: April 3, 2013

Lecture 2: April 3, 2013 TTIC/CMSC 350 Mathematical Toolkit Sprig 203 Madhur Tulsiai Lecture 2: April 3, 203 Scribe: Shubhedu Trivedi Coi tosses cotiued We retur to the coi tossig example from the last lecture agai: Example. Give,

More information

A Probabilistic Analysis of Quicksort

A Probabilistic Analysis of Quicksort A Probabilistic Aalysis of Quicsort You are assumed to be familiar with Quicsort. I each iteratio this sortig algorithm chooses a pivot ad the, by performig comparisios with the pivot, splits the remaider

More information

n outcome is (+1,+1, 1,..., 1). Let the r.v. X denote our position (relative to our starting point 0) after n moves. Thus X = X 1 + X 2 + +X n,

n outcome is (+1,+1, 1,..., 1). Let the r.v. X denote our position (relative to our starting point 0) after n moves. Thus X = X 1 + X 2 + +X n, CS 70 Discrete Mathematics for CS Sprig 2008 David Wager Note 9 Variace Questio: At each time step, I flip a fair coi. If it comes up Heads, I walk oe step to the right; if it comes up Tails, I walk oe

More information

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22 CS 70 Discrete Mathematics for CS Sprig 2007 Luca Trevisa Lecture 22 Aother Importat Distributio The Geometric Distributio Questio: A biased coi with Heads probability p is tossed repeatedly util the first

More information

CS 171 Lecture Outline October 09, 2008

CS 171 Lecture Outline October 09, 2008 CS 171 Lecture Outlie October 09, 2008 The followig theorem comes very hady whe calculatig the expectatio of a radom variable that takes o o-egative iteger values. Theorem: Let Y be a radom variable that

More information

Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 21. Some Important Distributions

Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 21. Some Important Distributions CS 70 Discrete Mathematics for CS Sprig 2005 Clacy/Wager Notes 21 Some Importat Distributios Questio: A biased coi with Heads probability p is tossed repeatedly util the first Head appears. What is the

More information

An Introduction to Randomized Algorithms

An Introduction to Randomized Algorithms A Itroductio to Radomized Algorithms The focus of this lecture is to study a radomized algorithm for quick sort, aalyze it usig probabilistic recurrece relatios, ad also provide more geeral tools for aalysis

More information

Skip Lists. Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015 S 3 S S 1

Skip Lists. Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015 S 3 S S 1 Presetatio for use with the textbook, Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 2015 Skip Lists S 3 15 15 23 10 15 23 36 Skip Lists 1 What is a Skip List A skip list for

More information

Analysis of Algorithms. Introduction. Contents

Analysis of Algorithms. Introduction. Contents Itroductio The focus of this module is mathematical aspects of algorithms. Our mai focus is aalysis of algorithms, which meas evaluatig efficiecy of algorithms by aalytical ad mathematical methods. We

More information

Optimally Sparse SVMs

Optimally Sparse SVMs A. Proof of Lemma 3. We here prove a lower boud o the umber of support vectors to achieve geeralizatio bouds of the form which we cosider. Importatly, this result holds ot oly for liear classifiers, but

More information

Hashing and Amortization

Hashing and Amortization Lecture Hashig ad Amortizatio Supplemetal readig i CLRS: Chapter ; Chapter 7 itro; Sectio 7.. Arrays ad Hashig Arrays are very useful. The items i a array are statically addressed, so that isertig, deletig,

More information

Bertrand s Postulate

Bertrand s Postulate Bertrad s Postulate Lola Thompso Ross Program July 3, 2009 Lola Thompso (Ross Program Bertrad s Postulate July 3, 2009 1 / 33 Bertrad s Postulate I ve said it oce ad I ll say it agai: There s always a

More information

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 17 Lecturer: David Wagner April 3, Notes 17 for CS 170

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 17 Lecturer: David Wagner April 3, Notes 17 for CS 170 UC Berkeley CS 170: Efficiet Algorithms ad Itractable Problems Hadout 17 Lecturer: David Wager April 3, 2003 Notes 17 for CS 170 1 The Lempel-Ziv algorithm There is a sese i which the Huffma codig was

More information

Lecture 12: November 13, 2018

Lecture 12: November 13, 2018 Mathematical Toolkit Autum 2018 Lecturer: Madhur Tulsiai Lecture 12: November 13, 2018 1 Radomized polyomial idetity testig We will use our kowledge of coditioal probability to prove the followig lemma,

More information

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 15

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 15 CS 70 Discrete Mathematics ad Probability Theory Summer 2014 James Cook Note 15 Some Importat Distributios I this ote we will itroduce three importat probability distributios that are widely used to model

More information

Definitions: Universe U of keys, e.g., U N 0. U very large. Set S U of keys, S = m U.

Definitions: Universe U of keys, e.g., U N 0. U very large. Set S U of keys, S = m U. 7 7 Dictioary: S.isertx): Isert a elemet x. S.deletex): Delete the elemet poited to by x. S.searchk): Retur a poiter to a elemet e with key[e] = k i S if it exists; otherwise retur ull. So far we have

More information

7.7 Hashing. 7.7 Hashing. Perfect Hashing. Direct Addressing

7.7 Hashing. 7.7 Hashing. Perfect Hashing. Direct Addressing Dictioary: S.isertx): Isert a elemet x. S.deletex): Delete the elemet poited to by x. S.searchk): Retur a poiter to a elemet e with key[e] = k i S if it exists; otherwise retur ull. So far we have implemeted

More information

Mixtures of Gaussians and the EM Algorithm

Mixtures of Gaussians and the EM Algorithm Mixtures of Gaussias ad the EM Algorithm CSE 6363 Machie Learig Vassilis Athitsos Computer Sciece ad Egieerig Departmet Uiversity of Texas at Arligto 1 Gaussias A popular way to estimate probability desity

More information

CS 270 Algorithms. Oliver Kullmann. Growth of Functions. Divide-and- Conquer Min-Max- Problem. Tutorial. Reading from CLRS for week 2

CS 270 Algorithms. Oliver Kullmann. Growth of Functions. Divide-and- Conquer Min-Max- Problem. Tutorial. Reading from CLRS for week 2 Geeral remarks Week 2 1 Divide ad First we cosider a importat tool for the aalysis of algorithms: Big-Oh. The we itroduce a importat algorithmic paradigm:. We coclude by presetig ad aalysig two examples.

More information

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 19

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 19 CS 70 Discrete Mathematics ad Probability Theory Sprig 2016 Rao ad Walrad Note 19 Some Importat Distributios Recall our basic probabilistic experimet of tossig a biased coi times. This is a very simple

More information

1 of 7 7/16/2009 6:06 AM Virtual Laboratories > 6. Radom Samples > 1 2 3 4 5 6 7 6. Order Statistics Defiitios Suppose agai that we have a basic radom experimet, ad that X is a real-valued radom variable

More information

HOMEWORK 2 SOLUTIONS

HOMEWORK 2 SOLUTIONS HOMEWORK SOLUTIONS CSE 55 RANDOMIZED AND APPROXIMATION ALGORITHMS 1. Questio 1. a) The larger the value of k is, the smaller the expected umber of days util we get all the coupos we eed. I fact if = k

More information

Recurrence Relations

Recurrence Relations Recurrece Relatios Aalysis of recursive algorithms, such as: it factorial (it ) { if (==0) retur ; else retur ( * factorial(-)); } Let t be the umber of multiplicatios eeded to calculate factorial(). The

More information

Lecture 2: Concentration Bounds

Lecture 2: Concentration Bounds CSE 52: Desig ad Aalysis of Algorithms I Sprig 206 Lecture 2: Cocetratio Bouds Lecturer: Shaya Oveis Ghara March 30th Scribe: Syuzaa Sargsya Disclaimer: These otes have ot bee subjected to the usual scrutiy

More information

It is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function.

It is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function. MATH 532 Measurable Fuctios Dr. Neal, WKU Throughout, let ( X, F, µ) be a measure space ad let (!, F, P ) deote the special case of a probability space. We shall ow begi to study real-valued fuctios defied

More information

Sorting Algorithms. Algorithms Kyuseok Shim SoEECS, SNU.

Sorting Algorithms. Algorithms Kyuseok Shim SoEECS, SNU. Sortig Algorithms Algorithms Kyuseo Shim SoEECS, SNU. Desigig Algorithms Icremetal approaches Divide-ad-Coquer approaches Dyamic programmig approaches Greedy approaches Radomized approaches You are ot

More information

Discrete Mathematics and Probability Theory Spring 2012 Alistair Sinclair Note 15

Discrete Mathematics and Probability Theory Spring 2012 Alistair Sinclair Note 15 CS 70 Discrete Mathematics ad Probability Theory Sprig 2012 Alistair Siclair Note 15 Some Importat Distributios The first importat distributio we leared about i the last Lecture Note is the biomial distributio

More information

Lecture 4: April 10, 2013

Lecture 4: April 10, 2013 TTIC/CMSC 1150 Mathematical Toolkit Sprig 01 Madhur Tulsiai Lecture 4: April 10, 01 Scribe: Haris Agelidakis 1 Chebyshev s Iequality recap I the previous lecture, we used Chebyshev s iequality to get a

More information

CS284A: Representations and Algorithms in Molecular Biology

CS284A: Representations and Algorithms in Molecular Biology CS284A: Represetatios ad Algorithms i Molecular Biology Scribe Notes o Lectures 3 & 4: Motif Discovery via Eumeratio & Motif Represetatio Usig Positio Weight Matrix Joshua Gervi Based o presetatios by

More information

Lecture 9: Hierarchy Theorems

Lecture 9: Hierarchy Theorems IAS/PCMI Summer Sessio 2000 Clay Mathematics Udergraduate Program Basic Course o Computatioal Complexity Lecture 9: Hierarchy Theorems David Mix Barrigto ad Alexis Maciel July 27, 2000 Most of this lecture

More information

Simulation. Two Rule For Inverting A Distribution Function

Simulation. Two Rule For Inverting A Distribution Function Simulatio Two Rule For Ivertig A Distributio Fuctio Rule 1. If F(x) = u is costat o a iterval [x 1, x 2 ), the the uiform value u is mapped oto x 2 through the iversio process. Rule 2. If there is a jump

More information

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ.

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ. 2 5. Weighted umber of late jobs 5.1. Release dates ad due dates: maximimizig the weight of o-time jobs Oce we add release dates, miimizig the umber of late jobs becomes a sigificatly harder problem. For

More information

Frequentist Inference

Frequentist Inference Frequetist Iferece The topics of the ext three sectios are useful applicatios of the Cetral Limit Theorem. Without kowig aythig about the uderlyig distributio of a sequece of radom variables {X i }, for

More information

Ma/CS 6b Class 19: Extremal Graph Theory

Ma/CS 6b Class 19: Extremal Graph Theory /9/05 Ma/CS 6b Class 9: Extremal Graph Theory Paul Turá By Adam Sheffer Extremal Graph Theory The subfield of extremal graph theory deals with questios of the form: What is the maximum umber of edges that

More information

Lecture 6: Coupon Collector s problem

Lecture 6: Coupon Collector s problem Radomized Algorithms Lecture 6: Coupo Collector s problem Sotiris Nikoletseas Professor CEID - ETY Course 2017-2018 Sotiris Nikoletseas, Professor Radomized Algorithms - Lecture 6 1 / 16 Variace: key features

More information

Topic 9: Sampling Distributions of Estimators

Topic 9: Sampling Distributions of Estimators Topic 9: Samplig Distributios of Estimators Course 003, 2016 Page 0 Samplig distributios of estimators Sice our estimators are statistics (particular fuctios of radom variables), their distributio ca be

More information

ECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations

ECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations ECE-S352 Itroductio to Digital Sigal Processig Lecture 3A Direct Solutio of Differece Equatios Discrete Time Systems Described by Differece Equatios Uit impulse (sample) respose h() of a DT system allows

More information

Convergence of random variables. (telegram style notes) P.J.C. Spreij

Convergence of random variables. (telegram style notes) P.J.C. Spreij Covergece of radom variables (telegram style otes).j.c. Spreij this versio: September 6, 2005 Itroductio As we kow, radom variables are by defiitio measurable fuctios o some uderlyig measurable space

More information

The Maximum-Likelihood Decoding Performance of Error-Correcting Codes

The Maximum-Likelihood Decoding Performance of Error-Correcting Codes The Maximum-Lielihood Decodig Performace of Error-Correctig Codes Hery D. Pfister ECE Departmet Texas A&M Uiversity August 27th, 2007 (rev. 0) November 2st, 203 (rev. ) Performace of Codes. Notatio X,

More information

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer.

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer. 6 Itegers Modulo I Example 2.3(e), we have defied the cogruece of two itegers a,b with respect to a modulus. Let us recall that a b (mod ) meas a b. We have proved that cogruece is a equivalece relatio

More information

1 Hash tables. 1.1 Implementation

1 Hash tables. 1.1 Implementation Lecture 8 Hash Tables, Uiversal Hash Fuctios, Balls ad Bis Scribes: Luke Johsto, Moses Charikar, G. Valiat Date: Oct 18, 2017 Adapted From Virgiia Williams lecture otes 1 Hash tables A hash table is a

More information

Markov Decision Processes

Markov Decision Processes Markov Decisio Processes Defiitios; Statioary policies; Value improvemet algorithm, Policy improvemet algorithm, ad liear programmig for discouted cost ad average cost criteria. Markov Decisio Processes

More information

CS161 Handout 05 Summer 2013 July 10, 2013 Mathematical Terms and Identities

CS161 Handout 05 Summer 2013 July 10, 2013 Mathematical Terms and Identities CS161 Hadout 05 Summer 2013 July 10, 2013 Mathematical Terms ad Idetities Thaks to Ady Nguye ad Julie Tibshirai for their advice o this hadout. This hadout covers mathematical otatio ad idetities that

More information

Trial division, Pollard s p 1, Pollard s ρ, and Fermat s method. Christopher Koch 1. April 8, 2014

Trial division, Pollard s p 1, Pollard s ρ, and Fermat s method. Christopher Koch 1. April 8, 2014 Iteger Divisio Algorithm ad Cogruece Iteger Trial divisio,,, ad with itegers mod Iverses mod Multiplicatio ad GCD Iteger Christopher Koch 1 1 Departmet of Computer Sciece ad Egieerig CSE489/589 Algorithms

More information

ORIE 633 Network Flows September 27, Lecture 8

ORIE 633 Network Flows September 27, Lecture 8 ORIE 633 Network Flows September 7, 007 Lecturer: David P. Williamso Lecture 8 Scribe: Gema Plaza-Martíez 1 Global mi-cuts i udirected graphs 1.1 Radom cotractio Recall from last time we itroduced the

More information

Chapter 6 Infinite Series

Chapter 6 Infinite Series Chapter 6 Ifiite Series I the previous chapter we cosidered itegrals which were improper i the sese that the iterval of itegratio was ubouded. I this chapter we are goig to discuss a topic which is somewhat

More information

Law of the sum of Bernoulli random variables

Law of the sum of Bernoulli random variables Law of the sum of Beroulli radom variables Nicolas Chevallier Uiversité de Haute Alsace, 4, rue des frères Lumière 68093 Mulhouse icolas.chevallier@uha.fr December 006 Abstract Let be the set of all possible

More information

Lecture 5: April 17, 2013

Lecture 5: April 17, 2013 TTIC/CMSC 350 Mathematical Toolkit Sprig 203 Madhur Tulsiai Lecture 5: April 7, 203 Scribe: Somaye Hashemifar Cheroff bouds recap We recall the Cheroff/Hoeffdig bouds we derived i the last lecture idepedet

More information

On Random Line Segments in the Unit Square

On Random Line Segments in the Unit Square O Radom Lie Segmets i the Uit Square Thomas A. Courtade Departmet of Electrical Egieerig Uiversity of Califoria Los Ageles, Califoria 90095 Email: tacourta@ee.ucla.edu I. INTRODUCTION Let Q = [0, 1] [0,

More information

CS161 Design and Analysis of Algorithms. Administrative

CS161 Design and Analysis of Algorithms. Administrative CS161 Desig ad Aalysis of Algorithms Da Boeh 1 Admiistrative Lecture 1, April 3, 1 Web page http://theory.staford.edu/~dabo/cs161» Hadouts» Aoucemets» Late breakig ews Gradig ad course requiremets» Midterm/fial/hw»

More information

Final Review for MATH 3510

Final Review for MATH 3510 Fial Review for MATH 50 Calculatio 5 Give a fairly simple probability mass fuctio or probability desity fuctio of a radom variable, you should be able to compute the expected value ad variace of the variable

More information

The picture in figure 1.1 helps us to see that the area represents the distance traveled. Figure 1: Area represents distance travelled

The picture in figure 1.1 helps us to see that the area represents the distance traveled. Figure 1: Area represents distance travelled 1 Lecture : Area Area ad distace traveled Approximatig area by rectagles Summatio The area uder a parabola 1.1 Area ad distace Suppose we have the followig iformatio about the velocity of a particle, how

More information

April 18, 2017 CONFIDENCE INTERVALS AND HYPOTHESIS TESTING, UNDERGRADUATE MATH 526 STYLE

April 18, 2017 CONFIDENCE INTERVALS AND HYPOTHESIS TESTING, UNDERGRADUATE MATH 526 STYLE April 18, 2017 CONFIDENCE INTERVALS AND HYPOTHESIS TESTING, UNDERGRADUATE MATH 526 STYLE TERRY SOO Abstract These otes are adapted from whe I taught Math 526 ad meat to give a quick itroductio to cofidece

More information

1 Introduction to reducing variance in Monte Carlo simulations

1 Introduction to reducing variance in Monte Carlo simulations Copyright c 010 by Karl Sigma 1 Itroductio to reducig variace i Mote Carlo simulatios 11 Review of cofidece itervals for estimatig a mea I statistics, we estimate a ukow mea µ = E(X) of a distributio by

More information

Let us give one more example of MLE. Example 3. The uniform distribution U[0, θ] on the interval [0, θ] has p.d.f.

Let us give one more example of MLE. Example 3. The uniform distribution U[0, θ] on the interval [0, θ] has p.d.f. Lecture 5 Let us give oe more example of MLE. Example 3. The uiform distributio U[0, ] o the iterval [0, ] has p.d.f. { 1 f(x =, 0 x, 0, otherwise The likelihood fuctio ϕ( = f(x i = 1 I(X 1,..., X [0,

More information

CSE 5311 Notes 1: Mathematical Preliminaries

CSE 5311 Notes 1: Mathematical Preliminaries Chapter 1 - Algorithms Computig CSE 5311 Notes 1: Mathematical Prelimiaries Last updated 1/20/18 12:56 PM) Relatioship betwee complexity classes, eg log,, log, 2, 2, etc Chapter 2 - Gettig Started Loop

More information

Lecture 19: Convergence

Lecture 19: Convergence Lecture 19: Covergece Asymptotic approach I statistical aalysis or iferece, a key to the success of fidig a good procedure is beig able to fid some momets ad/or distributios of various statistics. I may

More information

CS:3330 (Prof. Pemmaraju ): Assignment #1 Solutions. (b) For n = 3, we will have 3 men and 3 women with preferences as follows: m 1 : w 3 > w 1 > w 2

CS:3330 (Prof. Pemmaraju ): Assignment #1 Solutions. (b) For n = 3, we will have 3 men and 3 women with preferences as follows: m 1 : w 3 > w 1 > w 2 Shiyao Wag CS:3330 (Prof. Pemmaraju ): Assigmet #1 Solutios Problem 1 (a) Cosider iput with me m 1, m,..., m ad wome w 1, w,..., w with the followig prefereces: All me have the same prefereces for wome:

More information

Basics of Probability Theory (for Theory of Computation courses)

Basics of Probability Theory (for Theory of Computation courses) Basics of Probability Theory (for Theory of Computatio courses) Oded Goldreich Departmet of Computer Sciece Weizma Istitute of Sciece Rehovot, Israel. oded.goldreich@weizma.ac.il November 24, 2008 Preface.

More information

Homework 5 Solutions

Homework 5 Solutions Homework 5 Solutios p329 # 12 No. To estimate the chace you eed the expected value ad stadard error. To do get the expected value you eed the average of the box ad to get the stadard error you eed the

More information

Lecture Notes 15 Hypothesis Testing (Chapter 10)

Lecture Notes 15 Hypothesis Testing (Chapter 10) 1 Itroductio Lecture Notes 15 Hypothesis Testig Chapter 10) Let X 1,..., X p θ x). Suppose we we wat to kow if θ = θ 0 or ot, where θ 0 is a specific value of θ. For example, if we are flippig a coi, we

More information

PH 425 Quantum Measurement and Spin Winter SPINS Lab 1

PH 425 Quantum Measurement and Spin Winter SPINS Lab 1 PH 425 Quatum Measuremet ad Spi Witer 23 SPIS Lab Measure the spi projectio S z alog the z-axis This is the experimet that is ready to go whe you start the program, as show below Each atom is measured

More information

Random Models. Tusheng Zhang. February 14, 2013

Random Models. Tusheng Zhang. February 14, 2013 Radom Models Tusheg Zhag February 14, 013 1 Radom Walks Let me describe the model. Radom walks are used to describe the motio of a movig particle (object). Suppose that a particle (object) moves alog the

More information

Lecture 11: Pseudorandom functions

Lecture 11: Pseudorandom functions COM S 6830 Cryptography Oct 1, 2009 Istructor: Rafael Pass 1 Recap Lecture 11: Pseudoradom fuctios Scribe: Stefao Ermo Defiitio 1 (Ge, Ec, Dec) is a sigle message secure ecryptio scheme if for all uppt

More information

CSE 4095/5095 Topics in Big Data Analytics Spring 2017; Homework 1 Solutions

CSE 4095/5095 Topics in Big Data Analytics Spring 2017; Homework 1 Solutions CSE 09/09 Topics i ig Data Aalytics Sprig 2017; Homework 1 Solutios Note: Solutios to problems,, ad 6 are due to Marius Nicolae. 1. Cosider the followig algorithm: for i := 1 to α log e do Pick a radom

More information

Recursive Algorithm for Generating Partitions of an Integer. 1 Preliminary

Recursive Algorithm for Generating Partitions of an Integer. 1 Preliminary Recursive Algorithm for Geeratig Partitios of a Iteger Sug-Hyuk Cha Computer Sciece Departmet, Pace Uiversity 1 Pace Plaza, New York, NY 10038 USA scha@pace.edu Abstract. This article first reviews the

More information

Analysis of Algorithms -Quicksort-

Analysis of Algorithms -Quicksort- Aalysis of Algorithms -- Adreas Ermedahl MRTC (Mälardales Real-Time Research Ceter) adreas.ermedahl@mdh.se Autum 2004 Proposed by C.A.R. Hoare i 962 Worst- case ruig time: Θ( 2 ) Expected ruig time: Θ(

More information

Online hypergraph matching: hiring teams of secretaries

Online hypergraph matching: hiring teams of secretaries Olie hypergraph matchig: hirig teams of secretaries Rafael M. Frogillo Advisor: Robert Kleiberg May 29, 2008 Itroductio The goal of this paper is to fid a competitive algorithm for the followig problem.

More information

Lecture Chapter 6: Convergence of Random Sequences

Lecture Chapter 6: Convergence of Random Sequences ECE5: Aalysis of Radom Sigals Fall 6 Lecture Chapter 6: Covergece of Radom Sequeces Dr Salim El Rouayheb Scribe: Abhay Ashutosh Doel, Qibo Zhag, Peiwe Tia, Pegzhe Wag, Lu Liu Radom sequece Defiitio A ifiite

More information

Square-Congruence Modulo n

Square-Congruence Modulo n Square-Cogruece Modulo Abstract This paper is a ivestigatio of a equivalece relatio o the itegers that was itroduced as a exercise i our Discrete Math class. Part I - Itro Defiitio Two itegers are Square-Cogruet

More information

Chapter 9 - CD companion 1. A Generic Implementation; The Common-Merge Amplifier. 1 τ is. ω ch. τ io

Chapter 9 - CD companion 1. A Generic Implementation; The Common-Merge Amplifier. 1 τ is. ω ch. τ io Chapter 9 - CD compaio CHAPTER NINE CD-9.2 CD-9.2. Stages With Voltage ad Curret Gai A Geeric Implemetatio; The Commo-Merge Amplifier The advaced method preseted i the text for approximatig cutoff frequecies

More information

Chapter 2. Asymptotic Notation

Chapter 2. Asymptotic Notation Asyptotic Notatio 3 Chapter Asyptotic Notatio Goal : To siplify the aalysis of ruig tie by gettig rid of details which ay be affected by specific ipleetatio ad hardware. [1] The Big Oh (O-Notatio) : It

More information

Discrete Mathematics and Probability Theory Spring 2013 Anant Sahai Lecture 18

Discrete Mathematics and Probability Theory Spring 2013 Anant Sahai Lecture 18 EECS 70 Discrete Mathematics ad Probability Theory Sprig 2013 Aat Sahai Lecture 18 Iferece Oe of the major uses of probability is to provide a systematic framework to perform iferece uder ucertaity. A

More information

Problem Set 4 Due Oct, 12

Problem Set 4 Due Oct, 12 EE226: Radom Processes i Systems Lecturer: Jea C. Walrad Problem Set 4 Due Oct, 12 Fall 06 GSI: Assae Gueye This problem set essetially reviews detectio theory ad hypothesis testig ad some basic otios

More information

0, otherwise. EX = E(X 1 + X n ) = EX j = np and. Var(X j ) = np(1 p). Var(X) = Var(X X n ) =

0, otherwise. EX = E(X 1 + X n ) = EX j = np and. Var(X j ) = np(1 p). Var(X) = Var(X X n ) = PROBABILITY MODELS 35 10. Discrete probability distributios I this sectio, we discuss several well-ow discrete probability distributios ad study some of their properties. Some of these distributios, lie

More information

Application to Random Graphs

Application to Random Graphs A Applicatio to Radom Graphs Brachig processes have a umber of iterestig ad importat applicatios. We shall cosider oe of the most famous of them, the Erdős-Réyi radom graph theory. 1 Defiitio A.1. Let

More information

STAT Homework 1 - Solutions

STAT Homework 1 - Solutions STAT-36700 Homework 1 - Solutios Fall 018 September 11, 018 This cotais solutios for Homework 1. Please ote that we have icluded several additioal commets ad approaches to the problems to give you better

More information

Chapter 3. Strong convergence. 3.1 Definition of almost sure convergence

Chapter 3. Strong convergence. 3.1 Definition of almost sure convergence Chapter 3 Strog covergece As poited out i the Chapter 2, there are multiple ways to defie the otio of covergece of a sequece of radom variables. That chapter defied covergece i probability, covergece i

More information

Massachusetts Institute of Technology

Massachusetts Institute of Technology 6.0/6.3: Probabilistic Systems Aalysis (Fall 00) Problem Set 8: Solutios. (a) We cosider a Markov chai with states 0,,, 3,, 5, where state i idicates that there are i shoes available at the frot door i

More information

2 Definition of Variance and the obvious guess

2 Definition of Variance and the obvious guess 1 Estimatig Variace Statistics - Math 410, 11/7/011 Oe of the mai themes of this course is to estimate the mea µ of some variable X of a populatio. We typically do this by collectig a sample of idividuals

More information

Lecture 2 February 8, 2016

Lecture 2 February 8, 2016 MIT 6.854/8.45: Advaced Algorithms Sprig 206 Prof. Akur Moitra Lecture 2 February 8, 206 Scribe: Calvi Huag, Lih V. Nguye I this lecture, we aalyze the problem of schedulig equal size tasks arrivig olie

More information

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis Recursive Algorithms Recurreces Computer Sciece & Egieerig 35: Discrete Mathematics Christopher M Bourke cbourke@cseuledu A recursive algorithm is oe i which objects are defied i terms of other objects

More information

1. ARITHMETIC OPERATIONS IN OBSERVER'S MATHEMATICS

1. ARITHMETIC OPERATIONS IN OBSERVER'S MATHEMATICS 1. ARITHMETIC OPERATIONS IN OBSERVER'S MATHEMATICS We cosider a ite well-ordered system of observers, where each observer sees the real umbers as the set of all iite decimal fractios. The observers are

More information

Learning Theory: Lecture Notes

Learning Theory: Lecture Notes Learig Theory: Lecture Notes Kamalika Chaudhuri October 4, 0 Cocetratio of Averages Cocetratio of measure is very useful i showig bouds o the errors of machie-learig algorithms. We will begi with a basic

More information

f X (12) = Pr(X = 12) = Pr({(6, 6)}) = 1/36

f X (12) = Pr(X = 12) = Pr({(6, 6)}) = 1/36 Probability Distributios A Example With Dice If X is a radom variable o sample space S, the the probablity that X takes o the value c is Similarly, Pr(X = c) = Pr({s S X(s) = c} Pr(X c) = Pr({s S X(s)

More information

Lecture 01: the Central Limit Theorem. 1 Central Limit Theorem for i.i.d. random variables

Lecture 01: the Central Limit Theorem. 1 Central Limit Theorem for i.i.d. random variables CSCI-B609: A Theorist s Toolkit, Fall 06 Aug 3 Lecture 0: the Cetral Limit Theorem Lecturer: Yua Zhou Scribe: Yua Xie & Yua Zhou Cetral Limit Theorem for iid radom variables Let us say that we wat to aalyze

More information

THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS

THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS DEMETRES CHRISTOFIDES Abstract. Cosider a ivertible matrix over some field. The Gauss-Jorda elimiatio reduces this matrix to the idetity

More information

Theorem: Let A n n. In this case that A does reduce to I, we search for A 1 as the solution matrix X to the matrix equation A X = I i.e.

Theorem: Let A n n. In this case that A does reduce to I, we search for A 1 as the solution matrix X to the matrix equation A X = I i.e. Theorem: Let A be a square matrix The A has a iverse matrix if ad oly if its reduced row echelo form is the idetity I this case the algorithm illustrated o the previous page will always yield the iverse

More information

Exercise 4.3 Use the Continuity Theorem to prove the Cramér-Wold Theorem, Theorem. (1) φ a X(1).

Exercise 4.3 Use the Continuity Theorem to prove the Cramér-Wold Theorem, Theorem. (1) φ a X(1). Assigmet 7 Exercise 4.3 Use the Cotiuity Theorem to prove the Cramér-Wold Theorem, Theorem 4.12. Hit: a X d a X implies that φ a X (1) φ a X(1). Sketch of solutio: As we poited out i class, the oly tricky

More information

The Random Walk For Dummies

The Random Walk For Dummies The Radom Walk For Dummies Richard A Mote Abstract We look at the priciples goverig the oe-dimesioal discrete radom walk First we review five basic cocepts of probability theory The we cosider the Beroulli

More information

Design and Analysis of ALGORITHM (Topic 2)

Design and Analysis of ALGORITHM (Topic 2) DR. Gatot F. Hertoo, MSc. Desig ad Aalysis of ALGORITHM (Topic 2) Algorithms + Data Structures = Programs Lessos Leared 1 Our Machie Model: Assumptios Geeric Radom Access Machie (RAM) Executes operatios

More information

Hashing. Algorithm : Design & Analysis [09]

Hashing. Algorithm : Design & Analysis [09] Hashig Algorithm : Desig & Aalysis [09] I the last class Implemetig Dictioary ADT Defiitio of red-black tree Black height Isertio ito a red-black tree Deletio from a red-black tree Hashig Hashig Collisio

More information

Skip lists: A randomized dictionary

Skip lists: A randomized dictionary Discrete Math for Bioiformatics WS 11/12:, by A. Bocmayr/K. Reiert, 31. Otober 2011, 09:53 3001 Sip lists: A radomized dictioary The expositio is based o the followig sources, which are all recommeded

More information

Lecture 7: October 18, 2017

Lecture 7: October 18, 2017 Iformatio ad Codig Theory Autum 207 Lecturer: Madhur Tulsiai Lecture 7: October 8, 207 Biary hypothesis testig I this lecture, we apply the tools developed i the past few lectures to uderstad the problem

More information

Topic 9: Sampling Distributions of Estimators

Topic 9: Sampling Distributions of Estimators Topic 9: Samplig Distributios of Estimators Course 003, 2018 Page 0 Samplig distributios of estimators Sice our estimators are statistics (particular fuctios of radom variables), their distributio ca be

More information

Empirical Process Theory and Oracle Inequalities

Empirical Process Theory and Oracle Inequalities Stat 928: Statistical Learig Theory Lecture: 10 Empirical Process Theory ad Oracle Iequalities Istructor: Sham Kakade 1 Risk vs Risk See Lecture 0 for a discussio o termiology. 2 The Uio Boud / Boferoi

More information