2 Scalable algorithms, Scheduling, and a glance at All Prefix Sum
|
|
- Jesse Benson
- 5 years ago
- Views:
Transcription
1 CME 323: Distributed Algorithms ad Otimizatio, Srig 2017 htt://staford.edu/~rezab/dao. Istructor: Reza Zadeh, Matroid ad Staford. Lecture 2, 4/5/2017. Scribed by Adreas Satucci. 2 Scalable algorithms, Schedulig, ad a glace at All Prefix Sum 2.1 Tyes of scalig Oe imortat otio is the idea of how much seed-u we ca hoe to achieve give more rocessors. We have three differet tyes of scalability. Strog scalig Let T 1, deote the ru-time o oe rocessor give a iut of size. Suose we have rocessors. We defie the seed u of a arallel algorithm as SeedU(, ) = T 1, T,. Defiitio 2.1 If SeedU(, ) = Θ(), we say that the algorithm is strogly scalable. Last lecture, we saw arallel sum of umbers o rocessors, which is strogly scalable. 1 Weak Scalig There is aother otio of scalability. We sometimes are iterested to cosider the case where for each rocessor we add, we add more data as well. This is actually quite realistic, sice ofte the oly time we ca afford to add more rocessors or machies is whe we are burdeed with more data tha our ifrastructure ca hadle. Defiitio 2.2 If SeedU(,) = T 1, T, = Ω(1), the our algorithm is weakly scalable. The last otio of scalability is the case whe our algorithm is embarrassigly arallel. This is true if our DAG has odes 0-deth, e.g. Figure 1: A Embarrassigly Parallel DAG That is, there is o deedecy betwee our oeratios. It s scalable i the most trivial sese, e.g. fliig as may cois as ossible at the same time. 1 To see this, recall that work is T 1 =, ad deth is T = log 2, so SeedU(, ) = = Θ(). Secifically, +log 2 both ad are assumed to be goig to ifiity, but grows much slower tha does. Hece + log 2 + ad 2 + log 2 =. 1
2 2.2 Schedulig Parallelism is almost etirely about buildig algorithms with low deth, ad clever schedulig. We first motivate why schedulers are imortat. Motivatio So far, we have assumed that rocessors are assiged tasks i a otimal way. However, the rocess of assigig tasks to rocessors is actually a o-trivial roblem i ad of itself. So, suose you have a rogram which is very large ad recursive i ature. At the ed of the day, it s a DAG of comutatios. At ay level i the DAG, there are a certai umber of comutatios which ca be required to execute (at the same time). It s ossible that the umber of comutatios to be more (or less) tha the umber of rocessors you have available to you. Ideally, you wish for all your rocessors to be busy. Deedig o how you schedule the oeratios, you sometimes may ed u with rocessors which are idle ad ot workig. It is the schedulers task to schedule thigs i tadem i such a way that you look ahead a little bit ad miimize the idle time of rocessors. We could do this greedily, i.e. as soo as there is ay comutatio to be doe, we assig it to a rocessor. Or, we could be a little bit clever about it, ad erhas look ahead further to our DAG to see if we ca la more efficietly. Sark has a scheduler. Every distributed comutig set u has a scheduler. Your oeratig system ad hoe s have schedulers. Every comuter has rocesses, ad every comuter rus i arallel. Your comuter might have fifty Chrome tabs oe ad must decide which oe to give riority to i order to otimize erformace of your machie Problem defiitio A imortat roblem i ay arallel or distributed comutig settig is figurig out how to schedule jobs otimally. I.e. a scheduler must be able to assig sequetial comutatio to rocessors or machies i order to miimize the total time ecessary to rocess all jobs. Notatio We assume that the rocessors are idetical (i.e. each job takes the same amout of time to ru o ay of the machies). More formally, we are give rocessors ad a uordered set of jobs with rocessig times J 1,..., J R. Say that the fial schedule for rocessor i is defied by a set of idices of jobs assiged to rocessor i. We call this set S i. The load for rocessor i is therefore, L i = k S i J k. The goal is to miimize the makesa defied as L max = max i {1,...,} L i The simle (greedy) algorithm The ituitio behid the greedy algorithm discussed here is simle: i order to miimize the makesa we do t wat to give a job to a machie that already has a large load. Therefore, we cosider the followig algorithm. Take the jobs oe by oe ad assig each job to the rocessor that has the least load at that time. This algorithm is simle ad is olie. 2
3 1 for each job that comes i (streamig) do 2 Assig job to lowest burdeed machie 3 ed Algorithm 1: Simle scheduler Other variats of schedulig We ote there are may other variats of schedulig. Jobs ca have deedecies, i.e. oe job must fiish before aother job ca start. Here, the roblem is resecified by a comutatioal DAG that is kow before the time of schedulig. Aother variat is that schedulig must hae olie, i.e. jobs come at you i a order where you caot look ito the future. As jobs come i, you have to schedule it, ad you caot go back ad chage the schedule. For a comrehesive treatmet of variats of schedulig, see Hadbook of Schedulig Otimality of the greedy aroach I either of the above cases, where jobs have deedecies or must be scheduled olie, the roblem is NP hard. So, we use aroximatio algorithms. We claim that the simle (greedy, ad olie) algorithm actually has a aroximatio ratio of 2. I other words, the algorithm is i the worstcase 2 times worse tha the otimal, which is fairly good. For this aalysis, we defie the otimal makesa (miimal makesa ossible) to be OPT ad try to comare the outut of the greedy algorithm to this. We also defie L max as above to be the makesa. Claim: Greedy algorithm has a aroximatio ratio of 2. Proof: We first wat to get a hadle (lower boud) o OPT. We kow that the otimal makesa must be at least the sum of the rocessig times for the jobs divided amogst the rocessors, i.e. 3 OPT 1 J i. (1) A secod lower boud is that OPT is at least as large as the time of the logest job, 4 OPT max i J i. (2) Now cosider ruig the greedy algorithm ad idetifyig the rocessor resosible for the makesa of the greedy algorithm (i.e. k = argmax i L i ). Let J t be the load of the last job laced 2 To give a idea of aother variat, cosider the case of distributed comutig, where each machie houses a set of local data, ad shufflig data across the etwork is a bottleeck. We may cosider schedulig jobs to machies such that o data are shuffled. We ll cosider this more i the latter art of the course. This is called locality sesitive schedulig 3 To see this, assume toward cotradictio that OPT is able to schedule jobs such that OPT < 1 Ji. Suose that istead of OPT assigig jobs to rocessors i arallel, we assiged all the work to oe rocessor sequetially. The of course the total time required give by OPT < Ji but this is a cotradictio, sice Ji exactly reresets the amout of work required to rocess all jobs o a sigle rocessor. 4 The reaso for this is simle: the logest job must be scheduled at some oit to be ru sequetially o oe rocessor, at which oit it will require max i J i time to comute. There may be other rocessors which bottleeck our makesa, but we kow that OPT must take at least as log as ay job, ad i articular this holds for the largest job. 3
4 o this rocessor. Before the last job was laced o this rocessor, the load of this rocessor was thus L max - J t. By the defiitio of the greedy algorithm, this rocessor must have also had the least load before the last job was assiged. Therefore, all other rocessors at this time must have had load at least L max J t, i.e. L max J t L i for all i. Hece, summig this iequality over all i, (L max J t ) L i L i = J i (3) I the secod iequality, we assert that although J t the last job laced o the bottleeck rocessor, there may still be other jobs yet to be assiged, hece we have that the sum of total work laced o each machie caot decrease after assigig all jobs. The last equality comes from the fact that the sum of the loads must be equal to the sum of the rocessig times for the jobs. Rearragig the terms i this exressio let s us exress this as: L max 1 J i + J t (4) Now, ote that our greedy algorithm actually has makesa exactly equal to L max, by defiitio. Usig equatios 1 ad 2 alog with the fact that J t max i J i, we get that our greedy aroximatio algorithm has makesa APX = L max OP T + OP T = 2 OP T. (5) This shows that the greedy algorithm rovides us with a schedulig time that is ot more tha 2 times more tha the otimal. What if we could see the future? We ote that if we first sort the jobs i descedig order ad assig larger jobs first, we ca aively get a 3/2 aroximatio. The ituitio is that if we first schedule large jobs, we ca use the smaller jobs to fill i the gas remaiig, i.e. to balace all loads. If we use the same algorithm with a tighter aalysis, we get a 4/3 aroximatio. We ll see later i the course how Sark uses lazy evaluatio for exactly this reaso: by fakig comutatio util the user takes a actio, Sark ca sort jobs ad to obtai a more efficiet scheduler. What s realistic? It may seem that our above assumtio, to be able to look ito the future ad kow which jobs are goig to be scheduled, is quite ureasoable. I reality, we do t eve kow how log each job will take. However, we ofte have a retty good idea (based o historical data or exectatios) how log a articular job will take to ru. Ad further, we may have statistics or exectatios o how may jobs of a articular tye are goig to come i, hece, it may ot be such a urealistic sceario to kow (withi a certai tolerace) the exected amout of time each job will take as well as what jobs might be i the ielie. 2.3 All Prefix Sum Give a list of itegers, we wat to fid the sum of all refixes of the list, i.e. the ruig sum. We are give a iut array A of size elemets log. Our outut is of size + 1 elemets log, ad its first etry is always zero. 4
5 As a examle, suose A = [3, 5, 3, 1, 6], the AllPrefixSum(A) = [0, 3, 8, 11, 12, 18]. This feels like a iheretly sequetial task. The obvious way to do this with a sigle machie is to have a ruig sum ad write itermediary sums as we iterate through the array i liear time. However, this does ot arallelize at all. How ca we arallelize this, so that it has low-deth? We ll take a look at this roblem i more detail ext lecture. For ow, try to come u with your ow algorithm. Refereces [1] Ola Svesso Aroximatio Algorithms. EPFL, Jauary 21, [2] Joseh Y-T. Leug. Hadbook of Schedulig. CRC Press, [3] G. Blelloch ad B. Maggs. Parallel Algorithms. Caregie Mello Uiversity. 5
COMPUTING FOURIER SERIES
COMPUTING FOURIER SERIES Overview We have see i revious otes how we ca use the fact that si ad cos rereset comlete orthogoal fuctios over the iterval [-,] to allow us to determie the coefficiets of a Fourier
More informationYALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE
YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE CPSC 467a: Crytograhy ad Comuter Security Notes 16 (rev. 1 Professor M. J. Fischer November 3, 2008 68 Legedre Symbol Lecture Notes 16 ( Let be a odd rime,
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 informationLecture 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 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 F215: Induction April 7, 2013
Math F25: Iductio April 7, 203 Iductio is used to prove that a collectio of statemets P(k) depedig o k N are all true. A statemet is simply a mathematical phrase that must be either true or false. Here
More informationChapter 6: BINOMIAL PROBABILITIES
Charles Bocelet, Probability, Statistics, ad Radom Sigals," Oxford Uiversity Press, 016. ISBN: 978-0-19-00051-0 Chater 6: BINOMIAL PROBABILITIES Sectios 6.1 Basics of the Biomial Distributio 6. Comutig
More informationOptimization Methods: Linear Programming Applications Assignment Problem 1. Module 4 Lecture Notes 3. Assignment Problem
Optimizatio Methods: Liear Programmig Applicatios Assigmet Problem Itroductio Module 4 Lecture Notes 3 Assigmet Problem I the previous lecture, we discussed about oe of the bech mark problems called trasportatio
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 information(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3
MATH 337 Sequeces Dr. Neal, WKU Let X be a metric space with distace fuctio d. We shall defie the geeral cocept of sequece ad limit i a metric space, the apply the results i particular to some special
More informationLecture 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 informationTHE INTEGRAL TEST AND ESTIMATES OF SUMS
THE INTEGRAL TEST AND ESTIMATES OF SUMS. Itroductio Determiig the exact sum of a series is i geeral ot a easy task. I the case of the geometric series ad the telescoig series it was ossible to fid a simle
More informationNuclear Physics Worksheet
Nuclear Physics Worksheet The ucleus [lural: uclei] is the core of the atom ad is comosed of articles called ucleos, of which there are two tyes: rotos (ositively charged); the umber of rotos i a ucleus
More informationConfidence Intervals for the Difference Between Two Proportions
PASS Samle Size Software Chater 6 Cofidece Itervals for the Differece Betwee Two Proortios Itroductio This routie calculates the grou samle sizes ecessary to achieve a secified iterval width of the differece
More informationBasics of Inference. Lecture 21: Bayesian Inference. Review - Example - Defective Parts, cont. Review - Example - Defective Parts
Basics of Iferece Lecture 21: Sta230 / Mth230 Coli Rudel Aril 16, 2014 U util this oit i the class you have almost exclusively bee reseted with roblems where we are usig a robability model where the model
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 informationCONSTRUCTING TRUNCATED IRRATIONAL NUMBERS AND DETERMINING THEIR NEIGHBORING PRIMES
CONSTRUCTING TRUNCATED IRRATIONAL NUMBERS AND DETERMINING THEIR NEIGHBORING PRIMES It is well kow that there exist a ifiite set of irratioal umbers icludig, sqrt(), ad e. Such quatities are of ifiite legth
More informationSequences I. Chapter Introduction
Chapter 2 Sequeces I 2. Itroductio A sequece is a list of umbers i a defiite order so that we kow which umber is i the first place, which umber is i the secod place ad, for ay atural umber, we kow which
More informationMA131 - Analysis 1. Workbook 2 Sequences I
MA3 - Aalysis Workbook 2 Sequeces I Autum 203 Cotets 2 Sequeces I 2. Itroductio.............................. 2.2 Icreasig ad Decreasig Sequeces................ 2 2.3 Bouded Sequeces..........................
More informationtests 17.1 Simple versus compound
PAS204: Lecture 17. tests UMP ad asymtotic I this lecture, we will idetify UMP tests, wherever they exist, for comarig a simle ull hyothesis with a comoud alterative. We also look at costructig tests based
More informationConfidence Intervals
Cofidece Itervals Berli Che Deartmet of Comuter Sciece & Iformatio Egieerig Natioal Taiwa Normal Uiversity Referece: 1. W. Navidi. Statistics for Egieerig ad Scietists. Chater 5 & Teachig Material Itroductio
More informationLecture 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 information13.1 Shannon lower bound
ECE598: Iformatio-theoretic methods i high-dimesioal statistics Srig 016 Lecture 13: Shao lower boud, Fao s method Lecturer: Yihog Wu Scribe: Daewo Seo, Mar 8, 016 [Ed Mar 11] I the last class, we leared
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 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 informationTHE 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 information1 Review and Overview
DRAFT a fial versio will be posted shortly CS229T/STATS231: Statistical Learig Theory Lecturer: Tegyu Ma Lecture #3 Scribe: Migda Qiao October 1, 2013 1 Review ad Overview I the first half of this course,
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 informationMA131 - Analysis 1. Workbook 3 Sequences II
MA3 - Aalysis Workbook 3 Sequeces II Autum 2004 Cotets 2.8 Coverget Sequeces........................ 2.9 Algebra of Limits......................... 2 2.0 Further Useful Results........................
More informationSolutions to Problem Sheet 1
Solutios to Problem Sheet ) Use Theorem. to rove that loglog for all real 3. This is a versio of Theorem. with the iteger N relaced by the real. Hit Give 3 let N = [], the largest iteger. The, imortatly,
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 informationECE534, Spring 2018: Final Exam
ECE534, Srig 2018: Fial Exam Problem 1 Let X N (0, 1) ad Y N (0, 1) be ideedet radom variables. variables V = X + Y ad W = X 2Y. Defie the radom (a) Are V, W joitly Gaussia? Justify your aswer. (b) Comute
More informationMath 155 (Lecture 3)
Math 55 (Lecture 3) September 8, I this lecture, we ll cosider the aswer to oe of the most basic coutig problems i combiatorics Questio How may ways are there to choose a -elemet subset of the set {,,,
More informationParallel Programming: Speedups and Amdahl s law
Parallel Programmig: Seedus ad Amdahl s law Mike Bailey mjb@cs.oregostate.edu Orego State Uiversity Orego State Uiversity Comuter Grahics seedus.ad.amdahls.law.tx Defiitio of Seedu 2 If you are usig rocessors,
More information6 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( ) = is larger than. the variance of X V
Stat 400, sectio 6. Methods of Poit Estimatio otes by Tim Pilachoski A oit estimate of a arameter is a sigle umber that ca be regarded as a sesible value for The selected statistic is called the oit estimator
More informationFeedback in Iterative Algorithms
Feedback i Iterative Algorithms Charles Byre (Charles Byre@uml.edu), Departmet of Mathematical Scieces, Uiversity of Massachusetts Lowell, Lowell, MA 01854 October 17, 2005 Abstract Whe the oegative system
More informationLecture 2: Uncomputability and the Haling Problem
CSE 200 Computability ad Complexity Wedesday, April 3, 2013 Lecture 2: Ucomputability ad the Halig Problem Istructor: Professor Shachar Lovett Scribe: Dogcai She 1 The Uiversal Turig Machie I the last
More informationRound-off Errors and Computer Arithmetic - (1.2)
Roud-off Errors ad Comuter Arithmetic - (1.) 1. Roud-off Errors: Roud-off errors is roduced whe a calculator or comuter is used to erform real umber calculatios. That is because the arithmetic erformed
More informationCIS 121 Data Structures and Algorithms with Java Spring Code Snippets and Recurrences Monday, February 4/Tuesday, February 5
CIS 11 Data Structures ad Algorithms with Java Sprig 019 Code Sippets ad Recurreces Moday, February 4/Tuesday, February 5 Learig Goals Practice provig asymptotic bouds with code sippets Practice solvig
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 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 informationn 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[ 47 ] then T ( m ) is true for all n a. 2. The greatest integer function : [ ] is defined by selling [ x]
[ 47 ] Number System 1. Itroductio Pricile : Let { T ( ) : N} be a set of statemets, oe for each atural umber. If (i), T ( a ) is true for some a N ad (ii) T ( k ) is true imlies T ( k 1) is true for all
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 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 informationHOMEWORK #10 SOLUTIONS
Math 33 - Aalysis I Sprig 29 HOMEWORK # SOLUTIONS () Prove that the fuctio f(x) = x 3 is (Riema) itegrable o [, ] ad show that x 3 dx = 4. (Without usig formulae for itegratio that you leart i previous
More informationMachine Learning for Data Science (CS 4786)
Machie Learig for Data Sciece CS 4786) Lecture & 3: Pricipal Compoet Aalysis The text i black outlies high level ideas. The text i blue provides simple mathematical details to derive or get to the algorithm
More informationBertrand 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 informationA Note on Bilharz s Example Regarding Nonexistence of Natural Density
Iteratioal Mathematical Forum, Vol. 7, 0, o. 38, 877-884 A Note o Bilharz s Examle Regardig Noexistece of Natural Desity Cherg-tiao Perg Deartmet of Mathematics Norfolk State Uiversity 700 Park Aveue,
More informationLecture 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 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 informationCHAPTER I: Vector Spaces
CHAPTER I: Vector Spaces Sectio 1: Itroductio ad Examples This first chapter is largely a review of topics you probably saw i your liear algebra course. So why cover it? (1) Not everyoe remembers everythig
More informationThe Growth of Functions. Theoretical Supplement
The Growth of Fuctios Theoretical Supplemet The Triagle Iequality The triagle iequality is a algebraic tool that is ofte useful i maipulatig absolute values of fuctios. The triagle iequality says that
More informationDiscrete 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 informationDimension of a Maximum Volume
Dimesio of a Maximum Volume Robert Kreczer Deartmet of Mathematics ad Comutig Uiversity of Wiscosi-Steves Poit Steves Poit, WI 54481 Phoe: (715) 346-3754 Email: rkrecze@uwsmail.uws.edu 1. INTRODUCTION.
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 informationHashing 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 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 informationSquare-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 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 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 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 11: Hash Functions and Random Oracle Model
CS 7810 Foudatios of Cryptography October 16, 017 Lecture 11: Hash Fuctios ad Radom Oracle Model Lecturer: Daiel Wichs Scribe: Akshar Varma 1 Topic Covered Defiitio of Hash Fuctios Merkle-Damgaård Theorem
More informationRegenerative Property
DESIGN OF LOGIC FAMILIES Some desirable characteristics to have: 1. Low ower dissiatio. High oise margi (Equal high ad low margis) 3. High seed 4. Low area 5. Low outut resistace 6. High iut resistace
More informationIP Reference guide for integer programming formulations.
IP Referece guide for iteger programmig formulatios. by James B. Orli for 15.053 ad 15.058 This documet is iteded as a compact (or relatively compact) guide to the formulatio of iteger programs. For more
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 information3.1. Introduction Assumptions.
Sectio 3. Proofs 3.1. Itroductio. A roof is a carefully reasoed argumet which establishes that a give statemet is true. Logic is a tool for the aalysis of roofs. Each statemet withi a roof is a assumtio,
More informationLecture 7: Density Estimation: k-nearest Neighbor and Basis Approach
STAT 425: Itroductio to Noparametric Statistics Witer 28 Lecture 7: Desity Estimatio: k-nearest Neighbor ad Basis Approach Istructor: Ye-Chi Che Referece: Sectio 8.4 of All of Noparametric Statistics.
More informationRecitation 4: Lagrange Multipliers and Integration
Math 1c TA: Padraic Bartlett Recitatio 4: Lagrage Multipliers ad Itegratio Week 4 Caltech 211 1 Radom Questio Hey! So, this radom questio is pretty tightly tied to today s lecture ad the cocept of cotet
More informationPutnam Training Exercise Counting, Probability, Pigeonhole Principle (Answers)
Putam Traiig Exercise Coutig, Probability, Pigeohole Pricile (Aswers) November 24th, 2015 1. Fid the umber of iteger o-egative solutios to the followig Diohatie equatio: x 1 + x 2 + x 3 + x 4 + x 5 = 17.
More informationThe Blood Testing Problem
Teachig Cotemorary Mathematics Coferece Feb 6-7, 00 The Blood Testig Problem Suose that you have a large oulatio that you wish to test for a certai characteristic i their blood or urie (for examle, testig
More informationDiscrete 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 informationSequences. Notation. Convergence of a Sequence
Sequeces A sequece is essetially just a list. Defiitio (Sequece of Real Numbers). A sequece of real umbers is a fuctio Z (, ) R for some real umber. Do t let the descriptio of the domai cofuse you; it
More informationNotes on the prime number theorem
Notes o the rime umber theorem Keji Kozai May 2, 24 Statemet We begi with a defiitio. Defiitio.. We say that f(x) ad g(x) are asymtotic as x, writte f g, if lim x f(x) g(x) =. The rime umber theorem tells
More informationProposition 2.1. There are an infinite number of primes of the form p = 4n 1. Proof. Suppose there are only a finite number of such primes, say
Chater 2 Euclid s Theorem Theorem 2.. There are a ifiity of rimes. This is sometimes called Euclid s Secod Theorem, what we have called Euclid s Lemma beig kow as Euclid s First Theorem. Proof. Suose to
More informationNew Definition of Density on Knapsack Cryptosystems
Africacryt008@Casablaca 008.06.1 New Defiitio of Desity o Kasac Crytosystems Noboru Kuihiro The Uiversity of Toyo, Jaa 1/31 Kasac Scheme rough idea Public Key: asac: a={a 1, a,, a } Ecrytio: message m=m
More informationLast time, we talked about how Equation (1) can simulate Equation (2). We asserted that Equation (2) can also simulate Equation (1).
6896 Quatum Complexity Theory Sept 23, 2008 Lecturer: Scott Aaroso Lecture 6 Last Time: Quatum Error-Correctio Quatum Query Model Deutsch-Jozsa Algorithm (Computes x y i oe query) Today: Berstei-Vazirii
More informationLecture 9: Expanders Part 2, Extractors
Lecture 9: Expaders Part, Extractors Topics i Complexity Theory ad Pseudoradomess Sprig 013 Rutgers Uiversity Swastik Kopparty Scribes: Jaso Perry, Joh Kim I this lecture, we will discuss further the pseudoradomess
More informationLecture 2: Monte Carlo Simulation
STAT/Q SCI 43: Itroductio to Resamplig ethods Sprig 27 Istructor: Ye-Chi Che Lecture 2: ote Carlo Simulatio 2 ote Carlo Itegratio Assume we wat to evaluate the followig itegratio: e x3 dx What ca we do?
More information5.1 Review of Singular Value Decomposition (SVD)
MGMT 69000: Topics i High-dimesioal Data Aalysis Falll 06 Lecture 5: Spectral Clusterig: Overview (cotd) ad Aalysis Lecturer: Jiamig Xu Scribe: Adarsh Barik, Taotao He, September 3, 06 Outlie Review of
More informationMachine Learning Theory Tübingen University, WS 2016/2017 Lecture 12
Machie Learig Theory Tübige Uiversity, WS 06/07 Lecture Tolstikhi Ilya Abstract I this lecture we derive risk bouds for kerel methods. We will start by showig that Soft Margi kerel SVM correspods to miimizig
More informationClassification of DT signals
Comlex exoetial A discrete time sigal may be comlex valued I digital commuicatios comlex sigals arise aturally A comlex sigal may be rereseted i two forms: jarg { z( ) } { } z ( ) = Re { z ( )} + jim {
More informationSolutions to Problem Set 7
8.78 Solutios to Problem Set 7. If the umber is i S, we re doe sice it s relatively rime to everythig. So suose S. Break u the remaiig elemets ito airs {, }, {4, 5},..., {, + }. By the Pigeohole Pricile,
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 informationLecture 10 October Minimaxity and least favorable prior sequences
STATS 300A: Theory of Statistics Fall 205 Lecture 0 October 22 Lecturer: Lester Mackey Scribe: Brya He, Rahul Makhijai Warig: These otes may cotai factual ad/or typographic errors. 0. Miimaxity ad least
More informationLesson 10: Limits and Continuity
www.scimsacademy.com Lesso 10: Limits ad Cotiuity SCIMS Academy 1 Limit of a fuctio The cocept of limit of a fuctio is cetral to all other cocepts i calculus (like cotiuity, derivative, defiite itegrals
More informationFinal Solutions. 1. (25pts) Define the following terms. Be as precise as you can.
Mathematics H104 A. Ogus Fall, 004 Fial Solutios 1. (5ts) Defie the followig terms. Be as recise as you ca. (a) (3ts) A ucoutable set. A ucoutable set is a set which ca ot be ut ito bijectio with a fiite
More informationProblem 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 informationCS: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 information1. By using truth tables prove that, for all statements P and Q, the statement
Author: Satiago Salazar Problems I: Mathematical Statemets ad Proofs. By usig truth tables prove that, for all statemets P ad Q, the statemet P Q ad its cotrapositive ot Q (ot P) are equivalet. I example.2.3
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 informationACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Statistics
ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER 1 018/019 DR. ANTHONY BROWN 8. Statistics 8.1. Measures of Cetre: Mea, Media ad Mode. If we have a series of umbers the
More informationPUTNAM TRAINING PROBABILITY
PUTNAM TRAINING PROBABILITY (Last udated: December, 207) Remark. This is a list of exercises o robability. Miguel A. Lerma Exercises. Prove that the umber of subsets of {, 2,..., } with odd cardiality
More informationLecture Notes for Analysis Class
Lecture Notes for Aalysis Class Topological Spaces A topology for a set X is a collectio T of subsets of X such that: (a) X ad the empty set are i T (b) Uios of elemets of T are i T (c) Fiite itersectios
More informationb i u x i U a i j u x i u x j
M ath 5 2 7 Fall 2 0 0 9 L ecture 1 9 N ov. 1 6, 2 0 0 9 ) S ecod- Order Elliptic Equatios: Weak S olutios 1. Defiitios. I this ad the followig two lectures we will study the boudary value problem Here
More informationWeil Conjecture I. Yichao Tian. Morningside Center of Mathematics, AMSS, CAS
Weil Cojecture I Yichao Tia Morigside Ceter of Mathematics, AMSS, CAS [This is the sketch of otes of the lecture Weil Cojecture I give by Yichao Tia at MSC, Tsighua Uiversity, o August 4th, 20. Yuaqig
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 informationSeunghee Ye Ma 8: Week 5 Oct 28
Week 5 Summary I Sectio, we go over the Mea Value Theorem ad its applicatios. I Sectio 2, we will recap what we have covered so far this term. Topics Page Mea Value Theorem. Applicatios of the Mea Value
More informationMath 299 Supplement: Real Analysis Nov 2013
Math 299 Supplemet: Real Aalysis Nov 203 Algebra Axioms. I Real Aalysis, we work withi the axiomatic system of real umbers: the set R alog with the additio ad multiplicatio operatios +,, ad the iequality
More information