CS145: Probability & Computing Lecture 24: Algorithms
|
|
- Georgiana Short
- 5 years ago
- Views:
Transcription
1 CS145: Probability & Computing Lecture 24: Algorithms Instructor: Eli Upfal Brown University Computer Science Figure credits: Bertsekas & Tsitsiklis, Introduction to Probability, 2008 Pitman, Probability, 1999
2 <latexit sha1_base64="q/vneicisbvrmk3zpp1c6refdbq=">aaaclhicbvdlsgmxfm34rpvvdekm2bhaztdtjw6eykfcvrcdls5qmmmmdc08sdjcgead3pgrgriwifu/w3raobyecdk5515u7vfirou0zam2sbm1vbnb2cvuhxwehzdottsisjgmlryxihc8jaijiwljkhnpxjygwgpe9sanmw8/es5ofd7ksuzcaa1d6lompjl6pyau391uog5oyuh4ikd2bvnht6pufmnlr5v9inyutqugyeh6v1q2dtmhxcfwgptbas1+6c0zrdgjscgxq0l0ldowboq4pjirrogkgsqij9gq9bqnuucem+blzvbskqpor1ydumjcxe5iusdejpbuzydkskx6m/e/r5di/9pnargnkor4pshpgjqrncuhb5qtlnleeyq5vx+feiq4wlllw1qhwksrr5n2zbauf6iv67eloarghfyacrdafaide9aelydbm3gfh2cqvwjv2qf2ns/d0by9z+apto8fnm+khw==</latexit> <latexit sha1_base64="q/vneicisbvrmk3zpp1c6refdbq=">aaaclhicbvdlsgmxfm34rpvvdekm2bhaztdtjw6eykfcvrcdls5qmmmmdc08sdjcgead3pgrgriwifu/w3raobyecdk5515u7vfirou0zam2sbm1vbnb2cvuhxwehzdottsisjgmlryxihc8jaijiwljkhnpxjygwgpe9sanmw8/es5ofd7ksuzcaa1d6lompjl6pyau391uog5oyuh4ikd2bvnht6pufmnlr5v9inyutqugyeh6v1q2dtmhxcfwgptbas1+6c0zrdgjscgxq0l0ldowboq4pjirrogkgsqij9gq9bqnuucem+blzvbskqpor1ydumjcxe5iusdejpbuzydkskx6m/e/r5di/9pnargnkor4pshpgjqrncuhb5qtlnleeyq5vx+feiq4wlllw1qhwksrr5n2zbauf6iv67eloarghfyacrdafaide9aelydbm3gfh2cqvwjv2qf2ns/d0by9z+apto8fnm+khw==</latexit> <latexit sha1_base64="q/vneicisbvrmk3zpp1c6refdbq=">aaaclhicbvdlsgmxfm34rpvvdekm2bhaztdtjw6eykfcvrcdls5qmmmmdc08sdjcgead3pgrgriwifu/w3raobyecdk5515u7vfirou0zam2sbm1vbnb2cvuhxwehzdottsisjgmlryxihc8jaijiwljkhnpxjygwgpe9sanmw8/es5ofd7ksuzcaa1d6lompjl6pyau391uog5oyuh4ikd2bvnht6pufmnlr5v9inyutqugyeh6v1q2dtmhxcfwgptbas1+6c0zrdgjscgxq0l0ldowboq4pjirrogkgsqij9gq9bqnuucem+blzvbskqpor1ydumjcxe5iusdejpbuzydkskx6m/e/r5di/9pnargnkor4pshpgjqrncuhb5qtlnleeyq5vx+feiq4wlllw1qhwksrr5n2zbauf6iv67eloarghfyacrdafaide9aelydbm3gfh2cqvwjv2qf2ns/d0by9z+apto8fnm+khw==</latexit> <latexit sha1_base64="q/vneicisbvrmk3zpp1c6refdbq=">aaaclhicbvdlsgmxfm34rpvvdekm2bhaztdtjw6eykfcvrcdls5qmmmmdc08sdjcgead3pgrgriwifu/w3raobyecdk5515u7vfirou0zam2sbm1vbnb2cvuhxwehzdottsisjgmlryxihc8jaijiwljkhnpxjygwgpe9sanmw8/es5ofd7ksuzcaa1d6lompjl6pyau391uog5oyuh4ikd2bvnht6pufmnlr5v9inyutqugyeh6v1q2dtmhxcfwgptbas1+6c0zrdgjscgxq0l0ldowboq4pjirrogkgsqij9gq9bqnuucem+blzvbskqpor1ydumjcxe5iusdejpbuzydkskx6m/e/r5di/9pnargnkor4pshpgjqrncuhb5qtlnleeyq5vx+feiq4wlllw1qhwksrr5n2zbauf6iv67eloarghfyacrdafaide9aelydbm3gfh2cqvwjv2qf2ns/d0by9z+apto8fnm+khw==</latexit> 2-SAT Algorithm Boolean formula in Conjunctive Normal Form (CNF): F =(X [ W [ Y ) \ (X [ Ȳ ) \ (W [ V )... Variables get values in {True, False} Problem: Given a formula with up to two variables per clause, find a Boolean assignment that satisfies all clauses.
3 2-SAT Algorithm Algorithm: 1. Start with an arbitrary assignment. 2. Repeat till all clauses are satisfied: 1. Pick an unsatisfied clause. 2. If the clause has one variable change the value of that variable. 3. If the clause has two variables, choose one uniformly at random and change its value. What the is the expected run-time of this algorithm?
4 Analysis of the 2-SAT Algorithm Theorem: Assuming that the formula has a satisfying assignment, the expected run-time to find that assignment is O(n 2 ). W.l.o.g. assume that all clause have two variables. Fix one satisfying assignment. Let n be the number of variable in the formula. X j = number of variables that match the satisfying assignment at time j D t = the expected number of steps to termination when t variables match the satisfying assignment.
5 Analysis of the 2-SAT Algorithm X j = number of variables that match the satisfying assignment at time j. Algorithm: Pick an unsatisfied clause and change the value of one its two variables, chosen at random. Pr(X j = 1 X j-1 =0) =1 Pr(X j = t X j-1 = t-1) 1/2 1 $ % 1 W.l.og. we assume Pr(X j = t X j-1 = t-1) = 1/2
6 Analysis of the 2-SAT Algorithm D t = the expected number of steps to termination when t variables matched the satisfying assignment. D n = 0 D t = 1+ ½ (D t+1 + D t-1 ) 1 " # 1 D 0 = 1+ D 1
7 Analysis of the 2-SAT Algorithm D t = the expected number of steps to termination when t variables matched the satisfying assignment. D n = 0 D t = 1+ ½ (D t+1 + D t-1 ) 1 " # 1 D 0 = 1+ D 1 Guess and verify: D t = n 2 - t 2 Theorem: Assuming that the formula has a satisfying assignment, the expected run-time to find that assignment is O(n 2 ).
8 Analysis of the 2-SAT Algorithm Theorem: Assuming that the formula has a satisfying assignment, the expected run-time to find that assignment is O(n 2 ). Theorem: There is a one-sides error randomized algorithm for the 2- SAT problem that terminates in O(n 2 log n) time, and with high probability returns an assignment when the formula is satisfiable, and always returns ``UNSATISFIABLE'' when no assignment exists. Proof: Repeat the algorithm until finds a satisfying assignment or up to log n times. In each repeat, run the algorithm 2n 2 steps. The probability that the algorithm does not find an assignment, when exists, in one round of 2n 2 steps is bounded by ½. The probability that the algorithm does not find an assignment, when exists, in log n one round is bounded by 1/n.
9 Probability and Algorithms Classical Algorithm Analysis Ø Algorithm: A function that uses a deterministic sequence of operations to produce a unique output for any valid input Ø Complexity analysis: determine the largest number of operations over all possible inputs of some size (worst case) Randomized Algorithms Ø Pseudo-random numbers are used in algorithm operations Ø Las Vegas algorithm: Gives correct result with random run-time Ø Monte Carlo algorithm: distribution on the correction of the result. Probabilistic Algorithm Analysis Ø Given a random input, what is the expected running time? Ø Given a random input, what is the CDF of running times? Ø Input distribution could be uniform, or informed by application sortvis.org
10 A Randomized Quicksort Procedure Q S(S); Input: AsetS. Output: The set S in sorted order. 1 Choose a random element y uniformly from S. 2 Compare all elements of S to y. Let S 1 = {x 2 S {y} x apple y}, S 2 = {x 2 S {y} x > y}. 3 Return the list: Q S(S 1 ), y, Q S(S 2 ).
11 What is the Expected Running Time? Let s 1,...,s n be the elements of S is sorted order. For i =1,...,n, andj > i, define 0-1 random variable X i,j,s.t. X i,j =1i s i is compared to s j in the run of the algorithm, else X i,j =0. The number of comparisons in running the algorithm is T = nx X X i,j. i=1 j>i We are interested in E[T ]= X j>i E[X i,j ]= X j>i Pr(X i,j = 1). Theorem E[T ] = O(n log n).
12 What is the Expected Running Time? Let s 1,...,s n be the elements of S is sorted order. For i =1,...,n, andj > i, define 0-1 random variable X i,j,s.t. X i,j =1i s i is compared to s j in the run of the algorithm, else X i,j =0. The number of comparisons in running the algorithm is T = nx X X i,j. i=1 j>i We are interested in E[T ].
13 What is the Expected Running Time? What is the probability that X i,j =1? s i is compared to s j i either s i or s j is chosen as a split item before any of the j i 1 elements between s i and s j are chosen. Elements are chosen uniformly at random! elements in the set [s i, s i+1,...,s j ] are chosen uniformly at random. E[X i,j ]=Pr(X i,j = X1) X= 2 X X j i +1. X X E[T ] = E[ nx X X X i,j ]= i=1 j>i X X n nx X X E[X i,j ]= i=1 j>i nx X i=1 nx 2 X k apple 2nH n = n log n + O(n). k=1 j>i j 2 i +1 apple H n = P n k=1 1 k
14 Deterministic QuickSort Procedure DQ S(S); Input: AsetS. Output: The set S in sorted order. 1 Let y be the first element in S. 2 Compare all elements of S to y. Let S 1 = {x 2 S {y} x apple y}, S 2 = {x 2 S {y} x > y}. (Elements is S 1 and S 2 are in th same order as in S.) 3 Return the list: DQ S(S 1 ), y, DQ S(S 2 ).
15 Probabilistic Analysis of Deterministic Q_S Theorem The expected run time of DQ S on a random input, uniformly chosen from all possible permutation of S is O(n log n). Proof. Set X i,j as before. If all permutations have equal probability, all permutations of S i,...,s j have equal probability, thus Pr(X i,j )= 2 j i +1. nx X E[ X i,j ]=O(nlog n). i=1 j>i
16 Random Number Functions Ø Assumption: We have a source of independent random variables which follow a continuous uniform distribution on [0,1]: U 1,U 2,U 3,... Ø In Matlab, the rand function provides this f U (u i ) Coming later: Methods for generating uniform variables
17 Discrete Random Number Generation Ø Input: Independent uniform variables U 1,U 2,U 3,... Ø We can use these to exactly sample from any discrete distribution using the cumulative distribution function: F X (x) =P (X apple x) = X kapplex p X (k) F X (x) Ø Define the inverse of this discrete CDF: h(u) =min{x F X (x) u} X i = h(u i ) p X (x) P (X i = k) =P (F X (k 1) <U i apple F X (k)) = F X (k) F X (k 1) = p X (k) This function transforms uniform variables to our target distribution!
18 Continuous Random Number Generation Ø Input: Independent uniform variables U 1,U 2,U 3,... Ø We can use these to exactly sample from any continuous distribution using the cumulative distribution function: F X (x) =P (X apple x) = Ø Assuming continuous CDF is invertible: h(u) =F 1 X (u) X i = h(u i ) Z x 1 f X (z) dz 1 0 f X (x) P (X i apple x) =P (h(u i ) apple x) =P (U i apple F X (x)) = F X (x) This function transforms uniform variables to our target distribution! p(y) y Fh(y) X (x)
19 Uniform Random Number Generation Ø Assumption: We have a source of independent f U (u i ) random variables which follow a continuous uniform distribution on [0,1] : U 1,U 2,U 3,... Ø In Matlab, the rand function provides this Ø Chaotic dynamical systems are used to generate sequences of pseudo-random numbers whose distribution is approximately uniform on [0,1] Ø Simplest examples are linear congruential generators, but try to use more sophisticated methods! ū i+1 =(aū i + c) modm u i = 1 mūi c and m should be relatively prime and large (plus more).
20 Examples of Uniform Generators Linear Congruential Generator ū i+1 =(aū i + c) modm The seed determines starting point. Wikipedia RANDU: A catastrophically bad random number generator that was fairly widely used in the 1970 s ū i+1 = ū i mod 2 31 u i =2 31 ū i Constants picked for ease of hardware implementation, BUT Strong correlations among triples of values
21 Examples of Uniform Generators Mersenne Twister: Used by Matlab rand, period of Pseudo-random sequence looks nearly random. Don t try this at home!
22 Symmetry Breaking Ethernet Communication: A message is received by all nodes. Only one message per step. If two messages are sent - no message is received. Nodes detect collision No central scheduling protocol.
23 Contention Resolution Protocol Assume n nodes on the Ethernet In each step that a node has a message in its queue it ties to send it with probability 1/n (independent of other nodes). Probability of a collision in each step is (1-1/n) n-1 " -1 Expected number of steps till a node successfully sends it message O(n) Equivalently: each node waits a number of steps distributed U[0,n-1] Very wasteful if only a few nodes have messages to send!
24 Bakeoff Protocol Each node protocol: 1. i 0 2. While queue is not empty 1. Wait a random number of steps in [1,..,2 i ] 2. Try to send a message 3. If a collusion detected " " + 1 Analysis: Assume that m nodes have non-empty queues After log m steps all nodes with non-empty queues have i= log m The expected wait of a message at the head of each queue in O(m) The bakeoff protocol optimize to the actual load on the channel.
25 Verifying Matrix Multiplication Given three n n matrices A, B, andc in a Boolean field, we want to verify AB = C. Standard method: Matrix multiplication - takes (n 3 ) ( (n 2.37 )) operations. Randomized algorithm: 1 Chooses a random vector r =(r 1, r 2,...,r n ) 2 {0, 1} n. 2 Compute B r; 3 Compute A(B r); 4 Computes C r; 5 If A(B r) 6= C r return AB 6= C, elsereturnab = C. The algorithm takes (n 2 ) time.
26 Verifying Matrix Multiplication Randomized algorithm: 1 Chooses a random vector r =(r 1, r 2,...,r n ) 2 {0, 1} n. 2 Compute B r; 3 Compute A(B r); 4 Computes C r; 5 If A(B r) 6= C r return AB 6= C, elsereturnab = C. The algorithm takes (n 2 ) time. The algorithm takes (n ) time. Theorem If AB 6= C, and r is chosen uniformly at random from {0, 1} n,then Pr(AB r = C r) apple 1 2.
27 Verifying Matrix Multiplication The algorithm takes (n ) time. Theorem If AB 6= C, and r is chosen uniformly at random from {0, 1} n,then Pr(AB r = C r) apple 1 2. Let D = AB C 6= 0. AB r = C r implies that D r =0. Since D 6= 0it has some non-zero entry; assume d 11. nx For D r =0,itmustbethecasethat or equivalently X r 1 = X j=1 P n j=2 d 1jr j d 11. d 1j r j = 0, P
28 Verifying Matrix Multiplication The algorithm takes (n ) time. Theorem If AB 6= C, and r is chosen uniformly at random from {0, 1} n,then Pr(AB r = C r) apple 1 2. Let D = AB C 6= 0. AB r = C r implies thatxd r =0. Since D 6= 0it has some non-zero entry; assume d 11. For D r =0,itmustbethecasethat or equivalently X r 1 = nx d 1j r j = 0, j=1 P n j=2 d 1jr j P. d 11 For fixed r 2,...,r n. there is only one value of r 1 that satisfies the equality.
Introduction to Randomized Algorithms: Quick Sort and Quick Selection
Chapter 14 Introduction to Randomized Algorithms: Quick Sort and Quick Selection CS 473: Fundamental Algorithms, Spring 2011 March 10, 2011 14.1 Introduction to Randomized Algorithms 14.2 Introduction
More informationLecture Notes CS:5360 Randomized Algorithms Lecture 20 and 21: Nov 6th and 8th, 2018 Scribe: Qianhang Sun
1 Probabilistic Method Lecture Notes CS:5360 Randomized Algorithms Lecture 20 and 21: Nov 6th and 8th, 2018 Scribe: Qianhang Sun Turning the MaxCut proof into an algorithm. { Las Vegas Algorithm Algorithm
More informationRandomized algorithms. Inge Li Gørtz
Randomized algorithms Inge Li Gørtz Randomized algorithms Today What are randomized algorithms? Properties of randomized algorithms Two examples: Median/Select. Quick-sort Randomized Algorithms Randomized
More informationRandomized Algorithms Multiple Choice Test
4435 Randomized Algorithms Multiple Choice Test Sample test: only 8 questions 24 minutes (Real test has 30 questions 90 minutes) Årskort Name Each of the following 8 questions has 4 possible answers of
More informationSimulation. Where real stuff starts
Simulation Where real stuff starts March 2019 1 ToC 1. What is a simulation? 2. Accuracy of output 3. Random Number Generators 4. How to sample 5. Monte Carlo 6. Bootstrap 2 1. What is a simulation? 3
More informationECE Homework Set 2
1 Solve these problems after Lecture #4: Homework Set 2 1. Two dice are tossed; let X be the sum of the numbers appearing. a. Graph the CDF, FX(x), and the pdf, fx(x). b. Use the CDF to find: Pr(7 X 9).
More information14 Random Variables and Simulation
14 Random Variables and Simulation In this lecture note we consider the relationship between random variables and simulation models. Random variables play two important roles in simulation models. We assume
More informationSecond main application of Chernoff: analysis of load balancing. Already saw balls in bins example. oblivious algorithms only consider self packet.
Routing Second main application of Chernoff: analysis of load balancing. Already saw balls in bins example synchronous message passing bidirectional links, one message per step queues on links permutation
More informationSimulation. Where real stuff starts
1 Simulation Where real stuff starts ToC 1. What is a simulation? 2. Accuracy of output 3. Random Number Generators 4. How to sample 5. Monte Carlo 6. Bootstrap 2 1. What is a simulation? 3 What is a simulation?
More informationExpectation of geometric distribution
Expectation of geometric distribution What is the probability that X is finite? Can now compute E(X): Σ k=1f X (k) = Σ k=1(1 p) k 1 p = pσ j=0(1 p) j = p 1 1 (1 p) = 1 E(X) = Σ k=1k (1 p) k 1 p = p [ Σ
More informationCS 125 Section #12 (More) Probability and Randomized Algorithms 11/24/14. For random numbers X which only take on nonnegative integer values, E(X) =
CS 125 Section #12 (More) Probability and Randomized Algorithms 11/24/14 1 Probability First, recall a couple useful facts from last time about probability: Linearity of expectation: E(aX + by ) = ae(x)
More informationCS155: Probability and Computing: Randomized Algorithms and Probabilistic Analysis
CS155: Probability and Computing: Randomized Algorithms and Probabilistic Analysis Eli Upfal Eli Upfal@brown.edu Office: 319 TA s: Lorenzo De Stefani and Sorin Vatasoiu cs155tas@cs.brown.edu It is remarkable
More informationCS Introduction to Complexity Theory. Lecture #11: Dec 8th, 2015
CS 2401 - Introduction to Complexity Theory Lecture #11: Dec 8th, 2015 Lecturer: Toniann Pitassi Scribe Notes by: Xu Zhao 1 Communication Complexity Applications Communication Complexity (CC) has many
More informationCS145: Probability & Computing Lecture 11: Derived Distributions, Functions of Random Variables
CS145: Probability & Computing Lecture 11: Derived Distributions, Functions of Random Variables Instructor: Erik Sudderth Brown University Computer Science March 5, 2015 Homework Submissions Electronic
More informationUniversity of New Mexico Department of Computer Science. Final Examination. CS 561 Data Structures and Algorithms Fall, 2013
University of New Mexico Department of Computer Science Final Examination CS 561 Data Structures and Algorithms Fall, 2013 Name: Email: This exam lasts 2 hours. It is closed book and closed notes wing
More informationSFM-11:CONNECT Summer School, Bertinoro, June 2011
SFM-:CONNECT Summer School, Bertinoro, June 20 EU-FP7: CONNECT LSCITS/PSS VERIWARE Part 3 Markov decision processes Overview Lectures and 2: Introduction 2 Discrete-time Markov chains 3 Markov decision
More informationRandom Number Generation. CS1538: Introduction to simulations
Random Number Generation CS1538: Introduction to simulations Random Numbers Stochastic simulations require random data True random data cannot come from an algorithm We must obtain it from some process
More informationCS 580: Algorithm Design and Analysis
CS 580: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 2018 Announcements: Homework 6 deadline extended to April 24 th at 11:59 PM Course Evaluation Survey: Live until 4/29/2018
More informationExpectation of geometric distribution. Variance and Standard Deviation. Variance: Examples
Expectation of geometric distribution Variance and Standard Deviation What is the probability that X is finite? Can now compute E(X): Σ k=f X (k) = Σ k=( p) k p = pσ j=0( p) j = p ( p) = E(X) = Σ k=k (
More informationNon-Interactive Zero Knowledge (II)
Non-Interactive Zero Knowledge (II) CS 601.442/642 Modern Cryptography Fall 2017 S 601.442/642 Modern CryptographyNon-Interactive Zero Knowledge (II) Fall 2017 1 / 18 NIZKs for NP: Roadmap Last-time: Transformation
More informationCS145: Probability & Computing
CS45: Probability & Computing Lecture 5: Concentration Inequalities, Law of Large Numbers, Central Limit Theorem Instructor: Eli Upfal Brown University Computer Science Figure credits: Bertsekas & Tsitsiklis,
More informationNP Completeness and Approximation Algorithms
Chapter 10 NP Completeness and Approximation Algorithms Let C() be a class of problems defined by some property. We are interested in characterizing the hardest problems in the class, so that if we can
More informationLecture 10 Oct. 3, 2017
CS 388R: Randomized Algorithms Fall 2017 Lecture 10 Oct. 3, 2017 Prof. Eric Price Scribe: Jianwei Chen, Josh Vekhter NOTE: THESE NOTES HAVE NOT BEEN EDITED OR CHECKED FOR CORRECTNESS 1 Overview In the
More informationThe Probabilistic Method
The Probabilistic Method Janabel Xia and Tejas Gopalakrishna MIT PRIMES Reading Group, mentors Gwen McKinley and Jake Wellens December 7th, 2018 Janabel Xia and Tejas Gopalakrishna Probabilistic Method
More information( ) ( ) Monte Carlo Methods Interested in. E f X = f x d x. Examples:
Monte Carlo Methods Interested in Examples: µ E f X = f x d x Type I error rate of a hypothesis test Mean width of a confidence interval procedure Evaluating a likelihood Finding posterior mean and variance
More informationAlgorithms, CSE, OSU Quicksort. Instructor: Anastasios Sidiropoulos
6331 - Algorithms, CSE, OSU Quicksort Instructor: Anastasios Sidiropoulos Sorting Given an array of integers A[1... n], rearrange its elements so that A[1] A[2]... A[n]. Quicksort Quicksort(A, p, r) if
More informationProbabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford
Probabilistic Model Checking Michaelmas Term 20 Dr. Dave Parker Department of Computer Science University of Oxford Overview PCTL for MDPs syntax, semantics, examples PCTL model checking next, bounded
More informationCS151 Complexity Theory. Lecture 13 May 15, 2017
CS151 Complexity Theory Lecture 13 May 15, 2017 Relationship to other classes To compare to classes of decision problems, usually consider P #P which is a decision class easy: NP, conp P #P easy: P #P
More informationIntroduction to Interactive Proofs & The Sumcheck Protocol
CS294: Probabilistically Checkable and Interactive Proofs January 19, 2017 Introduction to Interactive Proofs & The Sumcheck Protocol Instructor: Alessandro Chiesa & Igor Shinkar Scribe: Pratyush Mishra
More informationLecture 2: Randomized Algorithms
Lecture 2: Randomized Algorithms Independence & Conditional Probability Random Variables Expectation & Conditional Expectation Law of Total Probability Law of Total Expectation Derandomization Using Conditional
More informationCS145: Probability & Computing
CS45: Probability & Computing Lecture 0: Continuous Bayes Rule, Joint and Marginal Probability Densities Instructor: Eli Upfal Brown University Computer Science Figure credits: Bertsekas & Tsitsiklis,
More information-bit integers are all in ThC. Th The following problems are complete for PSPACE NPSPACE ATIME QSAT, GEOGRAPHY, SUCCINCT REACH.
CMPSCI 601: Recall From Last Time Lecture 26 Theorem: All CFL s are in sac. Facts: ITADD, MULT, ITMULT and DIVISION on -bit integers are all in ThC. Th The following problems are complete for PSPACE NPSPACE
More informationCS 282A/MATH 209A: Foundations of Cryptography Prof. Rafail Ostrosky. Lecture 4
CS 282A/MATH 209A: Foundations of Cryptography Prof. Rafail Ostrosky Lecture 4 Lecture date: January 26, 2005 Scribe: Paul Ray, Mike Welch, Fernando Pereira 1 Private Key Encryption Consider a game between
More information2008 Winton. Review of Statistical Terminology
1 Review of Statistical Terminology 2 Formal Terminology An experiment is a process whose outcome is not known with certainty The experiment s sample space S is the set of all possible outcomes. A random
More informationLecture 5: Two-point Sampling
Randomized Algorithms Lecture 5: Two-point Sampling Sotiris Nikoletseas Professor CEID - ETY Course 2017-2018 Sotiris Nikoletseas, Professor Randomized Algorithms - Lecture 5 1 / 26 Overview A. Pairwise
More informationNotes for Lecture 25
U.C. Berkeley CS276: Cryptography Handout N25 Luca Trevisan April 23, 2009 Notes for Lecture 25 Scribed by Alexandra Constantin, posted May 4, 2009 Summary Today we show that the graph isomorphism protocol
More information2 Random Variable Generation
2 Random Variable Generation Most Monte Carlo computations require, as a starting point, a sequence of i.i.d. random variables with given marginal distribution. We describe here some of the basic methods
More informationLecture 12: Interactive Proofs
princeton university cos 522: computational complexity Lecture 12: Interactive Proofs Lecturer: Sanjeev Arora Scribe:Carl Kingsford Recall the certificate definition of NP. We can think of this characterization
More informationLecture 1: January 16
CS271 Randomness & Computation Spring 2018 Instructor: Alistair Sinclair Lecture 1: January 16 Disclaimer: These notes have not been subjected to the usual scrutiny accorded to formal publications. They
More information1 Maintaining a Dictionary
15-451/651: Design & Analysis of Algorithms February 1, 2016 Lecture #7: Hashing last changed: January 29, 2016 Hashing is a great practical tool, with an interesting and subtle theory too. In addition
More informationLinear Congruences. The equation ax = b for a, b R is uniquely solvable if a 0: x = b/a. Want to extend to the linear congruence:
Linear Congruences The equation ax = b for a, b R is uniquely solvable if a 0: x = b/a. Want to extend to the linear congruence: ax b (mod m), a, b Z, m N +. (1) If x 0 is a solution then so is x k :=
More information13. RANDOMIZED ALGORITHMS
13. RANDOMIZED ALGORITHMS content resolution global min cut linearity of expectation max 3-satisfiability universal hashing Chernoff bounds load balancing Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison
More informationLecture: Analysis of Algorithms (CS )
Lecture: Analysis of Algorithms (CS483-001) Amarda Shehu Spring 2017 1 Outline of Today s Class 2 Choosing Hash Functions Universal Universality Theorem Constructing a Set of Universal Hash Functions Perfect
More informationCOMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning
COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal
More informationNP-Complete Reductions 2
x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 CS 447 11 13 21 23 31 33 Algorithms NP-Complete Reductions 2 Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline NP-Complete
More informationCS5314 Randomized Algorithms. Lecture 15: Balls, Bins, Random Graphs (Hashing)
CS5314 Randomized Algorithms Lecture 15: Balls, Bins, Random Graphs (Hashing) 1 Objectives Study various hashing schemes Apply balls-and-bins model to analyze their performances 2 Chain Hashing Suppose
More informationCPSC 467b: Cryptography and Computer Security
CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 10 February 19, 2013 CPSC 467b, Lecture 10 1/45 Primality Tests Strong primality tests Weak tests of compositeness Reformulation
More informationNP-Complete Problems. More reductions
NP-Complete Problems More reductions Definitions P: problems that can be solved in polynomial time (typically in n, size of input) on a deterministic Turing machine Any normal computer simulates a DTM
More informationCSE 525 Randomized Algorithms & Probabilistic Analysis Spring Lecture 3: April 9
CSE 55 Randomized Algorithms & Probabilistic Analysis Spring 01 Lecture : April 9 Lecturer: Anna Karlin Scribe: Tyler Rigsby & John MacKinnon.1 Kinds of randomization in algorithms So far in our discussion
More informationLecture 19: Interactive Proofs and the PCP Theorem
Lecture 19: Interactive Proofs and the PCP Theorem Valentine Kabanets November 29, 2016 1 Interactive Proofs In this model, we have an all-powerful Prover (with unlimited computational prover) and a polytime
More informationLecture 4. Quicksort
Lecture 4. Quicksort T. H. Cormen, C. E. Leiserson and R. L. Rivest Introduction to Algorithms, 3rd Edition, MIT Press, 2009 Sungkyunkwan University Hyunseung Choo choo@skku.edu Copyright 2000-2018 Networking
More informationMotivation. Dictionaries. Direct Addressing. CSE 680 Prof. Roger Crawfis
Motivation Introduction to Algorithms Hash Tables CSE 680 Prof. Roger Crawfis Arrays provide an indirect way to access a set. Many times we need an association between two sets, or a set of keys and associated
More informationChapter 13. Randomized Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
Chapter 13 Randomized Algorithms Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights reserved. 1 Randomization Algorithmic design patterns. Greedy. Divide-and-conquer. Dynamic programming.
More informationHash Tables. Given a set of possible keys U, such that U = u and a table of m entries, a Hash function h is a
Hash Tables Given a set of possible keys U, such that U = u and a table of m entries, a Hash function h is a mapping from U to M = {1,..., m}. A collision occurs when two hashed elements have h(x) =h(y).
More informationCS 580: Algorithm Design and Analysis
CS 580: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 2018 Reminder: Homework 6 has been released. Chapter 13 Randomized Algorithms Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison
More informationComplexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler
Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard
More informationOutline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.
Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität
More informationEssential facts about NP-completeness:
CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions
More informationChapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013
Chapter 2 Reductions and NP CS 573: Algorithms, Fall 2013 August 29, 2013 2.1 Reductions Continued 2.1.1 The Satisfiability Problem SAT 2.1.1.1 Propositional Formulas Definition 2.1.1. Consider a set of
More informationprinceton univ. F 17 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming
princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Matt Weinberg Scribe: Sanjeev Arora One of the running themes in this course is
More informationCS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018
CS 580: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 2018 Chapter 9 PSPACE: A Class of Problems Beyond NP Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights
More informationLecture 4: Two-point Sampling, Coupon Collector s problem
Randomized Algorithms Lecture 4: Two-point Sampling, Coupon Collector s problem Sotiris Nikoletseas Associate Professor CEID - ETY Course 2013-2014 Sotiris Nikoletseas, Associate Professor Randomized Algorithms
More informationComplexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München
Complexity Theory Jörg Kreiker Chair for Theoretical Computer Science Prof. Esparza TU München Summer term 2010 Lecture 16 IP = PSPACE 3 Goal and Plan Goal IP = PSPACE Plan 1. PSPACE IP by showing QBF
More informationReview of Statistical Terminology
Review of Statistical Terminology An experiment is a process whose outcome is not known with certainty. The experiment s sample space S is the set of all possible outcomes. A random variable is a function
More informationPROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE
Artificial Intelligence, Computational Logic PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE Lecture 4 Metaheuristic Algorithms Sarah Gaggl Dresden, 5th May 2017 Agenda 1 Introduction 2 Constraint
More informationLimits to Approximability: When Algorithms Won't Help You. Note: Contents of today s lecture won t be on the exam
Limits to Approximability: When Algorithms Won't Help You Note: Contents of today s lecture won t be on the exam Outline Limits to Approximability: basic results Detour: Provers, verifiers, and NP Graph
More informationMind the gap Solving optimization problems with a quantum computer
Mind the gap Solving optimization problems with a quantum computer A.P. Young http://physics.ucsc.edu/~peter Work supported by Talk at the London Centre for Nanotechnology, October 17, 2012 Collaborators:
More information2 Evidence that Graph Isomorphism is not NP-complete
Topics in Theoretical Computer Science April 11, 2016 Lecturer: Ola Svensson Lecture 7 (Notes) Scribes: Ola Svensson Disclaimer: These notes were written for the lecturer only and may contain inconsistent
More informationLecture 5: February 21, 2017
COMS 6998: Advanced Complexity Spring 2017 Lecture 5: February 21, 2017 Lecturer: Rocco Servedio Scribe: Diana Yin 1 Introduction 1.1 Last Time 1. Established the exact correspondence between communication
More informationCS 5114: Theory of Algorithms. Tractable Problems. Tractable Problems (cont) Decision Problems. Clifford A. Shaffer. Spring 2014
Department of Computer Science Virginia Tech Blacksburg, Virginia Copyright c 2014 by Clifford A. Shaffer : Theory of Algorithms Title page : Theory of Algorithms Clifford A. Shaffer Spring 2014 Clifford
More informationLecture 10 Algorithmic version of the local lemma
Lecture 10 Algorithmic version of the local lemma Uriel Feige Department of Computer Science and Applied Mathematics The Weizman Institute Rehovot 76100, Israel uriel.feige@weizmann.ac.il June 9, 2014
More informationCSC 373: Algorithm Design and Analysis Lecture 30
CSC 373: Algorithm Design and Analysis Lecture 30 Allan Borodin April 5, 2013 1 / 12 Announcements and Outline Announcements Two misstated questions on term test Grading scheme for term test 3: 1 Test
More informationChapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
Chapter 11 Approximation Algorithms Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights reserved. 1 P and NP P: The family of problems that can be solved quickly in polynomial time.
More informationRandom Variable. Pr(X = a) = Pr(s)
Random Variable Definition A random variable X on a sample space Ω is a real-valued function on Ω; that is, X : Ω R. A discrete random variable is a random variable that takes on only a finite or countably
More informationAdleman Theorem and Sipser Gács Lautemann Theorem. CS422 Computation Theory CS422 Complexity Theory
Adleman Theorem and Sipser Gács Lautemann Theorem CS422 Computation Theory CS422 Complexity Theory Complexity classes, N, co N, SACE, EXTIME, H, R, RE, ALL, Complexity theorists: "Which is contained in
More informationCS261: A Second Course in Algorithms Lecture #18: Five Essential Tools for the Analysis of Randomized Algorithms
CS261: A Second Course in Algorithms Lecture #18: Five Essential Tools for the Analysis of Randomized Algorithms Tim Roughgarden March 3, 2016 1 Preamble In CS109 and CS161, you learned some tricks of
More informationChapter 5 : Randomized computation
Dr. Abhijit Das, Chapter 5 : Randomized computation Probabilistic or randomized computation often provides practical methods to solve certain computational problems. In order to define probabilistic complexity
More informationEEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 19
EEC 686/785 Modeling & Performance Evaluation of Computer Systems Lecture 19 Department of Electrical and Computer Engineering Cleveland State University wenbing@ieee.org (based on Dr. Raj Jain s lecture
More informationPseudo-random Number Generation. Qiuliang Tang
Pseudo-random Number Generation Qiuliang Tang Random Numbers in Cryptography The keystream in the one-time pad The secret key in the DES encryption The prime numbers p, q in the RSA encryption The private
More informationRecap from Last Time
NP-Completeness Recap from Last Time Analyzing NTMs When discussing deterministic TMs, the notion of time complexity is (reasonably) straightforward. Recall: One way of thinking about nondeterminism is
More informationHW11. Due: December 6, 2018
CSCI 1010 Theory of Computation HW11 Due: December 6, 2018 Attach a fully filled-in cover sheet to the front of your printed homework. Your name should not appear anywhere; the cover sheet and each individual
More informationUniform random numbers generators
Uniform random numbers generators Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/tlt-2707/ OUTLINE: The need for random numbers; Basic steps in generation; Uniformly
More informationNumerical methods for lattice field theory
Numerical methods for lattice field theory Mike Peardon Trinity College Dublin August 9, 2007 Mike Peardon (Trinity College Dublin) Numerical methods for lattice field theory August 9, 2007 1 / 37 Numerical
More informationCS 5114: Theory of Algorithms
CS 5114: Theory of Algorithms Clifford A. Shaffer Department of Computer Science Virginia Tech Blacksburg, Virginia Spring 2014 Copyright c 2014 by Clifford A. Shaffer CS 5114: Theory of Algorithms Spring
More informationNP-Completeness Part II
NP-Completeness Part II Please evaluate this course on Axess. Your comments really do make a difference. Announcements Problem Set 8 due tomorrow at 12:50PM sharp with one late day. Problem Set 9 out,
More informationLecture 1 : Probabilistic Method
IITM-CS6845: Theory Jan 04, 01 Lecturer: N.S.Narayanaswamy Lecture 1 : Probabilistic Method Scribe: R.Krithika The probabilistic method is a technique to deal with combinatorial problems by introducing
More informationOutline. Simulation of a Single-Server Queueing System. EEC 686/785 Modeling & Performance Evaluation of Computer Systems.
EEC 686/785 Modeling & Performance Evaluation of Computer Systems Lecture 19 Outline Simulation of a Single-Server Queueing System Review of midterm # Department of Electrical and Computer Engineering
More informationLecture 11: Non-Interactive Zero-Knowledge II. 1 Non-Interactive Zero-Knowledge in the Hidden-Bits Model for the Graph Hamiltonian problem
CS 276 Cryptography Oct 8, 2014 Lecture 11: Non-Interactive Zero-Knowledge II Instructor: Sanjam Garg Scribe: Rafael Dutra 1 Non-Interactive Zero-Knowledge in the Hidden-Bits Model for the Graph Hamiltonian
More informationData Structures and Algorithms
Data Structures and Algorithms CS245-2015S-23 NP-Completeness and Undecidablity David Galles Department of Computer Science University of San Francisco 23-0: Hard Problems Some algorithms take exponential
More informationNP-Completeness Part II
NP-Completeness Part II Recap from Last Time NP-Hardness A language L is called NP-hard iff for every L' NP, we have L' P L. A language in L is called NP-complete iff L is NP-hard and L NP. The class NPC
More informationAlgorithms lecture notes 1. Hashing, and Universal Hash functions
Algorithms lecture notes 1 Hashing, and Universal Hash functions Algorithms lecture notes 2 Can we maintain a dictionary with O(1) per operation? Not in the deterministic sense. But in expectation, yes.
More information1 Cryptographic hash functions
CSCI 5440: Cryptography Lecture 6 The Chinese University of Hong Kong 24 October 2012 1 Cryptographic hash functions Last time we saw a construction of message authentication codes (MACs) for fixed-length
More informationCopyright 2000, Kevin Wayne 1
Global Minimum Cut Contraction Algorithm CS 580: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 2018 Announcements: Homework 6 deadline extended to April 24 th at 11:59 PM Course
More informationFinding Satisfying Assignments by Random Walk
Ferienakademie, Sarntal 2010 Finding Satisfying Assignments by Random Walk Rolf Wanka, Erlangen Overview Preliminaries A Randomized Polynomial-time Algorithm for 2-SAT A Randomized O(2 n )-time Algorithm
More informationGenerating pseudo- random numbers
Generating pseudo- random numbers What are pseudo-random numbers? Numbers exhibiting statistical randomness while being generated by a deterministic process. Easier to generate than true random numbers?
More informationThe Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.
The Class NP NP is the problems that can be solved in polynomial time by a nondeterministic machine. NP The time taken by nondeterministic TM is the length of the longest branch. The collection of all
More informationIndependence, Variance, Bayes Theorem
Independence, Variance, Bayes Theorem Russell Impagliazzo and Miles Jones Thanks to Janine Tiefenbruck http://cseweb.ucsd.edu/classes/sp16/cse21-bd/ May 16, 2016 Resolving collisions with chaining Hash
More informationOn the influence of non-perfect random numbers on probabilistic algorithms
On the influence of non-perfect random numbers on probabilistic algorithms Markus Maucher Bioinformatics Group University of Ulm 01.07.09 Outline 1 Motivation and introduction 2 Theoretical results 3 Experimental
More informationCSCB63 Winter Week10 - Lecture 2 - Hashing. Anna Bretscher. March 21, / 30
CSCB63 Winter 2019 Week10 - Lecture 2 - Hashing Anna Bretscher March 21, 2019 1 / 30 Today Hashing Open Addressing Hash functions Universal Hashing 2 / 30 Open Addressing Open Addressing. Each entry in
More information13. RANDOMIZED ALGORITHMS
Randomization Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley http://www.cs.princeton.edu/~wayne/kleinberg-tardos Algorithmic design patterns. Greedy. Divide-and-conquer. Dynamic programming.
More information