Amortized Analysis - Part 2 - Dynamic Tables. Objective: In this lecture, we shall explore Dynamic tables and its amortized analysis in detail.
|
|
- Liliana Dorsey
- 5 years ago
- Views:
Transcription
1 Idia Istitute of Iformatio Techology Desig ad Maufacturig, Kacheepuram Cheai , Idia A Autoomous Istitute uder MHRD, Govt of Idia COM 501 Advaced Data Structures ad Algorithms Istructor N.Sadagopa Scribe: Kuladeep Rejith.P Amortized Aalysis - Part - Dyamic Tables Objective: I this lecture, we shall explore Dyamic tables ad its amortized aalysis i detail. Dyamic Tables Programmig laguages such as C++ ad Java supports vector which is a dyamic array (table) that grows or shriks based o the cotext (applicatio). I this sectio, we shall aalyze dyamic tables i detail by cosiderig two operatios, amely, isert ad delete. Sice a applicatio may perform a sequece of isert ad delete operatios i some order, it is appropriate to ivestigate dyamic tables from the perspective of amortized aalysis. It is importat to come up with strategies for growig the table ad shrikig the table so that the uderlyig applicatio hadles requests (isert/delete) icely ad the applicatio does ot go for expasio or cotractio frequetly. Wheever the table overflows as the curret table size ca ot hadle ew requests, we grow the table by allocatig a ew, larger table ad free the space of the old table. Similarly if may objects are deleted from the table, it may be worthwhile to reallocate the table with a smaller size. Towards this ed, we adopt the followig strategy; The size of the table doubles as the table gets filled. i.e., the size expads from x x+1. Similarly, we shall discuss later a strategy for cotractio if too may deletios happe i a row. Isertio i a Dyamic Table Cosider a sequece of isertios. The worst-case time to execute oe isertio is Θ(). This is true because i th isertio triggers expasio. i.e., for i th isertio there is o free slot i the table ad the table must be expaded to accommodate the ew elemet. Time for copyig the cotets of old table to the ew table is θ() followed by isertio which icurs θ(1). Therefore, the worst-case time for isertios is Θ() = Θ( ). But this boud is ot tight because, expasio does ot occur so ofte i the course of operatios. Usig amortized aalysis, we see that the worst-case cost for isertios is oly Θ(). We assume that = k, where is the size of the table. Aggregate Aalysis Iitially the table is empty. i th operatio triggers a expasio oly whe i 1 is a power of. x x+1 (expasio cost is x ). Therefore, the total cost of isert operatios is, log AC = }{{} + i 1 per each isert i=1 }{{} expasio cost < < 3 = O() Amortized Cost = O() = O(1). Therefore, the cost of each isert is O(1) amortized.
2 Aalysis usig a potetial fuctio Amortized cost= Actual cost + chage i potetial. We shall work with the followig potetial fuctio; φ(t ) = Num(T ) Size(T ). N = Num(T ), the umber of elemets i table T. S = Size(T ), the size of the table T. Iitially, Num(T ) = 0 ad Size(T ) = 0. Therefore, φ(t ) = 0 Note: potetial fuctio must be defied i such a way that the potetial associated with data structure must be positive for all cofiguratios. i.e., φ(t ) 0 for all cofiguratios. Remark: 1. If Num(T ) = Size(T ) = φ(t ) = Num(T ). If Num(T ) = Size(T ) = φ(t ) = 0 3. Load Factor α = Num(T ) Size(T ). A measure of how much percetage of table is filled. Amortized cost for i th Isertio ito the Table AC i = c i + (φ i φ i 1 ) There are two cases possible here, either the i th isertio triggers a expasio or it does ot trigger a expasio. Case 1: i th isertio does ot trigger a expasio. S i 1 = S i N i = N i AC i = 1 + N i S i (N i 1) + S i 1 = 1 + N i S i N i + + S i = 3 Case : i th isertio triggers a expasio. Sice cotets of the old table must be copied to the ew table followed by isert, the actual cost is N i. S i 1 = Si N i 1 = N i 1 AC i = N i + N i S i (N i 1) + S i 1 = N i + N i S i N i + + Si = N i + Si + 1 But, N i = Si AC i = Si Si = 3 Thus, the amortized cost of isert is 3 = O(1). cost is O(1) = O(). Therefore, for a sequece of iserts, the amortized Remark: 1. Oce the table expads, the potetial associated with it is zero ad whe the table is full, the potetial is Num(T ). I all other cofiguratios, the potetial is betwee 0 ad Num(T ) ad thus, φ(t ) 0 always. Amortized cost for Deletio = 1 + N i S i (N i 1 S i 1 ) = 1 + (N i 1 1) S i N i 1 + S i Sice S i = S i 1, N i = N i 1 1 = 1
3 Thus, the amortized cost of delete is 1 = O(1). Remark: I our earlier discussio, we focused o expasio whe a ew isert triggers expasio. However, we did ot focus o cotractio whe the table has a few elemets. I the ext sectio, we shall discuss a strategy for cotractio. Strategy for expasio ad cotractio Strategy for expasio is same as the strategy we discussed before. Expad whe the table is full ad create a ew table whose size is twice the size of the old table. The strategy for cotractio; if the table is half full ad i th operatio which is delete makes the table size go below size, the perform cotractio. Although, these strategies appear good, it triggers too may expasios ad cotractios as we ca see from the followig example. Cosider the followig sequece of operatios o the Table: I, I, I, I, I,...,I, D, D, I, I, D, D, I, I, D, D, I,... }{{}}{{} iserts operatios size + 1 operatio is isert, which triggers a expasio. Subsequetly, the table will cotai + 1 elemets. The subsequet two deletios brigs the table size to size 1 which itur triggers a cotractio. For the above example, we ca see that expasio ad cotractio happe alterately for 4 times. Let us aalyze the cost for the above sequece; The first operatios icurs a amortized cost of 3 O() = O(). The secod operatios icurs a amortized cost of O() (/) = O( ). The total cost of operatios is O( ) ad the amortized cost of each operatio is O(). Drawback of this strategy: -After a expasio, we do ot perform eough deletios to pay for a cotractio. -After a cotractio, we do ot perform eough isertios to pay for a expasio. Modified Strategy: We ca improve this strategy by allowig α(t ) to drop below 1. We cotiue to double the size whe a object is iserted ito a full table but, we cotract the table whe deletio causes α < 1 4. Therefore, 1 4 α(t ) 1. We ow defie a ew Potetial fuctio correspodig to the ew strategy, φ(t ) = Num(T ) Size(T ) for α 1 = Size(T ) Num(T ) for α < 1 Now, load factor α oscillates betwee 1 4 ad 1. Most importatly, the choice of potetial fuctio from the above two is also dictated by α. Suppose, i th operatio is a isert, the possible coditios are: Case 1: α i 1 1 α i 1 : Aalysis is idetical to that of table expasio i previous sectio AC i = 3 Case : α i 1 < 1 α i < 1 : = 1 + ( Si N i) ( Si 1 N i Si 1 + N i 1 = 0 this operatio comes for free, o eed to sped aythig from potetial. 3
4 Case 3: α i 1 < 1 α i 1 : = 1 + N i S i ( Si 1 = 1 + N i 1 + S i Si 1 + N i 1 ) = 3 + 3N i 1 3Si 1 < 3 + 3Si 1 3Si 1 < 3 If we charge 1 or per operatio, it works fie. Suppose, i th operatio is delete, the possible coditios are: Case 4: α i 1 1 α i 1 : = 1 + N i S i (N i 1 S i 1 ) = 1 + N i S i N i + S i = 1 Case 5: α i 1 1 α i < 1 : = 1 + ( Si N i) (N i 1 S i 1 ) N i N i 1 + S i = + 3Si 3N i 1 = + 3Si 3N i 3 = 1 Sice Ni S i < 1, N i < Si. α i 1 = 1 4 : This triggers a cotractio S i = Si 1, N i = Si 1 ad c i = N i + 1 = 1 + N i + ( Si N i) ( Si 1 = 1 + N i + Si N i S i + Si = 1 Case 6: α i α i < 1 : N i Si 1 + N i 1 Rearrage the terms; = 1 + N i 1 + Si N i Si = Therefore, the amortized cost of deletio is at most, which is O(1). Sice the amortized cost of each operatio is bouded above by a costat, for ay sequece of operatios cosistig of isert ad delete, o a Dyamic Table is O() ad O(1) amortized per operatio. 4
5 Ackowledgemets: Lecture cotets preseted i this module ad subsequet modules are based o the followig text books ad most importatly, author has greatly leart from lectures by algorithm expoets affiliated to IIT Madras/IMSc; Prof C. Padu Raga, Prof N.S.Narayaaswamy, Prof Vekatesh Rama, ad Prof Aurag Mittal. Author sicerely ackowledges all of them. Special thaks to Teachig Assistats Mr.Rejith.P ad Ms.Dhaalakshmi.S for their sicere ad dedicated effort ad makig this scribe possible. Author has beefited a lot by teachig this course to seior udergraduate studets ad juior udergraduate studets who have also cotributed to this scribe i may ways. Author sicerely thaks all of them. Refereces: 1. E.Horowitz, S.Sahi, S.Rajasekara, Fudametals of Computer Algorithms, Galgotia Publicatios.. T.H. Corme, C.E. Leiserso, R.L.Rivest, C.Stei, Itroductio to Algorithms, PHI. 3. Sara Baase, A.V.Gelder, Computer Algorithms, Pearso. 4. Eva Tardos ad Kleiberg, Algorithm Desig, Pearso. 5
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 information11. Hash Tables. m is not too large. Many applications require a dynamic set that supports only the directory operations INSERT, SEARCH and DELETE.
11. Hash Tables May applicatios require a dyamic set that supports oly the directory operatios INSERT, SEARCH ad DELETE. A hash table is a geeralizatio of the simpler otio of a ordiary array. Directly
More informationDATA STRUCTURES I, II, III, AND IV
Data structures DATA STRUCTURES I, II, III, AND IV I. Amortized Aalysis II. Biary ad Biomial Heaps III. Fiboacci Heaps IV. Uio Fid Static problems. Give a iput, produce a output. Ex. Sortig, FFT, edit
More information1 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 informationSkip 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 informationSECTION 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 informationCS 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 informationMAT1026 Calculus II Basic Convergence Tests for Series
MAT026 Calculus II Basic Covergece Tests for Series Egi MERMUT 202.03.08 Dokuz Eylül Uiversity Faculty of Sciece Departmet of Mathematics İzmir/TURKEY Cotets Mootoe Covergece Theorem 2 2 Series of Real
More informationAnalysis 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 informationIt is often useful to approximate complicated functions using simpler ones. We consider the task of approximating a function by a polynomial.
Taylor Polyomials ad Taylor Series It is ofte useful to approximate complicated fuctios usig simpler oes We cosider the task of approximatig a fuctio by a polyomial If f is at least -times differetiable
More informationDisjoint set (Union-Find)
CS124 Lecture 7 Fall 2018 Disjoit set (Uio-Fid) For Kruskal s algorithm for the miimum spaig tree problem, we foud that we eeded a data structure for maitaiig a collectio of disjoit sets. That is, we eed
More informationLecture 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 informationTest One (Answer Key)
CS395/Ma395 (Sprig 2005) Test Oe Name: Page 1 Test Oe (Aswer Key) CS395/Ma395: Aalysis of Algorithms This is a closed book, closed otes, 70 miute examiatio. It is worth 100 poits. There are twelve (12)
More informationOPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES
OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES Peter M. Maurer Why Hashig is θ(). As i biary search, hashig assumes that keys are stored i a array which is idexed by a iteger. However, hashig attempts to bypass
More informationMath 2784 (or 2794W) University of Connecticut
ORDERS OF GROWTH PAT SMITH Math 2784 (or 2794W) Uiversity of Coecticut Date: Mar. 2, 22. ORDERS OF GROWTH. Itroductio Gaiig a ituitive feel for the relative growth of fuctios is importat if you really
More informationCS / 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 informationDefinitions: 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 informationDesign and Analysis of Algorithms
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 The hirig problem
More informationCHAPTER 10 INFINITE SEQUENCES AND SERIES
CHAPTER 10 INFINITE SEQUENCES AND SERIES 10.1 Sequeces 10.2 Ifiite Series 10.3 The Itegral Tests 10.4 Compariso Tests 10.5 The Ratio ad Root Tests 10.6 Alteratig Series: Absolute ad Coditioal Covergece
More information6.3 Testing Series With Positive Terms
6.3. TESTING SERIES WITH POSITIVE TERMS 307 6.3 Testig Series With Positive Terms 6.3. Review of what is kow up to ow I theory, testig a series a i for covergece amouts to fidig the i= sequece of partial
More informationMarcinkiwiecz-Zygmund Type Inequalities for all Arcs of the Circle
Marcikiwiecz-ygmud Type Iequalities for all Arcs of the Circle C.K. Kobidarajah ad D. S. Lubisky Mathematics Departmet, Easter Uiversity, Chekalady, Sri Laka; Mathematics Departmet, Georgia Istitute of
More informationCSI 5163 (95.573) ALGORITHM ANALYSIS AND DESIGN
CSI 5163 (95.573) ALGORITHM ANALYSIS AND DESIGN CSI 5163 (95.5703) ALGORITHM ANALYSIS AND DESIGN (3 cr.) (T) Topics of curret iterest i the desig ad aalysis of computer algorithms for graphtheoretical
More informationMath 113 Exam 3 Practice
Math Exam Practice Exam will cover.-.9. This sheet has three sectios. The first sectio will remid you about techiques ad formulas that you should kow. The secod gives a umber of practice questios for you
More informationTheorem: 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 informationSequences and Series of Functions
Chapter 6 Sequeces ad Series of Fuctios 6.1. Covergece of a Sequece of Fuctios Poitwise Covergece. Defiitio 6.1. Let, for each N, fuctio f : A R be defied. If, for each x A, the sequece (f (x)) coverges
More informationRecurrence 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 informationInfinite Sequences and Series
Chapter 6 Ifiite Sequeces ad Series 6.1 Ifiite Sequeces 6.1.1 Elemetary Cocepts Simply speakig, a sequece is a ordered list of umbers writte: {a 1, a 2, a 3,...a, a +1,...} where the elemets a i represet
More informationA sequence of numbers is a function whose domain is the positive integers. We can see that the sequence
Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece,, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet as
More informationData Structures and Algorithm. Xiaoqing Zheng
Data Structures ad Algorithm Xiaoqig Zheg zhegxq@fudaeduc What are algorithms? A sequece of computatioal steps that trasform the iput ito the output Sortig problem: Iput: A sequece of umbers
More informationENGI Series Page 6-01
ENGI 3425 6 Series Page 6-01 6. Series Cotets: 6.01 Sequeces; geeral term, limits, covergece 6.02 Series; summatio otatio, covergece, divergece test 6.03 Stadard Series; telescopig series, geometric series,
More informationRecursive 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 informationLecture 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 informationChimica Inorganica 3
himica Iorgaica Irreducible Represetatios ad haracter Tables Rather tha usig geometrical operatios, it is ofte much more coveiet to employ a ew set of group elemets which are matrices ad to make the rule
More informationClassification of problem & problem solving strategies. classification of time complexities (linear, logarithmic etc)
Classificatio of problem & problem solvig strategies classificatio of time complexities (liear, arithmic etc) Problem subdivisio Divide ad Coquer strategy. Asymptotic otatios, lower boud ad upper boud:
More information62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +
62. Power series Defiitio 16. (Power series) Give a sequece {c }, the series c x = c 0 + c 1 x + c 2 x 2 + c 3 x 3 + is called a power series i the variable x. The umbers c are called the coefficiets of
More informationHashing. 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 informationProduct measures, Tonelli s and Fubini s theorems For use in MAT3400/4400, autumn 2014 Nadia S. Larsen. Version of 13 October 2014.
Product measures, Toelli s ad Fubii s theorems For use i MAT3400/4400, autum 2014 Nadia S. Larse Versio of 13 October 2014. 1. Costructio of the product measure The purpose of these otes is to preset the
More informationA Block Cipher Using Linear Congruences
Joural of Computer Sciece 3 (7): 556-560, 2007 ISSN 1549-3636 2007 Sciece Publicatios A Block Cipher Usig Liear Cogrueces 1 V.U.K. Sastry ad 2 V. Jaaki 1 Academic Affairs, Sreeidhi Istitute of Sciece &
More informationSequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence
Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece 1, 1, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet
More informationLecture 3: Asymptotic Analysis + Recurrences
Lecture 3: Asymptotic Aalysis + Recurreces Data Structures ad Algorithms CSE 373 SU 18 BEN JONES 1 Warmup Write a model ad fid Big-O for (it i = 0; i < ; i++) { for (it j = 0; j < i; j++) { System.out.pritl(
More informationZeros of Polynomials
Math 160 www.timetodare.com 4.5 4.6 Zeros of Polyomials I these sectios we will study polyomials algebraically. Most of our work will be cocered with fidig the solutios of polyomial equatios of ay degree
More informationLecture 2. The Lovász Local Lemma
Staford Uiversity Sprig 208 Math 233A: No-costructive methods i combiatorics Istructor: Ja Vodrák Lecture date: Jauary 0, 208 Origial scribe: Apoorva Khare Lecture 2. The Lovász Local Lemma 2. Itroductio
More informationAn 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 informationDe Bruijn Sequences for the Binary Strings with Maximum Density
De Bruij Sequeces for the Biary Strigs with Maximum Desity Joe Sawada 1, Brett Steves 2, ad Aaro Williams 2 1 jsawada@uoguelph.ca School of Computer Sciece, Uiversity of Guelph, CANADA 2 brett@math.carleto.ca
More information1 6 = 1 6 = + Factorials and Euler s Gamma function
Royal Holloway Uiversity of Lodo Departmet of Physics Factorials ad Euler s Gamma fuctio Itroductio The is a self-cotaied part of the course dealig, essetially, with the factorial fuctio ad its geeralizatio
More informationA New Solution Method for the Finite-Horizon Discrete-Time EOQ Problem
This is the Pre-Published Versio. A New Solutio Method for the Fiite-Horizo Discrete-Time EOQ Problem Chug-Lu Li Departmet of Logistics The Hog Kog Polytechic Uiversity Hug Hom, Kowloo, Hog Kog Phoe: +852-2766-7410
More informationSOME TRIBONACCI IDENTITIES
Mathematics Today Vol.7(Dec-011) 1-9 ISSN 0976-38 Abstract: SOME TRIBONACCI IDENTITIES Shah Devbhadra V. Sir P.T.Sarvajaik College of Sciece, Athwalies, Surat 395001. e-mail : drdvshah@yahoo.com The sequece
More informationIt 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 informationSCORE. Exam 2. MA 114 Exam 2 Fall 2017
Exam Name: Sectio ad/or TA: Do ot remove this aswer page you will retur the whole exam. You will be allowed two hours to complete this test. No books or otes may be used. You may use a graphig calculator
More information10.2 Infinite Series Contemporary Calculus 1
10. Ifiite Series Cotemporary Calculus 1 10. INFINITE SERIES Our goal i this sectio is to add together the umbers i a sequece. Sice it would take a very log time to add together the ifiite umber of umbers,
More informationUC 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 informationENGI Series Page 5-01
ENGI 344 5 Series Page 5-01 5. Series Cotets: 5.01 Sequeces; geeral term, limits, covergece 5.0 Series; summatio otatio, covergece, divergece test 5.03 Series; telescopig series, geometric series, p-series
More informationLecture Overview. 2 Permutations and Combinations. n(n 1) (n (k 1)) = n(n 1) (n k + 1) =
COMPSCI 230: Discrete Mathematics for Computer Sciece April 8, 2019 Lecturer: Debmalya Paigrahi Lecture 22 Scribe: Kevi Su 1 Overview I this lecture, we begi studyig the fudametals of coutig discrete objects.
More informationDe Bruijn Sequences for the Binary Strings with Maximum Specified Density
De Bruij Sequeces for the Biary Strigs with Maximum Specified Desity Joe Sawada 1, Brett Steves 2, ad Aaro Williams 2 1 jsawada@uoguelph.ca School of Computer Sciece, Uiversity of Guelph, CANADA 2 brett@math.carleto.ca
More informationThe 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 informationAdditional Notes on Power Series
Additioal Notes o Power Series Mauela Girotti MATH 37-0 Advaced Calculus of oe variable Cotets Quick recall 2 Abel s Theorem 2 3 Differetiatio ad Itegratio of Power series 4 Quick recall We recall here
More informationCSE 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 informationIf a subset E of R contains no open interval, is it of zero measure? For instance, is the set of irrationals in [0, 1] is of measure zero?
2 Lebesgue Measure I Chapter 1 we defied the cocept of a set of measure zero, ad we have observed that every coutable set is of measure zero. Here are some atural questios: If a subset E of R cotais a
More informationSkip 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 informationw (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 information7.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 informationThe Phi Power Series
The Phi Power Series I did this work i about 0 years while poderig the relatioship betwee the golde mea ad the Madelbrot set. I have fially decided to make it available from my blog at http://semresearch.wordpress.com/.
More informationsubcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016
subcaptiofot+=small,labelformat=pares,labelsep=space,skip=6pt,list=0,hypcap=0 subcaptio ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, /6/06. Self-cojugate Partitios Recall that, give a partitio λ, we may
More information3.1 & 3.2 SEQUENCES. Definition 3.1: A sequence is a function whose domain is the positive integers (=Z ++ )
3. & 3. SEQUENCES Defiitio 3.: A sequece is a fuctio whose domai is the positive itegers (=Z ++ ) Examples:. f() = for Z ++ or, 4, 6, 8, 0,. a = +/ or, ½, / 3, ¼, 3. b = /² or, ¼, / 9, 4. c = ( ) + or
More informationStatistical Analysis on Uncertainty for Autocorrelated Measurements and its Applications to Key Comparisons
Statistical Aalysis o Ucertaity for Autocorrelated Measuremets ad its Applicatios to Key Comparisos Nie Fa Zhag Natioal Istitute of Stadards ad Techology Gaithersburg, MD 0899, USA Outlies. Itroductio.
More informationLecture 10: Universal coding and prediction
0-704: Iformatio Processig ad Learig Sprig 0 Lecture 0: Uiversal codig ad predictio Lecturer: Aarti Sigh Scribes: Georg M. Goerg Disclaimer: These otes have ot bee subjected to the usual scrutiy reserved
More informationBIRKHOFF ERGODIC THEOREM
BIRKHOFF ERGODIC THEOREM Abstract. We will give a proof of the poitwise ergodic theorem, which was first proved by Birkhoff. May improvemets have bee made sice Birkhoff s orgial proof. The versio we give
More informationMath 25 Solutions to practice problems
Math 5: Advaced Calculus UC Davis, Sprig 0 Math 5 Solutios to practice problems Questio For = 0,,, 3,... ad 0 k defie umbers C k C k =! k!( k)! (for k = 0 ad k = we defie C 0 = C = ). by = ( )... ( k +
More informationAlgorithm Analysis. Chapter 3
Data Structures Dr Ahmed Rafat Abas Computer Sciece Dept, Faculty of Computer ad Iformatio, Zagazig Uiversity arabas@zu.edu.eg http://www.arsaliem.faculty.zu.edu.eg/ Algorithm Aalysis Chapter 3 3. Itroductio
More information4.3 Growth Rates of Solutions to Recurrences
4.3. GROWTH RATES OF SOLUTIONS TO RECURRENCES 81 4.3 Growth Rates of Solutios to Recurreces 4.3.1 Divide ad Coquer Algorithms Oe of the most basic ad powerful algorithmic techiques is divide ad coquer.
More informationLet 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 informationComparison Study of Series Approximation. and Convergence between Chebyshev. and Legendre Series
Applied Mathematical Scieces, Vol. 7, 03, o. 6, 3-337 HIKARI Ltd, www.m-hikari.com http://d.doi.org/0.988/ams.03.3430 Compariso Study of Series Approimatio ad Covergece betwee Chebyshev ad Legedre Series
More informationAdvanced Stochastic Processes.
Advaced Stochastic Processes. David Gamarik LECTURE 2 Radom variables ad measurable fuctios. Strog Law of Large Numbers (SLLN). Scary stuff cotiued... Outlie of Lecture Radom variables ad measurable fuctios.
More informationYou may work in pairs or purely individually for this assignment.
CS 04 Problem Solvig i Computer Sciece OOC Assigmet 6: Recurreces You may work i pairs or purely idividually for this assigmet. Prepare your aswers to the followig questios i a plai ASCII text file or
More informationSection 5.1 The Basics of Counting
1 Sectio 5.1 The Basics of Coutig Combiatorics, the study of arragemets of objects, is a importat part of discrete mathematics. I this chapter, we will lear basic techiques of coutig which has a lot of
More informationB Supplemental Notes 2 Hypergeometric, Binomial, Poisson and Multinomial Random Variables and Borel Sets
B671-672 Supplemetal otes 2 Hypergeometric, Biomial, Poisso ad Multiomial Radom Variables ad Borel Sets 1 Biomial Approximatio to the Hypergeometric Recall that the Hypergeometric istributio is fx = x
More informationSUMMARY OF SEQUENCES AND SERIES
SUMMARY OF SEQUENCES AND SERIES Importat Defiitios, Results ad Theorems for Sequeces ad Series Defiitio. A sequece {a } has a limit L ad we write lim a = L if for every ɛ > 0, there is a correspodig iteger
More informationsin(n) + 2 cos(2n) n 3/2 3 sin(n) 2cos(2n) n 3/2 a n =
60. Ratio ad root tests 60.1. Absolutely coverget series. Defiitio 13. (Absolute covergece) A series a is called absolutely coverget if the series of absolute values a is coverget. The absolute covergece
More informationRecursive 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 informationSelf-normalized deviation inequalities with application to t-statistic
Self-ormalized deviatio iequalities with applicatio to t-statistic Xiequa Fa Ceter for Applied Mathematics, Tiaji Uiversity, 30007 Tiaji, Chia Abstract Let ξ i i 1 be a sequece of idepedet ad symmetric
More informationInverse Matrix. A meaning that matrix B is an inverse of matrix A.
Iverse Matrix Two square matrices A ad B of dimesios are called iverses to oe aother if the followig holds, AB BA I (11) The otio is dual but we ofte write 1 B A meaig that matrix B is a iverse of matrix
More informationBeurling Integers: Part 2
Beurlig Itegers: Part 2 Isomorphisms Devi Platt July 11, 2015 1 Prime Factorizatio Sequeces I the last article we itroduced the Beurlig geeralized itegers, which ca be represeted as a sequece of real umbers
More information6.883: Online Methods in Machine Learning Alexander Rakhlin
6.883: Olie Methods i Machie Learig Alexader Rakhli LECTURES 5 AND 6. THE EXPERTS SETTING. EXPONENTIAL WEIGHTS All the algorithms preseted so far halluciate the future values as radom draws ad the perform
More informationSummary: Congruences. j=1. 1 Here we use the Mathematica syntax for the function. In Maple worksheets, the function
Summary: Cogrueces j whe divided by, ad determiig the additive order of a iteger mod. As described i the Prelab sectio, cogrueces ca be thought of i terms of coutig with rows, ad for some questios this
More informationPolynomial identity testing and global minimum cut
CHAPTER 6 Polyomial idetity testig ad global miimum cut I this lecture we will cosider two further problems that ca be solved usig probabilistic algorithms. I the first half, we will cosider the problem
More informationSequence A sequence is a function whose domain of definition is the set of natural numbers.
Chapter Sequeces Course Title: Real Aalysis Course Code: MTH3 Course istructor: Dr Atiq ur Rehma Class: MSc-I Course URL: wwwmathcityorg/atiq/fa8-mth3 Sequeces form a importat compoet of Mathematical Aalysis
More informationMa 530 Introduction to Power Series
Ma 530 Itroductio to Power Series Please ote that there is material o power series at Visual Calculus. Some of this material was used as part of the presetatio of the topics that follow. What is a Power
More informationLinear chord diagrams with long chords
Liear chord diagrams with log chords Everett Sulliva Departmet of Mathematics Dartmouth College Haover New Hampshire, U.S.A. everett..sulliva@dartmouth.edu Submitted: Feb 7, 2017; Accepted: Oct 7, 2017;
More informationCS583 Lecture 02. Jana Kosecka. some materials here are based on E. Demaine, D. Luebke slides
CS583 Lecture 02 Jaa Kosecka some materials here are based o E. Demaie, D. Luebke slides Previously Sample algorithms Exact ruig time, pseudo-code Approximate ruig time Worst case aalysis Best case aalysis
More information6.867 Machine learning, lecture 7 (Jaakkola) 1
6.867 Machie learig, lecture 7 (Jaakkola) 1 Lecture topics: Kerel form of liear regressio Kerels, examples, costructio, properties Liear regressio ad kerels Cosider a slightly simpler model where we omit
More informationApplication 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 informationCSE 332. Data Structures and Parallelism
Aam Blak Lecture 6a Witer 2017 CSE 332 Data Structures a Parallelism CSE 332: Data Structures a Parallelism More Recurreces T () T (/2) T (/2) T (/4) T (/4) T (/4) T (/4) P1 De-Brief 1 You i somethig substatial!
More informationLecture 2 Clustering Part II
COMS 4995: Usupervised Learig (Summer 8) May 24, 208 Lecture 2 Clusterig Part II Istructor: Nakul Verma Scribes: Jie Li, Yadi Rozov Today, we will be talkig about the hardess results for k-meas. More specifically,
More informationLecture XVI - Lifting of paths and homotopies
Lecture XVI - Liftig of paths ad homotopies I the last lecture we discussed the liftig problem ad proved that the lift if it exists is uiquely determied by its value at oe poit. I this lecture we shall
More informationLecture 3 The Lebesgue Integral
Lecture 3: The Lebesgue Itegral 1 of 14 Course: Theory of Probability I Term: Fall 2013 Istructor: Gorda Zitkovic Lecture 3 The Lebesgue Itegral The costructio of the itegral Uless expressly specified
More informationt distribution [34] : used to test a mean against an hypothesized value (H 0 : µ = µ 0 ) or the difference
EXST30 Backgroud material Page From the textbook The Statistical Sleuth Mea [0]: I your text the word mea deotes a populatio mea (µ) while the work average deotes a sample average ( ). Variace [0]: The
More informationCastiel, Supernatural, Season 6, Episode 18
13 Differetial Equatios the aswer to your questio ca best be epressed as a series of partial differetial equatios... Castiel, Superatural, Seaso 6, Episode 18 A differetial equatio is a mathematical equatio
More information11 Hidden Markov Models
Hidde Markov Models Hidde Markov Models are a popular machie learig approach i bioiformatics. Machie learig algorithms are preseted with traiig data, which are used to derive importat isights about the
More informationECE-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(I.C) THE DISTRIBUTION OF PRIMES
I.C) THE DISTRIBUTION OF PRIMES I the last sectio we showed via a Euclid-ispired, algebraic argumet that there are ifiitely may primes of the form p = 4 i.e. 4 + 3). I fact, this is true for primes of
More information