10 Pages

cs221-section3

Course: CS 221, Fall 2009
School: Stanford
Rating:
 
 
 
 
 

Word Count: 2912

Document Preview

Review Probability CS 221 Section 3 Olga Russakovsky October 12, 2009 1 Random variables Consider running a probabilistic experiment, e.g., tossing a coin. Let be the set of all possible outcomes of this experiment, called the sample space. In this case, = {Heads, Tails} If we were to toss a coin 3 times, then = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT} A random variable is a function that map outcomes of a...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> Stanford >> CS 221

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Review Probability CS 221 Section 3 Olga Russakovsky October 12, 2009 1 Random variables Consider running a probabilistic experiment, e.g., tossing a coin. Let be the set of all possible outcomes of this experiment, called the sample space. In this case, = {Heads, Tails} If we were to toss a coin 3 times, then = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT} A random variable is a function that map outcomes of a probabilistic experiment to a real number. More formally, a random variable X is a function X : R. For example, we can dene a random variable X = the number of heads in two tosses of a coin (1) If a random variable X takes on only a nite number of values, i.e., X {0, 1, . . . n}, then it is called a discrete random variable. Otherwise, it is called a continuous random variable. The example above in (1) is a discrete random variable. The simplest example of a continuos random variable is a random number generator that can return any real number between 0 and 1. In CS221 we will be mostly dealing just with discrete variables. 0 Many thanks to Quoc Le, Arian Maleki and Tom Do. For more details, please refer to the very thorough probability review handout found at http://cs229.stanford.edu/section/cs229-prob.pdf 1 2 2.1 Probability Distributions Discrete random variables For a discrete random variable, a probability distribution is a list of probabilities associated with each of its possible values. For example, in the example above, if we have a fair coin, then P (X = 0) = P (TT outcome) = 1 4 1 2 1 4 P (X = 1) = P (HT or TH outcome) = P (X = 2) = P (HH outcome) = For discrete variables, this is called the probability mass function, or PMF. We denote P (X = x) = PX (x) = p(x) The requirements imposed on the probability mass function are: p(x) 0 for all x x (2) p(x) = 1 Additionally, dene an event A to be a subset of the sample space, i.e., A . For example, A might be the event that at least one toss turns up heads, or X 1. Then pX (A) = xA pX (x) (3) So in the case where A is the event of at least one heads, pX (A) = P (X = 1) + P (X = 2) = Two common examples of discrete random variables are X Bernoulli(p) with 0 p 1 corresponds to taking a coin which has probability p of coming up heads, and ipping it once. X is 1 if heads comes up, 0 otherwise. p(x) = p 1p if x = 1 if x = 0 (4) 11 3 += 24 4 X Binomial(n, p) with 0 p 1 corresponds to taking a coin which has probability p of coming up Heads, and ipping it n times. X is the number of heads. p(x) = n k px (1 p)(nx) (5) 1 The example discussed above is Binomial(2, 2 ). 2.2 Continous random variables In case of a continous random variable, the probability distribution is called the probability density function, or PDF, and is often denoted f (x). Here for example, can be the set of all real numbers between 0 and 1, and an event A can correspond to the set of all real numbers 1 between 5 and 3 . As before, the properties are 5 f (x) 0 for all x x f (x) = 1, so the total probability of all outcomes is 1 P (A) = P (x A) = xA f (x), so the probability of an event A is just computed as a part of the area under the curve f (x) We wont be using continuous random variables much in CS221, but two common examples are: X U nif orm(a, b) with a < b corresponds a random number generator where any real number between a and b is equally likely f (x) = 1 b a 0 if a x b otherwise (6) X N ormal(, 2 ) is also known as a Gaussian distribution f (x) = 1 2 2 e 22 (x) 1 2 (7) 2.3 Properties of probability distributions Consider a probability distribution P and two events A and B . Then If A B , then P (A) P (B ) P (A B ) min(P (A), P (B )) Union bound P (A B ) P (A) + P (B ) P ( A) = 1 P (A) If we impose additional restrictions on the events, we can obtain even more properties: If A and B are independent, then P (A B ) = P (A)P (B ) If A and B are disjoint, so A B = , then P (A B ) = P (A) + P (B ) By induction, if A1 , A2 , . . . Ak are disjoint events, so Ai Aj = 0 whenever i = j , then P (i Ai ) = P (Ai ) i (8) Law of total probability If A1 , A2 , . . . Ak are disjoint events such that i Ai = , then i P (i Ai ) = 1 (9) 3 Joint distributions Consider the case of two random variables X and Y . The joint probability distribution denes the probability of two events ocurring together. 3.1 Discrete random variables If X and Y are discrete, the joint probability mass function is denoted pX,Y (x, y ) = P (X = x, Y = y ) As a specic example, let X = outcome of a fair coin toss, 1 if heads, 0 if tails Y = outcome of the roll of a fair 6-sided die Then pX,Y (tails, roll a 3) = P (X = tails and Y = roll a 3) = We can represent this joint distribution as a 2 6 table: X=0 X=1 Y=1 1/12 1/12 Y=2 1/12 1/12 Y=3 1/12 1/12 Y=4 1/12 1/12 Y=5 1/12 1/12 Y=6 1/12 1/12 1 12 (11) (10) The marginal probability is the overall probability of the event X = x, regardless of what happens with Y , and is obtained by p(x) = y Domain(Y ) p(x, y ) (12) where Domain(Y ) is just the set of all possible values of Y . This process is called marginalization. In the table representation, it corresponds to summing out one of the dimensions (e.g., in this case, summing over all the rows or all the columns in the table). Specically, in example (11), 6 6 P (X = tails) = i=1 P (X = tails, Y = roll i) = i=1 1 1 = 12 2 The conditional probability mass function denes the probability of an event x ocurring given that weve already observed Y = y as p(X = x|Y = y ) = p(x|y ) = p(x, y ) p(y ) (13) assuming p(y ) = 0. In the 2-dimensional table representation, this means we focus our attention on just a single row or column in the table and ignore the rest. In this example, we might consider P (X = heads|Y = roll a 4) = P (X = heads and Y = roll a 4) = P (Y = roll a 4) 1 12 1 6 = 1 2 3.2 Bayes rule In order to derive Bayes rule, recall the denition of conditional distribution in (13) and consider two statements that follow from it: p(x, y ) = p(x|y )p(y ) Applying (13) rst followed by (15), derive: p(x|y ) = p(x, y ) p(y |x)p(x) = p(y ) p(y ) (16) (14) (15) p(x, y ) = p(y |x)p(x) Another (equivalent) formulation of Bayes rule, derived by applying (12) followed by (15) is p(x|y ) = = p(y |x)p(x) xDomain(X ) p(x, y ) p(y |x)p(x) xDomain(X ) p(y |x)p(x) (17) 3.2.1 Example A typical example of an application of Bayes rule is where X is a binary variable corresponding to the presence or absence of a certain disease, and Y is a random variable corresponding to some trait of a patient, such as blood pressure. Suppose we have a patient with trait y , and want to compute the probability that this patient has the disease, i.e., P (X = 1|Y = y ). One way to do it is to collect a group of people all of which share the trait Y = y , and estimate P (X = 1|Y = y ) directly by counting the number of people in this group that have the disease. However, as you might imagine, this would be very dicult in practice, especially if Y is multi-dimensional, and, if Y is continuous (e.g, blood pressure), then even impossible. On the other hand, using Bayes rule, all we need to know is the proportion of people that have the disease, or P (X = 1), which also tells us P (X = 0), and the conditional distributions P (Y |X = 1) and P (Y |X = 0) corresponding to the proles of sick and healthy people respectively relative to this trait The proportion of people that have the same trait as the patient, or P (Y = y ) can then be computed using (13, 12) P (Y = y ) = P (Y = y |X = 0)P (X = 0) + P (Y = y |X = 1)P (X = 1) Note that in practice nding a group of sick patients and a group of healthy patients to estimate P (Y = |X 1) and P (Y |X = 0), along with estimating P (X = 1) for the general population, is easier than attempting to compute P (X = 1|Y = y ) directly. 3.3 Independence Two variables are considered independent if knowing Y doesnt change your belief about X . More formally, X and Y are independent if for all values x Domain(X ) and y Domain(Y ): p(X = x|Y = y ) = p(X = x) p(X = x, Y = y ) = p(X = x)p(Y = y ) (18) or, equivalently , using the denition of conditional probability, (19) 1 The coin toss and the die roll random variables from the previous example are independent random variables. However, if we consider two tosses of the same fair coin and dene the random variables as X = the number of heads in the two tosses of this coin Y= 1 if any of the two tosses comes up heads 0 otherwise then the two variables are not independent, since P (X = 2|Y = 0) = P (HH outcome|neither toss comes up heads) = 0 1 P (X = 2) = P (HH outcome) = 4 Going back to the table representation, if X and Y are independent then we can represent their joint probability distribution by two 1-dimensional tables (one for (P (X ) and one for P (Y )) instead of a full 2-dimensional table: Y=1 1/6 Y=2 1/6 Y=3 1/6 Y=4 1/6 Y=5 1/6 Y=6 1/6 X=0 1/2 X=1 1/2 The advantage is that number of entries in this case would be size(textDomain(X )) + size(Domain(Y )) = 8 instead of size(Domain(X )) size(Domain(Y )) = 12 3.4 Conditional independence Two variables X and Y are conditionally independent given a third variable Z if p(X = x, Y = y |Z = z ) = p(X = x|Z = z )p(Y = y |Z = z ) for all x Domain(X ), y Domain(Y ), z Domain(Z ), such that P (Z = z ) = 0. 1 Formulation (19) implicitly deals with the case where P (Y = y ) = 0. In formulation (18) to be precise we actually have to consider this as a special case, and change the denition from for all y Domain(Y ) to for all y Domain(Y ) such that P (Y = y ) = 0. (20) 3.4.1 Conditional independence does not imply independence Note that it might be the case that X and Y are not independent, but they are conditionally independent given Z . For example, suppose X and Y are as above, so X = the number of heads in the two tosses of this coin Y= 1 if any of the two tosses comes up heads 0 otherwise Recall that we have already argued that these are not independent. Now we dene Z to be the same as Y , so we obtain p(X = x, Y = y |Z = z ) = 0 if y = z P (X = x|Z = z ) otherwise This is because the variables Y and Z are identical, so it cant be the case that y = z . If y = z , since P (Y = y |Z = z ) = 0 we have p(X = x, Y = y |Z = z ) = 0 = P (X = x|Z = z )P (Y = y |Z = z ) and conditional independence holds so far. When y = z , the fact that Y = y gives us no more information about X than if we just knew that Z = z . If y = z , then since P (Y = y |Z = z ) = 1, P (X = x, Y = y |Z = z ) = P (X = x|Z = z ) = P (X = x|Z = z )P (Y = y |Z = z ) and we have satised the denition of conditional independence. This example is somewhat degenerate, but there are plenty of more complicated examples where conditional independence does not imply independence. This is an important result to keep in mind. 3.4.2 Independence does not imply conditional independence Alternatively, note that we can also have two independent variables that become dependent when conditioned on a third one. As a simple example, consider ipping two fair coins again and let X= Y= Z= 1 if coin1 comes up heads 0 otherwise 1 if coin2 comes up heads 0 otherwise 1 if both coins come up heads 0 otherwise (21) Clearly X and Y are independent since they are dealing with dierent coins. Now consider what happens when we observe that Z = 0 and condition on that. We know that only one of three possible outcomes have occurred: HT, TH or TT. P (X = 0, Y = 0|Z = 0) = P (coin1 = T and coin2 = T| HT, TH or TT) = P (X = 0|Z = 0) = P (coin1 = T| HT, TH or TT) = 2 3 2 P (Y = 0|Z = 0) = P (coin2 = T| HT, TH or TT) = 3 1 3 So P (X = 0, Y = 0|Z = 0) = P (X = 0|Z = 0)P (Y = 0|Z = 0) So two variables can become correlated when conditioned on a third. 3.5 Chain rule Using the denition of conditional distribution from (13), we can derive the chain rule P (X = x, Y = y, Z = z ) = P (X = x|Y = y, Z = z )P (Y = y |Z = z )P (Z = z ) or, more generally, P (X1 , X2 , . . . Xn ) = P (Xn |X1 . . . Xn1 )P (Xn1 |X1 . . . Xn2 ) . . . P (X2 |X1 )P (X1 ) This holds true for all variables X1 . . . Xn . (23) (22) 4 4.1 Statistics of random variables Expectation The expectation, or mean of a discrete random variable is dened as E[X ] = xDomain(X ) x P (x) (24) Given an arbitrary function g : R R, we have E[g (X )] = xDomain(X ) g (x) P (x) (25) 4.1.1 Expectations of standard distributions For the Bernoulli variable dened in (4), we have E[X ] = 1 p + 0 (1 p) = p For the Binomial dened in (5), the derivation is trickier, but E[X ] = np. For the Gaussian N (, 2 ) of (7), its E[X ] = . 4.1.2 Properties (26) Some properties of expectation are E[c] = c for any constant c E[cg (X )] = cE[g (X )] Linearity of expectation E[f (X ) + g (X )] = E[f (X )] + E[g (X )]. This holds whether or not the variables are independent! For discrete random variable X , E[1{X = k }] = P (X = k ) The linearity of expectation property is very important in probability theory, and will come up a lot in CS221, so lets emphasize it again: For all random variables X and Y , whether they are independent or not, E[X + Y ] = E[X ] + E[Y ] 4.1.3 Linearity of expectation examples Since this is such an important concept, lets consider three linearity of expectation examples. Example 1 First, consider two independent variables X and Y , dened as in (21), so corresponding to two fair coins. We compute 11 + =1 22 E(X + Y ) = 2 P (HH) + 1 P (HT orTH) + 0 P (TT) 1 1 =2 +1 =1 4 2 E(X ) + E(Y ) = Example 2 Now verify that this works with dependent variables. Consider tossing just one fair coin, and dening 1 if coin comes up heads X=Y = 0 otherwise This time X + Y can take on only two values: its 2 if the coin comes up heads (since both X and Y will have values of 1), and 0 otherwise. Again we have E(X ) + E(Y ) = 11 + =1 22 1 =1 2 E(X + Y ) = 2 P (H) + 0 P (T) = 2 Example 3 Finally, lets consider an even more interesting example, where we roll a single fair six-sided die and let X = the roll of the die Y= 1 if die roll 3 0 otherwise These variables consider the same die and are clearly not independent. However, we compute E(X ) = 1 P (roll 1) + 2 P (roll 2) + 3 P (roll 3) + 4 P (roll 4)+ + 5 P (roll 5) + 6 P (roll 6) 1 1 = (1 + 2 + 3 + 4 + 5 + 6) = 3 6 2 1 E(Y ) = 0 P (roll 1, 2, 3) + 1 P (roll 4, 5, 6) = 2 E(X ) + E(Y ) = 4 To compute E(X + Y ), we consider what happens on each roll of the die: Roll Value of X + Y So E(X + Y ) = 7 P (roll 6) + 6 P (roll 5) + 5 P (roll 4)+ + 3 P (roll 3) + 2 P (roll 2) + 1 P (roll 1) 1 = (7 + 6 + 5 + 3 + 2 + 1) = 4 6 Thus in this case still E[X + Y ] = E[X ] + E[Y ] 1 0+1=1 2 0+2=2 3 0+3=3 4 1+4=5 5 1+5 = 6 6 1+ 6 + 7 4.2 Variance V ar[V ] = E[(X E[X ])2 ] The variance of a random variable is the measure of deviation from the mean, dened as (27) Alternatively, V ar[V ] = E[(X E[X ])2 ] = E[X 2 ] E[X ]2 4.2.1 Variances of standard distributions = E[X 2 ] 2E[X ]2 + E[X ]2 = E[X 2 ] E[2X E[X ]] + E[E[X ]2 ] (28) = E[X 2 2X E[X ] + E[X ]2 ] Again, for the Bernoulli variable dened in (4), we have E[X 2 ] = 12 p + 02 (1 p) = p E[X ]2 = p2 V ar[X ] = p p2 = p(1 p) For the Binomial dened in (5), V ar[X ] = np(1 p). For the Gaussian N (, 2 ) in (7), V ar[X ] = 2 . 4.2.2 Properties (29) Some properties of variance are V ar[c] = 0 for any constant c V ar[cf (X )] = c2 V ar[f (X )]
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Stanford - CS - 221
% CS221, Fall 2009-10 % Matlab Review Session % % % % % % % % % % % To run matlab, first login to one of the clusters (such as myth.stanford.edu) using SecureCRT on Windows or typing from the command line: &gt; ssh username@myth.stanford.edu -X Then, to run
Stanford - CS - 221
Basic SearchCS 221 Section 1September 25, 20091IntroductionToday we will discuss some basic blind search algorithms and work some example problems involving them. These algorithms should be a review for most of you, as you have probably seen them in
Stanford - CS - 221
CS221:LittleDog RobotProjectZicoKolter,PaulBaumstarckLittleDogRobotLittleDogRobotLittleDogRobotSimulatorGettingtheSimulator LittleDogsimulatorandcodeavailableat: /afs/ir/class/cs221/code/LittleDog Ignorecompilationwarnings make&amp;./mainpath Shouldbui
Stanford - CS - 221
CS221 Challenge Problem: Robot Dog1CS 221, Autumn 2009 Robot DogYou may work in teams of up to 3 students for this project. Some important dates: You must form a team by Friday, October 9, 11:59pm. Send us an email with your team details, as described
Rutgers - PHILOSOPHY - 730:201
Rutgers - PHILOSOPHY - 730:201
Rutgers - PHILOSOPHY - 730:201
Aberystwyth University - SCI - 001
Chapter 38 Angiosperm Reproduction and BiotechnologyLecture OutlineOverview: To Seed or Not to SeedSexual reproduction is not the sole means by which flowering plants reproduce. Many species can also reproduce asexually, creating offspring that are gen
Aarhus Universitet - ACCT - ACCT2
18.Because of unseasonably cold weather, the supply of oranges has substantially decreased. This statement indicates that: CA.the equilibrium quantity of oranges will rise.B.the demand for oranges will necessarily rise.C.the amount of oranges that
UIllinois - 942 - cs
AlgorithmsLecture 0: IntroductionWe should explain, before proceeding, that it is not our object to consider this program with reference to the actual arrangement of the data on the Variables of the engine, but simply as an abstract question of the natu
UIllinois - 942 - cs
AlgorithmsOur life is frittered away by detail. Simplify, simplify.Lecture 1: Recursion Henry David Thoreau The control of a large force is the same principle as the control of a few men: it is merely a question of dividing up their numbers. Sun Zi, Th
UIllinois - 942 - cs
AlgorithmsNon-Lecture C: Advanced Dynamic Programming TricksNinety percent of science ction is crud. But then, ninety percent of everything is crud, and its the ten percent that isnt crud that is important. [Theodore] Sturgeons Law (1953)CAdvanced Dyn
UIllinois - 942 - cs
AlgorithmsLecture 5: Randomized AlgorithmsThe rst nuts and bolts appeared in the middle 1400s. The bolts were just screws with straight sides and a blunt end. The nuts were hand-made, and very crude. When a match was found between a nut and a bolt, they
UIllinois - 942 - cs
AlgorithmsNon-Lecture E: Tail InequalitiesIf you hold a cat by the tail you learn things you cannot learn any other way. Mark TwainETail InequalitiesThe simple recursive structure of skip lists made it relatively easy to derive an upper bound on the
UIllinois - 942 - cs
AlgorithmsLecture 6: Treaps and Skip ListsI thought the following four [rules] would be enough, provided that I made a rm and constant resolution not to fail even once in the observance of them. The rst was never to accept anything as true if I had not
UIllinois - 942 - cs
AlgorithmsNon-Lecture F: Randomized Minimum CutJaques: But, for the seventh cause; how did you nd the quarrel on the seventh cause? Touchstone: Upon a lie seven times removed:bear your body more seeming, Audrey:as thus, sir. I did dislike the cut of a c
UIllinois - 942 - cs
AlgorithmsLecture 9: Scapegoat and Splay TreesEverything was balanced before the computers went off line. Try and adjust something, and you unbalance something else. Try and adjust that, you unbalance two more and before you know whats happened, the shi
UIllinois - 942 - cs
AlgorithmsNon-Lecture G: String MatchingWhy are our days numbered and not, say, lettered? Woody AllenGG.1String MatchingBrute ForceThe basic object that were going to talk about for the next two lectures is a string, which is really just an array.
UIllinois - 942 - cs
AlgorithmsNon-Lecture H: More String MatchingPhilosophers gathered from far and near To sit at his feat and hear and hear, Though he never was heard To utter a word But Abracadabra, abracadab, Abracada, abracad, Abraca, abrac, abra, ab! Twas all he had,
UIllinois - 942 - cs
AlgorithmsE pluribus unum (Out of many, one)Lecture 10: Disjoint Sets Ofcial motto of the United States of America John: Whos your daddy? Cmon, you know who your daddy is! Whos your daddy? DArgo, tell him who his daddy is!&quot; DArgo: Im your daddy. Farsca
UIllinois - 942 - cs
AlgorithmsLecture 11: Basic Graph PropertiesObie looked at the seein eye dog. Then at the twenty-seven 8 by 10 color glossy pictures with the circles and arrows and a paragraph on the back of each one. . . and then he looked at the seein eye dog. And th
UIllinois - 942 - cs
AlgorithmsLecture 13: Shortest PathsWell, ya turn left by the re station in the village and take the old post road by the reservoir and. . . no, that wont do. Best to continue straight on by the tar road until you reach the schoolhouse and then turn lef
UIllinois - 942 - cs
AlgorithmsLecture 14: All-Pairs Shortest PathsThe tree which lls the arms grew from the tiniest sprout; the tower of nine storeys rose from a (small) heap of earth; the journey of a thousand li commenced with a single step. Lao-Tzu, Tao Te Ching, chapte
UIllinois - 942 - cs
AlgorithmsLecture 15: Maximum Flows and Minimum CutsCol. Hogan: One of these wires disconnects the fuse, the other one res the bomb. Which one would you cut, Shultz? Sgt. Schultz: Dont ask me, this is a decision for an ofcer. Col. Hogan: All right. Whic
UIllinois - 942 - cs
AlgorithmsLecture 16: Max-Flow AlgorithmsA process cannot be understood by stopping it. Understanding must move with the ow of the process, must join it and ow with it. The First Law of Mentat, in Frank Herberts Dune (1965) Theres a difference between k
UIllinois - 942 - cs
On the history of combinatorial optimization (till 1960)Alexander Schrijver11. IntroductionAs a coherent mathematical discipline, combinatorial optimization is relatively young. When studying the history of the eld, one observes a number of independent
UIllinois - 942 - cs
AlgorithmsLecture 17: Applications of Maximum FlowFor a long time it puzzled me how something so expensive, so leading edge, could be so useless, and then it occurred to me that a computer is a stupid machine with the ability to do incredibly smart thin
UIllinois - 942 - cs
AlgorithmsLecture 18: Extensions of Maximum FlowWho are you?&quot; said Lunkwill, rising angrily from his seat. What do you want?&quot; I am Majikthise!&quot; announced the older one. And I demand that I am Vroomfondel!&quot; shouted the younger one. Majikthise turned on V
UIllinois - 942 - cs
AlgorithmsNon-Lecture J: Linear Programming AlgorithmsSimplicibus itaque verbis gaudet Mathematica Veritas, cum etiam per se simplex sit Veritatis oratio. [And thus Mathematical Truth prefers simple words, because the language of Truth is itself simple.
UIllinois - 942 - cs
AlgorithmsLecture 20: Adversary ArgumentsAn adversary means opposition and competition, but not having an adversary means grief and loneliness. Zhuangzi (Chuang-tsu) c. 300 BC It is possible that the operator could be hit by an asteroid and your $20 cou
UIllinois - 942 - cs
AlgorithmsLecture 21: NP-Hard ProblemsThe wonderful thing about standards is that there are so many of them to choose from. Real Admiral Grace Murray Hopper If a problem has no solution, it may not be a problem, but a fact not to be solved, but to be co
UIllinois - 942 - cs
AlgorithmsNon-Lecture K: Approximation AlgorithmsLe mieux est lennemi du bien. [The best is the enemy of the good.] Voltaire, La Bgueule (1772) Who shall forbid a wise skepticism, seeing that there is no practical question on which any thing more than a
UIllinois - 942 - cs
AlgorithmsNon-Lecture M: Number-Theoretic AlgorithmsAnd its one, two, three, What are we ghting for? Dont tell me, I dont give a damn, Next stop is Vietnam; [or: This time well kill Saddam] And its ve, six, seven, Open up the pearly gates, Well there ai
UIllinois - 942 - cs
AlgorithmsNon-Lecture N: Convex HullsNN.1Convex HullsDenitionsWe are given a set P of n points in the plane. We want to compute something called the convex hull of P . Intuitively, the convex hull is what you get by driving a nail into the plane at
UIllinois - 942 - cs
AlgorithmsAppendix: Solving Recurrences. . . O Zarathustra, who you are and must become behold you are the teacher of the eternal recurrence that is your destiny! That you as the rst must teach this doctrine how could this great destiny not be your grea
UIllinois - 942 - cs
CS 373Homework 1 (due 2/9/99)Spring 1999CS 373: Combinatorial Algorithms, Spring 1999http:/www-courses.cs.uiuc.edu/~cs373 Homework 1 (due February 9, 1999 by noon)Name: Net ID:Alias:Everyone must do the problems marked . Problems marked are for 1-u
UIllinois - 942 - cs
CS 373Homework 2 (due 2/18/99)Spring 1999CS 373: Combinatorial Algorithms, Spring 1999http:/www-courses.cs.uiuc.edu/~cs373 Homework 2 (due Thu. Feb. 18, 1999 by noon)Name: Net ID:Alias:Everyone must do the problems marked . Problems marked are for
UIllinois - 942 - cs
CS 373Homework 3 (due 3/11/99)Spring 1999CS 373: Combinatorial Algorithms, Spring 1999http:/www-courses.cs.uiuc.edu/~cs373 Homework 3 (due Thu. Mar. 11, 1999 by noon)Name: Net ID:Alias:Everyone must do the problems marked . Problems marked are for
UIllinois - 942 - cs
CS 373Homework 0 (due 1/26/99)Spring 1999CS 373: Combinatorial Algorithms, Spring 1999http:/www-courses.cs.uiuc.edu/ cs373 Homework 0 (due January 26, 1999 by the beginning of class)Name: Net ID:Alias:Neatly print your name (rst name rst, with no c
UIllinois - 942 - cs
AlgorithmsNon-Lecture L: Fibonacci HeapsA little and a little, collected together, become a great deal; the heap in the barn consists of single grains, and drop and drop makes an inundation. Saadi (11841291) The trees that are slow to grow bear the best
UIllinois - 942 - cs
AlgorithmsNon-Lecture O: Line Segment IntersectionSpengler: Theres something very important I forgot to tell you. Venkman: What? Spengler: Dont cross the streams. Venkman: Why? Spengler: It would be bad. Venkman: Im fuzzy on the whole good/bad thing. Wh
UIllinois - 942 - cs
AlgorithmsNon-Lecture P: Polygon TriangulationIf triangles had a god, they would give him three sides. Charles Louis de Secondat Montesquie (1721) Down with Euclid! Death to triangles! Jean Dieudonn (1959)PP .1Polygon TriangulationIntroductionRecal
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Fall 2000Homework 0, due August 31, 2000 at the beginning of className: Net ID:Alias:Neatly print your name (rst name rst, with no comma), your network ID, and a short alias into the boxes above. Do not sign your name
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Spring 1999Final Exam (May 7, 1999)Name: Net ID:Alias:This is a closed-book, closed-notes exam!If you brought anything with you besides writing instruments and your two 8 1 11 cheat sheets, please leave it at the fro
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Fall 2000Homework 0, due August 31, 2000 at the beginning of className: Net ID:Alias:Neatly print your name (rst name rst, with no comma), your network ID, and a short alias into the boxes above. Do not sign your name
UIllinois - 942 - cs
CS 373Homework 5 (due 4/22/99)Spring 1999CS 373: Combinatorial Algorithms, Spring 1999http:/www-courses.cs.uiuc.edu/~cs373 Homework 5 (due Thu. Apr. 22, 1999 by noon)Name: Net ID:Alias:Everyone must do the problems marked . Problems marked are for
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Spring 1999Midterm 1 (February 23, 1999)Name: Net ID:Alias:This is a closed-book, closed-notes exam!If you brought anything with you besides writing instruments and your 8 1 11 cheat sheet, please leave it at the fro
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Spring 1999Midterm 2 (April 6, 1999)Name: Net ID:Alias:This is a closed-book, closed-notes exam!If you brought anything with you besides writing instruments and your 8 1 11 cheat sheet, please leave it at the front o
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Fall 2000Homework 1 (due September 12, 2000 at midnight)Name: Net ID: Name: Net ID: Name: Net ID:Alias:U 3/4 1Alias:U 3/4 1Alias:U 3/4 1Starting with Homework 1, homeworks may be done in teams of up to three peop
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Fall 2000Homework 4 (due October 26, 2000 at midnight)Name: Net ID: Name: Net ID: Name: Net ID:Alias:U 3/4 1Alias:U 3/4 1Alias:U 3/4 1Homeworks may be done in teams of up to three people. Each team turns in just
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Fall 2000Homework 1 (due November 16, 2000 at midnight)Name: Net ID: Name: Net ID: Name: Net ID:Alias:U 3/4 1Alias:U 3/4 1Alias:U 3/4 1Starting with Homework 1, homeworks may be done in teams of up to three peopl
UIllinois - 942 - cs
CS 373 1. True, False, or MaybeFinal Exam (December 15, 2000)Fall 2000Indicate whether each of the following statments is always true, sometimes true, always false, or unknown. Some of these questions are deliberately tricky, so read them carefully. Ea
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Spring 2001Homework 0, due January 23, 2001 at the beginning of className: Net ID:Alias:Neatly print your name (rst name rst, with no comma), your network ID, and a short alias into the boxes above. Do not sign your n
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Spring 2001Homework 1 (due Thursday, February 1, 2001 at 11:59:59 p.m.)Name: Net ID: Name: Net ID: Name: Net ID:Alias:U 3/4 1Alias:U 3/4 1Alias:U 3/4 1Starting with Homework 1, homeworks may be done in teams of u
UIllinois - 942 - cs
CS 373Midterm 2 (October 31, 2000)Fall 20001. Using any method you like, compute the following subgraphs for the weighted graph below. Each subproblem is worth 3 points. Each incorrect edge costs you 1 point, but you cannot get a negative score for any
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Spring 2001http:/www-courses.cs.uiuc.edu/~cs373 Homework 6 (due Tue. May 1, 2001 at 11:59.99 p.m.)Name: Net ID: Name: Net ID: Name: Net ID:Alias:U 3/4 1Alias:U 3/4 1Alias:U 3/4 1Starting with Homework 1, homework
UIllinois - 942 - cs
CS 373Midterm 1 Questions (February 20, 2001)Spring 2001Write your answers in the separate answer booklet.1. Multiple Choice: Each question below has one of the following answers. (a) (1) (b) (log n) (c) (n) (d) (n log n) (e) (n2 )For each question,
UIllinois - 942 - cs
CS 373Final Exam Questions (May 7, 2001)Spring 2001You must turn in this question sheet with your answers.1. Dj` vu ea Prove that any positive integer can be written as the sum of distinct nonconsecutive Fibonacci numbersif Fn appears in the sum, then
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Fall 2002Homework 0, due September 5, 2002 at the beginning of className: Net ID:Alias:UGNeatly print your name (rst name rst, with no comma), your network ID, and an alias of your choice into the boxes above. Circle
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Spring 2001Homework 2 (due Thu. Feb. 15, 2001 at 11:59 PM)Name: Net ID: Name: Net ID: Name: Net ID:Alias:U 3/4 1Alias:U 3/4 1Alias:U 3/4 1Starting with Homework 1, homeworks may be done in teams of up to three pe
UIllinois - 942 - cs
CS 373: Combinatorial Algorithms, Spring 2001Homework 3 (due Thursday, March 8, 2001 at 11:59.99 p.m.)Name: Net ID: Name: Net ID: Name: Net ID:Alias:U 3/4 1Alias:U 3/4 1Alias:U 3/4 1Starting with Homework 1, homeworks may be done in teams of up t