Problem Set 2. General Instructions

Size: px
Start display at page:

Download "Problem Set 2. General Instructions"

Transcription

1 CS224W: Analysis of Networks Fall 2017 Problem Set 2 General Instructions Due 11:59pm PDT October 26, 2017 These questions require thought, but do not require long answers. Please be as concise as possible. You are allowed to take a maximum of 1 late period (see the information sheet at the end of this document for the definition of a late period). Submission instructions: You should submit your answers via GradeScope and your code via the SNAP submission site. Submitting answers: Prepare answers to your homework in a single PDF file and submit it via GradeScope. Make sure that the answer to each sub-question is on a separate, single page. The number of the question should be at the top of each page. We recommend that you use the submission template latex file to prepare your submission. Fill out the information sheet located at the end of this problem set or at the end of the template file and sign it in order to acknowledge the Honor Code (if typesetting the homework, you may type your name instead of signing). This should be the last page of your submission. Failure to fill out the information sheet will result in a reduction of 2 points from your homework score. Starter Code: For problems 2 and 3, starter code is available at cs224w/homeworks/hw2/starter_code/. Note that the starter code is a nudge towards one way of solving the problem, amongst many. Feel free to cannibalize it in any way possible to construct your own solution. Submitting code: Upload your code at Put all the code for a single question into a single file and upload it. Questions 1 The Configuration Model [25 points Praty, Ziyi] A common method of analyzing the properties of real world networks is to analyze their behavior in comparison with a generated theoretical model referred to as a null model. We have previously discussed some null models in class (Lecture 3), such as the Erdős-Rényi model and the configuration model. While the Erdős-Rényi model has many nice theoretical properties, the configuration model is useful because it generates random networks with a specified degree sequence. In other words, given a real network, the configuration model allows you to sample from the space of networks that have the exact same sequence of degrees (i.e., the sampled random networks have the same degree distribution as the network you are studying). In this problem, we will analyze the configuration model in detail. For more background the on the configuration model, check out these lecture notes by Aaron Clauset: edu/~aaronc/courses/5352/fall2013/csci5352_2013_l11.pdf We will use the configuration model to examine the properties of the power grid of the western US (as of 1998). In this network, the nodes represent transformers, substations, and generators and the

2 CS224W: Analysis of Networks - Problem Set 2 2 (undirected) edges represent transmission lines. The dataset for this problem should be downloaded from txt. The first two columns of the file are the two nodes comprising an undirected edge; ignore the third column. 1.1 Simulating the configuration model through stub-matching [15 points] First, we will generate a configuration model by the stub matching method that was briefly mentioned during the random graphs lecture (Lecture 3). The intuition behind this algorithm is that we first break the network apart into a bunch of stubs, which are basically nodes with dangling edges; then we generate a random network by randomly pairing up these stubs and connecting them. A random network is generated from the stub-matching algorithm as follows: 1. First, calculate the degree sequence of the real world network by creating a vector k = {k 1, k 2,...k n } where k i is the degree of node i and n is the number of nodes in the graph. 2. Then create an array v and fill it by writing the index i exactly k i times for each element in the degree sequence. Each of these i s represents a stub of the i th node in the graph. 3. Next, randomly permute the elements of v. 4. Finally, create a random network by connecting adjacent pairs in v with an edge. In other words, connect up the nodes corresponding to the first and second elements, the third and fourth, and so on. Formally, v is of length 2m and the m undirected edges of the graph are (v 1, v 2 ), (v 3, v 4 ),..., (v 2m 1, v 2m ). If this was confusing, don t worry! Figure 1 provides a visual example of the algorithm that should clarify things. One import note is that this algorithm can sometimes create improper (i.e., nonsimple) networks with self-loops or multiple edges between two nodes; if this happens, then you must reject this sampled network and try again. In other words, you must make sure the sampled network is simple (no self-loops or multi-edges) after you construct it and draw a new sample if the constructed network is non-simple. (a) [10 points] Draw 100 random (simple) network samples using the stub-matching algorithm using the degree sequence of the power grid network. Calculate the average clustering coefficient of each of these samples and report the mean value across samples. Solution The stub-matching algorithm should generate a clustering coefficient around (b) [2 points] Consider node i with degree k i, and node j with degree k j. Under a random matching on the half-edges, what is the probability that node i and j are connected? What does the result imply? For simplicity, self-loops and multi-edges are allowed during stub-matching for this subproblem. Solution A closed form for the exact probability seems hard to derive. We instead derive an upper bound on the probability as follows. Note we use stubs and half-edges interchangeably

3 CS224W: Analysis of Networks - Problem Set 2 3 A B C D Figure 1: Example run of the stub matching algorithm. (A) A toy example network where the nodes are labeled with different colors. (B) We break the toy network into stubs, where each node of degree k has k half-edges coming out of it. (C), We label the nodes and make a vector v where each node s label is repeated in the vector k times (where k is that node s degree). (D), We take a random permutation of v and then connect adjacent pairs (dashed boxes) to create a random network. below. Nodes i and j become connected when a half-edge of i and a half-edge of j are matched in the stub-matching algorithm. For s = 1,..., k i, let A s denote the event that s-th half-edge of node i is matched to one of the half-edges of node j. Then, Pr(nodes i and j are connected) = Pr(A 1 A ki ) k i Pr(A s ) = s=1 k i s=1 k j 2m 1 = k ik j 2m 1. The first inequality is by the union bound. The second equality follows from the fact that Pr(A s ) = for all s. To see this, note that s-th half-edge is randomly matched to one of 2m 1 other k j 2m 1 half-edges and k j of those belong to node j. So, the upper bound is k ik j 2m 1. Note the exact probability will be actually less than k ik j 2m 1 because the events A s are not disjoint. (c) [3 points] We artificially reject self-loops when building the graph, but for large graphs, selfloops won t be a big trouble. Consider a graph with a very large number of edges m. What

4 CS224W: Analysis of Networks - Problem Set 2 4 is the expected number of self-loops if we build the graph by stub-matching? What does this result imply about the fraction of self-loops in the graph? (Hint: write the expected number as function of k 2 and k, where k m = 1 n i km i and n is the number of nodes) Solution Let X i be the number of self-loops at node i and X = n i=1 X i be the total number of self-loops in the graph. By Linearity of Expectation, E[X] = n i=1 E[X i]. For each node i, we compute E[X i ] as follows. Let A st be the event that s-th and t-th half-edges of node i are matched to each other and I st be the indicator that is equal to 1 if A st happens, and 0 if otherwise. Then, X i = 1 s<t k i I st and E[X i ] = E[I st ] 1 s<t k i = Pr(A st ) 1 s<t k i = 2m 1 1 s<t k i 1 = k i(k i 1) 2(2m 1). We used the fact that Pr(A st ) = 1 2m 1 (the s-th half-edge is matched to one of 2m 1 other half-edges randomly and the t-th half-edge is one of them). So, E[X] = n k i (k i 1) i=1 4m 2 and we can rewrite this as E[X] = k2 k Consequently, the fraction of self-loops is E[X] m = 1 m 2 k 2 n using the fact that k = 2m n. k 2 k. As long as k 2 is bounded in terms 2 k 2 n of m, the fraction of self-loops will be small. In particular, if k 2 is bounded by some constant, i.e., O(1), then the fraction of self-loops is O(1/m). Solution There were two major issues with Parts (b) and (c). First, our original solutions were intended for simplified variants of the given problem statements. In Part (b), for example, we asked for the exact probability but we had a proof for an upper bound expression. Second, Prof. Clauset s notes (linked from the problem set) relied on some asymptotic argument in a few places and the assumptions were not always clear. We realized that these issues were causing a lot of problems and some students were being misled greatly. Once again, we apologize for the confusion and frustration this may have caused. 1.2 Simulating the configuration model through rewiring [10 points] A second (and more popular) approach to sampling from the configuration model is to do edge rewiring. The idea with this algorithm is to start with an empirical network and then randomly rewire edges until it is essentially random. Implement edge rewiring for the US power grid graph. following process: To do this we iteratively repeat the

5 CS224W: Analysis of Networks - Problem Set 2 5 Figure 2: As the iterations of rewiring increase, the clustering coefficient decreases and begins to approximate the value computed from stub-matching. This makes sense since the limiting case of rewiring is essentially totally random, just like stub-matching. 1. Randomly select two distinct edges e 1 = (a, b) and e 2 = (c, d) from the graph. We will try to re-wire these edges. 2. Randomly select one of endpoint of edge e 1 and call it u. Let v be the other endpoint in e 1. At this point, either u = a, v = b or u = b, v = a. Do the same for edge e 2. Call the randomly selected endpoint w and the other endpoint x. 3. Perform the rewiring. In the graph, replace the undirected edges e 1 = (a, b) and e 2 = (c, d) with the undirected edges (u, w) and (v, x) as long as this results in a simple network (no self-loops or multi-edges). If the result is not a simple network, reject this rewiring and return to step 1; otherwise, keep the newly swapped edges and return to step 1. Run your edge rewiring implementation for iterations on the power grid network. Every 100 iterations, calculate the average clustering coefficient of the rewired network. Then plot the average clustering coefficient as a function of the number of iterations. Briefly comment on the curve that represents the model being rewired by both explaining its shape and how it relates to the clustering coefficient generated by the stub-matching algorithm (hint: they should be pretty similar). Solution See the figure attached. What to submit Page 1: The average clustering coefficient generated from the stub-matching algorithm (averaged over 100 samples).

6 CS224W: Analysis of Networks - Problem Set 2 6 Expression for the probability that nodes i and j with degrees k i and k j are connected. 2-3 sentences explaining the expression and what it implies. The expected number of self-loops. 2-3 sentences explaining what the results implies about the fraction of self-loops in the graph? Page 2: A plot of the average clustering coefficient as a function of the iteration number for the rewiring algorithm. A brief comment on this plot (1 2 sentences).

7 CS224W: Analysis of Networks - Problem Set Signed Triad Analysis [45 points Poorvi, Anunay] In this question you will explore the notion of balance in signed networks. The first part will explore the distribution of signed triads in an empirical network. The remaining parts will consider different generative models that could potentially produce this sort of triad distribution. 2.1 Signed Triads in Epinions [15 points] Download the following files. Epinions dataset: txt Starter code: py Epinions is a consumer review site where members can decide if they trust each other or not. This leads to a web of trust which you will analyze in this question. Since a member can either trust or distrust other members, we have a special type of network called signed network where every edge has a sign. A positive sign on an edge indicates trust between the two users whereas a negative edge indicates distrust between the two users. We will consider the graph as undirected and study the various forms of triads as shown in Figure 3. (a) [5 points] Calculate the count and fraction of triads of each type in the Epinions network. (Count each triad only once and do not count self edges) Solution Triad type Count Fraction t t t t (b) [5 points] Calculate the fraction of positive and negative edges in the graph. Let the fraction of positive edges be p. Assuming that each edge of a triad will independently be assigned a positive sign with probability p and a negative sign with probability 1 p, calculate the probability of each type of triad. Solution If counting self-loops: Number of positive edges = Number of negative edges = Fraction of positive edges = p = Fraction of negative edges = If not counting self-loops: Number of positive edges = Number of negative edges =

8 CS224W: Analysis of Networks - Problem Set 2 8 Figure 3: The four different types of signed triads (a) t (b) t (c) t (d) t 3 Fraction of positive edges = p = Fraction of negative edges = Baseline probabilities: Triad type Probability t t t t (c) [5 points] Compare the probabilities from part (b) with fractions calculated in part (a). Which type of triads do you see more in data as compared to the random baseline values? Which type of triads do you see less? Provide an explanation for this observation. Solution Triads t 0, t 1, t 3 are seen more in the graph as compared to baseline whereas triads t 2 are seen significantly less than baseline. One reason for this might be that triad t 2 is intuitively unstable since B s distrust of C conflicts with B s trust of A who trusts C. 2.2 Balance in a Random Signed Network [8 points] Now that we have seen how signed triads are distributed in a real network, we will analyze a simple generative model of signed networks to see how surprising this empirical distribution really is. In particular, we will analyze how likely it is for a balanced triad to occur in this random model. Consider the following simple model for constructing random signed networks, which we will call the G + model. Start with a complete graph on n nodes. For each edge e mark its sign as positive with probability p (and thus negative with probability 1 p). All edges are undirected. Let G B denote the event that a graph G is balanced. In this question, we ll show that P (G B ) 0 as n for graphs generated according to the G + model. Assume that p = 1/2. (a) [2 points] Let T be a maximum set of disjoint-edge triangles in G. A disjoint-edge set of triangles is one in which every edge is in exactly one triangle. Give a simple lower bound for T, the number of triangles that don t share any edges in G (the bound should be an increasing function of n).

9 CS224W: Analysis of Networks - Problem Set 2 9 Solution A simple bound that is an increasing function of n is T n 3. This is true because you can separate the n nodes into n 3 groups of 3 (the floor is just in case n isn t divisible by 3, and there s one or two nodes left over). There is a triangle for each group of 3, and this set is disjoint-edge since none of the triangles share an edge (in fact, they don t even share any nodes, so they certainly don t share any edges). Another simple bound is T n 1 2. Fix a node v and then pair up the remaining nodes into n 1 2 pairs. A triangle is formed by node v and the nodes of each pair, and the triangles formed in this way are disjoint in edges. We can use this bound to do Parts (b) - (d). (b) [2 points] For any triangle in G, what is the probability that it is balanced? Solution The probability that a triangle is balanced is equal to the probability that it has exactly 0 or 2 negative signs. Let I be an indicator random variable that counts the number of negative signs our triangle gets. Then P ( is balanced) = P (I = 0) + P (I = 2) = 1 ( ) = 1 2 The second equality follows because there is a ( 1 2 )3 = 1 8 chance that all 3 edges are positive, and there are ( 3 2) = 3 ways that the triangle can have exactly 2 negative signs, each of which happens with probability 1 8. (c) [2 points] Using the simple lower bound from part (i), give an upper bound on the probability that all of the triangles in T are balanced. Show that this probability approaches 0 as n. Solution If i and j (i j) are two different triangles in T, then P ( i is balanced) is independent of P ( j is balanced). Thus P (all triangles in T are balanced) = which clearly approaches 0 as n. ( ) 1 T 2 ( ) 1 n 3, 2 (d) [2 points] Explain why the last part implies that P (G B ) 0 as n. Solution This implies the desired result because all triangles in T being balanced is a necessary but not sufficient condition for the entire graph G being balanced. Thus P (G B ) P (all triangles in T are balanced), and since the right hand side approaches 0 as n, so does P (G B ).

10 CS224W: Analysis of Networks - Problem Set A Dynamic Process Model of Balance [5 points] If balanced signed networks do not show up by chance, as we showed in the previous part of the question, how do they arise? One class of mechanisms that researchers have proposed and studied are dynamic processes, in which signed networks can evolve over time to become more balanced. The following describes a very simple example of such a dynamic process: (I) Pick a triad at random. (II) If it s balanced, do nothing. (III) Otherwise, choose one of the edges uniformly at random and flip its sign (so that the triad becomes balanced). Consider the following claim: in this process, the number of balanced triads can never decrease. Is this true? If so, give a proof, otherwise give a counterexample. Solution The claim is false (i.e. the number of balanced triads can decrease). Consider an unbalanced triangle ABC on nodes A, B, and C such that sign(a, B) = +, sign(b, C) = +, sign(a, C) =. Let X 1,..., X k be k other nodes such that A and B are connected to them with positive edges: sign(a, X i ) = + and sign(b, X i ) = + for all i 1,..., k. Then if our process randomly (and unluckily) chooses the triad ABC and chooses to flip the sign of the edge (A, B) from positive to negative, it balances the triad ABC but unbalances all k of the triads ABXi. Thus the total number of balanced triads decreases by k Simulation [8 points] Now let us run simulations of the dynamic process on small networks. (I) Create a complete network on 10 nodes. (II) For each edge, choose a sign (+, ) at random (p = 1/2). (III) Run the dynamic process described in the previous part for 1,000,000 iterations. Repeat this process 100 times (so that you run the dynamic process described in the previous part for 100 different graphs generated from the G + model). What fraction of the networks end up balanced? [Hint: To check whether a network is balanced or not, remember that a graph is balanced if and only if it s possible to separate the nodes into two factions such that every pair of nodes in the same faction is linked by a positive edge and every pair of nodes in different factions is linked by a negative edge. To speed things up, you can stop the process once the network is balanced, because once the network becomes balanced it will never change.] Solution You should find that 100% of the networks end up balanced. This is because these dynamics always converge to a balanced state in finite time (on finite graphs). (You could get incredibly unlucky on a single run and run out of iterations before convergence, but this is very rare for such small networks.)

11 CS224W: Analysis of Networks - Problem Set The Role of New Nodes I [4 points] Another way signed networks can evolve over time is if new nodes join the network and create new signed edges to nodes already in the network. Consider the network shown in Figure 4. Is it possible to add a node D such that it forms signed edges with all existing nodes (A, B, and C), but isn t itself part of any unbalanced triangles? Justify your answer. A + + B - Figure 4: An unbalanced network with one triangle. C Solution No. A simple argument by cases does the trick: the edge (A, D) must be either positive or negative. If it s positive, then for ACD to be balanced (C, D) must be negative. But then if (B, D) is positive, then BCD is unbalanced; and if (B, D) is negative, then ABD is unbalanced. The argument for the other case (if we set (A, D) to be negative) is similar. 2.6 The Role of New Nodes II [5 points] Using your answer to the previous sub-problem, consider the following question. Take any complete signed network, on any number of nodes, that is unbalanced. When (if ever) is it possible for a new node X able to join the network and form edges to all existing nodes in such a way that it does not become involved in any unbalanced triangles? If it is possible, give an example. If it is not, give an argument explaining why. Solution No, it s not possible for a new node X to join the network and form edges to all existing nodes in such a way that it does not become involved in any unbalanced triangles. This is because any unbalanced complete signed network must have an unbalanced triangle on three nodes call them A, B, and C. ABC must have exactly 1 or 3 negative signs. If it has 1 negative sign, then by the reasoning in the previous question we know that X cannot create edges to A, B, and C without being involved in an unbalanced triangle. If ABC has 3 negative signs, then an argument similar to the one given in the previous question holds: if (A, D) is positive, then (C, X) must be negative to balance ACX, and then setting (B, X) to be positive unbalances ABX, while setting (B, X) to be negative unbalances BCX. Similar reasoning applies to the case where we set (A, X) to be negative. Thus there s no way for X to create links with all existing nodes such that it isn t involved with any unbalanced triangles, because it can t even create links with the nodes A, B, and C without becoming involved in at least one unbalanced triangle. What to submit Page 3: (part a) the count and fraction of triads in each type of opinion network;

12 CS224W: Analysis of Networks - Problem Set 2 12 (part b) the fraction of positive and negative edges in the network and the probability of each triad (part c) which triads appear more/less than the baseline values and a brief (2 3 sentence) explanation. Page 4: (part a) a simple lower bound for T. (part b) the probability that any triangle in G is balanced. (part c) an upper bound on the probability that all triangles in T are balanced, and show that the probability approaches 0 as n. (part d) 1 2 sentences explaining why P (G B ) 0 as n. Page 5: Page 6: Page 7: Page 8: Whether the number of balanced triads never decreases. A proof (if true) or a counterexample (if false). The fraction of networks that end up balanced. Whether it is possible to add a node D, and a justification. Whether it is possible for a new node X to join. An example (if possible) or argument (if impossible).

13 CS224W: Analysis of Networks - Problem Set Decision-based Cascades: A Local Election [30 points Anthony, Yokila] It s election season and two candidates, Candidate A and Candidate B, are in a hotly contested city council race in sunny New Suburb Town. You are a strategic advisor for Candidate A in charge of election forecasting and voter acquisition tactics. Based on careful modeling, you ve created two possible versions of the social graph of voters. Each graph has 10,000 nodes, where nodes are denoted by an integer ID between 0 and The edge lists of the graphs may be downloaded from: Graph 1: txt Graph 2: txt Both graphs are undirected. Given the hyper-partisan political climate of New Suburb Town, most voters have already made up their minds: 40% know they will vote for A, 40% know they will vote for B, and the remaining 20% are undecided. Each voter s support is determined by the last digit of their node id. If the last digit is 0 3, the node supports A. If the last digit is 4 7, the node supports B. And if the last digit is 8 or 9, the node is undecided. The undecided voters will go through a 10-day decision period where they choose a candidate based on the majority of their friends. The decision period works as follows: 1. The graphs are initialized with every voter s initial state (A, B, or undecided). 2. In each iteration, every undecided voter is decides on a candidate. Voters are processed in increasing order of node ID. For every undecided voter, if the majority of their friends support A, they now support A. If the majority of their friends support B, they now support B. Majority for A means that strictly more of their friends support A than the number of their friends supporting B, and vice versa for B (ignoring undecided friends). 3. If a voter has an equal number of friends supporting A and B, we assign support for A or B in alternating fashion, starting with A. In other words, as the voters are being processed in increasing order of node ID, the first tie leads to support for A, the second tie leads to support for B, the third for A, the fourth for B, and so on. This alternating assignment happens at a global level for the whole network, across all rounds. (Keep a single global variable that keeps track of whether the current alternating vote is A or B, and initialize it to A in the first round. Then as you iterate over nodes in order of increasing ID, whenever you assign a vote using this alternating variable, change its value afterwards.) 4. When processing the updates, use the values from the current iteration. For example, when updating the votes for node 10, you should use the updated votes for nodes 0 9 from the current iteration, and nodes 11 and onwards from the previous iteration. 5. There are 10 iterations of the process described above. 6. On the 11th day, it s election day, and the votes are counted.

14 CS224W: Analysis of Networks - Problem Set 2 14 Note that only the undecided voters go through the decision process. The decision process does not change the loyalties of those voters who have already made up their minds. 3.1 Basic setup and forecasting [8 points] Read in the two graphs and assign the initial vote configurations to the network. Then, perform the 10 iterations of the voting process. Which candidate wins in Graph 1, and by how many votes? Which candidate wins in Graph 2, and by how many votes? Solution In graph 1, candidate B wins by 96 votes. In graph 2, candidate B wins by 256 votes. 3.2 TV Advertising [8 points] You have amassed a substantial war chest of $9000, and you have decided to spend this money by showing ads on the local news. Unfortunately, only 100 New Suburb Townians watch the local news those with ids However, your ads are extremely persuasive, so anyone who sees the ad is immediately swayed to vote for candidate A regardless of his/her previous decision. You may spend $1000 at a time on ads. The first $1,000 reaches voters , the second $1000 reaches voters , and so on. In other words, the total of $k in advertising would reach voters with ids from 3000 to k This advertising happens before the decision period. After voters are persuaded by your ads, they never change their minds again. Simulate the effect of advertising spending on the two possible social graphs. First, read in the two graphs again and assign the initial configurations as before. Now, before the decision process, you purchase $k of ads and go through the decision process of counting votes. For each of the two social graphs, plot $k (the amount you spend) on the x-axis (for values k = 1000, 2000,..., 9000) and the number of votes you win by on the y-axis (that is, the number of votes for A less the number of votes for B). Put these on the same plot. What s the minimum amount you can spend to win the election in each of the two social graphs? Note that the TV advertising affects all of the voters who see the ads and not just those who are undecided. Solution On graph 1, the minimum amount to spend is $5,000 dollars. On graph 2, it is $7,000. See Figure Wining and Dining the High Rollers [8 points] TV advertising is only one way to spend your campaign war chest. You have another idea to have a very classy $1000 per plate event for the high rollers of New Suburb Town (the people with the highest degree in the social graph). You invite high rollers in order of how many people they know, and everyone that comes to your dinner is instantly persuaded to vote for candidate A regardless of his/her previous decision. This event will happen before the decision period. When there are ties between voters with the same degree, the high roller with lowest node ID get chosen first. Simulate the effect of the high roller dinner on the two graphs. First, read in the graphs and assign the initial configuration as before. Now, before the decision process, you spend $k on the fancy

15 CS224W: Analysis of Networks - Problem Set 2 15 #votes for A - #votes for B TV Advertising Graph 1 Graph Amount spent ($) Figure 5: Election outcomes with TV advertising dinner and then go through the decision process of counting votes. For each of the two social graphs, plot $k (the amount you spend) on the x-axis (for values k = 1000, 2000,..., 9000) and the number of votes you win by on the y-axis (that is, the number of votes for A less the number of votes for B). What s the minimum amount you can spend to win the election in each of the two social graphs? Note that wining and dining sways all the voters to vote for A and not just those who are undecided. Solution For graph 1, no amount up to $9,000 is sufficient to win the election. For Graph 2, the minimum amount is 6,000 dollars. See Figure 6. #votes for A - #votes for B Wining and Dining Graph 1 Graph Amount spent ($) Figure 6: Election outcomes with wining and dining. 3.4 Analysis [6 points] Plot the degree distributions on a log-log scale of the two graphs on the same plot (as in Question 1.1 on Problem Set 1). Although both graphs have roughly the same number of edges, one was

16 CS224W: Analysis of Networks - Problem Set 2 16 generated from an Erdős-Rényi Random graph model and the other was generated from a preferential attachment model. Which is which? In 1 2 sentences, briefly summarize how this information explains the results of Question 3.3. Solution The degree distributions are in Figure 7. Graph 1 was generated from the Erdős-Rényi Random (ER) graph model and Graph 2 was generated from a preferential attachment (PA) model. The graphs have roughly the same number of edges, but with the PA model, there are nodes with much higher degrees than in the ER model and that s why in PA model Wining and Dining is more effective Graph 1 Graph 2 p k k Figure 7: Degree distributions of the social graphs What to submit Page 9: Page 10: Page 11: Page 12: Which candidate wins and by how many votes in each graph. Plot of winning margin in each graph as a function of $k (on the same plot) The minimum amount you can spend to win the election in each graph Plot of winning margin in each graph as a function of $k (on the same plot) The minimum amount you can spend to win the election in each graph Log-log plot of the degree distributions (on the same plot), which graph corresponds to which random graph model 1 2 sentences on why the random graph models explain the results of Question 3.3.

Problem Set 2. General Instructions

Problem Set 2. General Instructions CS224W: Analysis of Networks Fall 2017 Problem Set 2 General Instructions Due 11:59pm PDT October 26, 2017 These questions require thought, but do not require long answers. Please be as concise as possible.

More information

CS 4349 Lecture October 18th, 2017

CS 4349 Lecture October 18th, 2017 CS 4349 Lecture October 18th, 2017 Main topics for #lecture include #minimum_spanning_trees. Prelude Homework 6 due today. Homework 7 due Wednesday, October 25th. Homework 7 has one normal homework problem.

More information

CSE547: Machine Learning for Big Data Spring Problem Set 1. Please read the homework submission policies.

CSE547: Machine Learning for Big Data Spring Problem Set 1. Please read the homework submission policies. CSE547: Machine Learning for Big Data Spring 2019 Problem Set 1 Please read the homework submission policies. 1 Spark (25 pts) Write a Spark program that implements a simple People You Might Know social

More information

CS261: Problem Set #2

CS261: Problem Set #2 CS261: Problem Set #2 Due by 11:59 PM on Tuesday, February 9, 2016 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. (2) Submission instructions:

More information

1 Counting triangles and cliques

1 Counting triangles and cliques ITCSC-INC Winter School 2015 26 January 2014 notes by Andrej Bogdanov Today we will talk about randomness and some of the surprising roles it plays in the theory of computing and in coding theory. Let

More information

Problem Set 4. General Instructions

Problem Set 4. General Instructions CS224W: Social and Information Network Analysis Fall 2013 Problem Set 4 Due 9:30am November 21, 2013 General Instructions These questions require thought, but do not require long answers. Please be as

More information

CS224W: Social and Information Network Analysis Jure Leskovec, Stanford University

CS224W: Social and Information Network Analysis Jure Leskovec, Stanford University CS224W: Social and Information Network Analysis Jure Leskovec, Stanford University http://cs224w.stanford.edu 10/10/2011 Jure Leskovec, Stanford CS224W: Social and Information Network Analysis, http://cs224w.stanford.edu

More information

Order from Chaos. Nebraska Wesleyan University Mathematics Circle

Order from Chaos. Nebraska Wesleyan University Mathematics Circle Order from Chaos Nebraska Wesleyan University Mathematics Circle Austin Mohr Department of Mathematics Nebraska Wesleyan University February 2, 20 The (, )-Puzzle Start by drawing six dots at the corners

More information

Social and Information Network Analysis Positive and Negative Relationships

Social and Information Network Analysis Positive and Negative Relationships Social and Information Network Analysis Positive and Negative Relationships Cornelia Caragea Department of Computer Science and Engineering University of North Texas June 14, 2016 To Recap Triadic Closure

More information

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18 601.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18 22.1 Introduction We spent the last two lectures proving that for certain problems, we can

More information

Graph Structure Over Time

Graph Structure Over Time Graph Structure Over Time Observing how time alters the structure of the IEEE data set Priti Kumar Computer Science Rensselaer Polytechnic Institute Troy, NY Kumarp3@rpi.edu Abstract This paper examines

More information

1 More configuration model

1 More configuration model 1 More configuration model In the last lecture, we explored the definition of the configuration model, a simple method for drawing networks from the ensemble, and derived some of its mathematical properties.

More information

MIDTERM EXAMINATION Networked Life (NETS 112) November 21, 2013 Prof. Michael Kearns

MIDTERM EXAMINATION Networked Life (NETS 112) November 21, 2013 Prof. Michael Kearns MIDTERM EXAMINATION Networked Life (NETS 112) November 21, 2013 Prof. Michael Kearns This is a closed-book exam. You should have no material on your desk other than the exam itself and a pencil or pen.

More information

Chapter 3. Set Theory. 3.1 What is a Set?

Chapter 3. Set Theory. 3.1 What is a Set? Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any

More information

Order from Chaos. University of Nebraska-Lincoln Discrete Mathematics Seminar

Order from Chaos. University of Nebraska-Lincoln Discrete Mathematics Seminar Order from Chaos University of Nebraska-Lincoln Discrete Mathematics Seminar Austin Mohr Department of Mathematics Nebraska Wesleyan University February 8, 20 The (, )-Puzzle Start by drawing six dots

More information

CS224W: Analysis of Networks Jure Leskovec, Stanford University

CS224W: Analysis of Networks Jure Leskovec, Stanford University CS224W: Analysis of Networks Jure Leskovec, Stanford University http://cs224w.stanford.edu 11/13/17 Jure Leskovec, Stanford CS224W: Analysis of Networks, http://cs224w.stanford.edu 2 Observations Models

More information

MATH 1340 Mathematics & Politics

MATH 1340 Mathematics & Politics MATH 1340 Mathematics & Politics Lecture 5 June 26, 2015 Slides prepared by Iian Smythe for MATH 1340, Summer 2015, at Cornell University 1 An example (Exercise 2.1 in R&U) Consider the following profile

More information

General Instructions. Questions

General Instructions. Questions CS246: Mining Massive Data Sets Winter 2018 Problem Set 2 Due 11:59pm February 8, 2018 Only one late period is allowed for this homework (11:59pm 2/13). General Instructions Submission instructions: These

More information

Homework 4: Clustering, Recommenders, Dim. Reduction, ML and Graph Mining (due November 19 th, 2014, 2:30pm, in class hard-copy please)

Homework 4: Clustering, Recommenders, Dim. Reduction, ML and Graph Mining (due November 19 th, 2014, 2:30pm, in class hard-copy please) Virginia Tech. Computer Science CS 5614 (Big) Data Management Systems Fall 2014, Prakash Homework 4: Clustering, Recommenders, Dim. Reduction, ML and Graph Mining (due November 19 th, 2014, 2:30pm, in

More information

Positive and Negative Links

Positive and Negative Links Positive and Negative Links Web Science (VU) (707.000) Elisabeth Lex KTI, TU Graz May 4, 2015 Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 1 / 66 Outline 1 Repetition 2 Motivation 3 Structural Balance

More information

CS264: Homework #4. Due by midnight on Wednesday, October 22, 2014

CS264: Homework #4. Due by midnight on Wednesday, October 22, 2014 CS264: Homework #4 Due by midnight on Wednesday, October 22, 2014 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. (2) Turn in your solutions

More information

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14 600.363 Introduction to Algorithms / 600.463 Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14 23.1 Introduction We spent last week proving that for certain problems,

More information

CS103 Handout 50 Fall 2018 November 30, 2018 Problem Set 9

CS103 Handout 50 Fall 2018 November 30, 2018 Problem Set 9 CS103 Handout 50 Fall 2018 November 30, 2018 Problem Set 9 What problems are beyond our capacity to solve? Why are they so hard? And why is anything that we've discussed this quarter at all practically

More information

Divisibility Rules and Their Explanations

Divisibility Rules and Their Explanations Divisibility Rules and Their Explanations Increase Your Number Sense These divisibility rules apply to determining the divisibility of a positive integer (1, 2, 3, ) by another positive integer or 0 (although

More information

Homework /681: Artificial Intelligence (Fall 2017) Out: October 18, 2017 Due: October 29, 2017 at 11:59PM

Homework /681: Artificial Intelligence (Fall 2017) Out: October 18, 2017 Due: October 29, 2017 at 11:59PM Homework 2 15-381/681: Artificial Intelligence (Fall 2017) Out: October 18, 2017 Due: October 29, 2017 at 11:59PM Homework Policies Homework is due on Autolab by the posted deadline. Assignments submitted

More information

Mathematics of networks. Artem S. Novozhilov

Mathematics of networks. Artem S. Novozhilov Mathematics of networks Artem S. Novozhilov August 29, 2013 A disclaimer: While preparing these lecture notes, I am using a lot of different sources for inspiration, which I usually do not cite in the

More information

14.1 Encoding for different models of computation

14.1 Encoding for different models of computation Lecture 14 Decidable languages In the previous lecture we discussed some examples of encoding schemes, through which various objects can be represented by strings over a given alphabet. We will begin this

More information

Fundamentals of Operations Research. Prof. G. Srinivasan. Department of Management Studies. Indian Institute of Technology, Madras. Lecture No.

Fundamentals of Operations Research. Prof. G. Srinivasan. Department of Management Studies. Indian Institute of Technology, Madras. Lecture No. Fundamentals of Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Lecture No. # 13 Transportation Problem, Methods for Initial Basic Feasible

More information

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Scan Converting Lines, Circles and Ellipses Hello everybody, welcome again

More information

COMP3121/3821/9101/ s1 Assignment 1

COMP3121/3821/9101/ s1 Assignment 1 Sample solutions to assignment 1 1. (a) Describe an O(n log n) algorithm (in the sense of the worst case performance) that, given an array S of n integers and another integer x, determines whether or not

More information

BMO Round 1 Problem 6 Solutions

BMO Round 1 Problem 6 Solutions BMO 2005 2006 Round 1 Problem 6 Solutions Joseph Myers November 2005 Introduction Problem 6 is: 6. Let T be a set of 2005 coplanar points with no three collinear. Show that, for any of the 2005 points,

More information

CPSC 536N: Randomized Algorithms Term 2. Lecture 4

CPSC 536N: Randomized Algorithms Term 2. Lecture 4 CPSC 536N: Randomized Algorithms 2011-12 Term 2 Prof. Nick Harvey Lecture 4 University of British Columbia In today s lecture we will see two applications of negative binomially distributed random variables.

More information

Lecture 3: Linear Classification

Lecture 3: Linear Classification Lecture 3: Linear Classification Roger Grosse 1 Introduction Last week, we saw an example of a learning task called regression. There, the goal was to predict a scalar-valued target from a set of features.

More information

(Refer Slide Time: 01.26)

(Refer Slide Time: 01.26) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture # 22 Why Sorting? Today we are going to be looking at sorting.

More information

Equations of planes in

Equations of planes in Roberto s Notes on Linear Algebra Chapter 6: Lines, planes and other straight objects Section Equations of planes in What you need to know already: What vectors and vector operations are. What linear systems

More information

Topic. Section 4.1 (3, 4)

Topic. Section 4.1 (3, 4) Topic.. California Standards: 6.0: Students graph a linear equation and compute the x- and y-intercepts (e.g., graph x + 6y = ). They are also able to sketch the region defined by linear inequality (e.g.,

More information

Graph Theory Part Two

Graph Theory Part Two Graph Theory Part Two Recap from Last Time A graph is a mathematical structure for representing relationships. Nodes A graph consists of a set of nodes (or vertices) connected by edges (or arcs) A graph

More information

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points MC02 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/1 68 points + 6 extra credit points 1. [CH] p. 1, #1... a. In each case, for the two graphs you say are isomorphic, justify it by labeling their vertices

More information

U.C. Berkeley CS170 : Algorithms, Fall 2013 Midterm 1 Professor: Satish Rao October 10, Midterm 1 Solutions

U.C. Berkeley CS170 : Algorithms, Fall 2013 Midterm 1 Professor: Satish Rao October 10, Midterm 1 Solutions U.C. Berkeley CS170 : Algorithms, Fall 2013 Midterm 1 Professor: Satish Rao October 10, 2013 Midterm 1 Solutions 1 True/False 1. The Mayan base 20 system produces representations of size that is asymptotically

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

Problem set 2. Problem 1. Problem 2. Problem 3. CS261, Winter Instructor: Ashish Goel.

Problem set 2. Problem 1. Problem 2. Problem 3. CS261, Winter Instructor: Ashish Goel. CS261, Winter 2017. Instructor: Ashish Goel. Problem set 2 Electronic submission to Gradescope due 11:59pm Thursday 2/16. Form a group of 2-3 students that is, submit one homework with all of your names.

More information

Distributed minimum spanning tree problem

Distributed minimum spanning tree problem Distributed minimum spanning tree problem Juho-Kustaa Kangas 24th November 2012 Abstract Given a connected weighted undirected graph, the minimum spanning tree problem asks for a spanning subtree with

More information

COSC 311: ALGORITHMS HW1: SORTING

COSC 311: ALGORITHMS HW1: SORTING COSC 311: ALGORITHMS HW1: SORTIG Solutions 1) Theoretical predictions. Solution: On randomly ordered data, we expect the following ordering: Heapsort = Mergesort = Quicksort (deterministic or randomized)

More information

6.001 Notes: Section 4.1

6.001 Notes: Section 4.1 6.001 Notes: Section 4.1 Slide 4.1.1 In this lecture, we are going to take a careful look at the kinds of procedures we can build. We will first go back to look very carefully at the substitution model,

More information

Catalan Numbers. Table 1: Balanced Parentheses

Catalan Numbers. Table 1: Balanced Parentheses Catalan Numbers Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles November, 00 We begin with a set of problems that will be shown to be completely equivalent. The solution to each problem

More information

Lesson 18: There is Only One Line Passing Through a Given Point with a Given

Lesson 18: There is Only One Line Passing Through a Given Point with a Given Lesson 18: There is Only One Line Passing Through a Given Point with a Given Student Outcomes Students graph equations in the form of using information about slope and intercept. Students know that if

More information

P Is Not Equal to NP. ScholarlyCommons. University of Pennsylvania. Jon Freeman University of Pennsylvania. October 1989

P Is Not Equal to NP. ScholarlyCommons. University of Pennsylvania. Jon Freeman University of Pennsylvania. October 1989 University of Pennsylvania ScholarlyCommons Technical Reports (CIS) Department of Computer & Information Science October 1989 P Is Not Equal to NP Jon Freeman University of Pennsylvania Follow this and

More information

Topic C. Communicating the Precision of Measured Numbers

Topic C. Communicating the Precision of Measured Numbers Topic C. Communicating the Precision of Measured Numbers C. page 1 of 14 Topic C. Communicating the Precision of Measured Numbers This topic includes Section 1. Reporting measurements Section 2. Rounding

More information

Math 340 Fall 2014, Victor Matveev. Binary system, round-off errors, loss of significance, and double precision accuracy.

Math 340 Fall 2014, Victor Matveev. Binary system, round-off errors, loss of significance, and double precision accuracy. Math 340 Fall 2014, Victor Matveev Binary system, round-off errors, loss of significance, and double precision accuracy. 1. Bits and the binary number system A bit is one digit in a binary representation

More information

Fundamentals of Operations Research. Prof. G. Srinivasan. Department of Management Studies. Indian Institute of Technology Madras.

Fundamentals of Operations Research. Prof. G. Srinivasan. Department of Management Studies. Indian Institute of Technology Madras. Fundamentals of Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology Madras Lecture No # 06 Simplex Algorithm Initialization and Iteration (Refer Slide

More information

Today s Topics. Percentile ranks and percentiles. Standardized scores. Using standardized scores to estimate percentiles

Today s Topics. Percentile ranks and percentiles. Standardized scores. Using standardized scores to estimate percentiles Today s Topics Percentile ranks and percentiles Standardized scores Using standardized scores to estimate percentiles Using µ and σ x to learn about percentiles Percentiles, standardized scores, and the

More information

Extra Practice Problems 2

Extra Practice Problems 2 CS103 Handout 31 Fall 2018 October 29, 2018 Extra Practice Problems 2 Here's a set of a bunch of practice problems you can work through to solidify your understanding of the topics from Problem Sets Three,

More information

Midterm 2. Replace by cover page.

Midterm 2. Replace by cover page. Midterm 2 Replace by cover page. Replace by conduct during examinations page. WRITE UGRAD IDs HERE (-1 mark if any missing or incorrect; use only the boxes you need) UGRAD ID #1: UGRAD ID #2: UGRAD ID

More information

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Greedy Algorithms (continued) The best known application where the greedy algorithm is optimal is surely

More information

Reading 1 : Introduction

Reading 1 : Introduction CS/Math 240: Introduction to Discrete Mathematics Fall 2015 Instructors: Beck Hasti and Gautam Prakriya Reading 1 : Introduction Welcome to CS 240, an introduction to discrete mathematics. This reading

More information

1 Achieving IND-CPA security

1 Achieving IND-CPA security ISA 562: Information Security, Theory and Practice Lecture 2 1 Achieving IND-CPA security 1.1 Pseudorandom numbers, and stateful encryption As we saw last time, the OTP is perfectly secure, but it forces

More information

Final Exam in Algorithms and Data Structures 1 (1DL210)

Final Exam in Algorithms and Data Structures 1 (1DL210) Final Exam in Algorithms and Data Structures 1 (1DL210) Department of Information Technology Uppsala University February 0th, 2012 Lecturers: Parosh Aziz Abdulla, Jonathan Cederberg and Jari Stenman Location:

More information

Recursively Enumerable Languages, Turing Machines, and Decidability

Recursively Enumerable Languages, Turing Machines, and Decidability Recursively Enumerable Languages, Turing Machines, and Decidability 1 Problem Reduction: Basic Concepts and Analogies The concept of problem reduction is simple at a high level. You simply take an algorithm

More information

3-1 Writing Linear Equations

3-1 Writing Linear Equations 3-1 Writing Linear Equations Suppose you have a job working on a monthly salary of $2,000 plus commission at a car lot. Your commission is 5%. What would be your pay for selling the following in monthly

More information

Section 6.3: Further Rules for Counting Sets

Section 6.3: Further Rules for Counting Sets Section 6.3: Further Rules for Counting Sets Often when we are considering the probability of an event, that event is itself a union of other events. For example, suppose there is a horse race with three

More information

CS264: Homework #1. Due by midnight on Thursday, January 19, 2017

CS264: Homework #1. Due by midnight on Thursday, January 19, 2017 CS264: Homework #1 Due by midnight on Thursday, January 19, 2017 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. See the course site for submission

More information

Name Course Days/Start Time

Name Course Days/Start Time Name Course Days/Start Time Mini-Project : The Library of Functions In your previous math class, you learned to graph equations containing two variables by finding and plotting points. In this class, we

More information

CS261: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem

CS261: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem CS61: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem Tim Roughgarden February 5, 016 1 The Traveling Salesman Problem (TSP) In this lecture we study a famous computational problem,

More information

Frequency Distributions

Frequency Distributions Displaying Data Frequency Distributions After collecting data, the first task for a researcher is to organize and summarize the data so that it is possible to get a general overview of the results. Remember,

More information

Modular Arithmetic. is just the set of remainders we can get when we divide integers by n

Modular Arithmetic. is just the set of remainders we can get when we divide integers by n 20181004 Modular Arithmetic We are accustomed to performing arithmetic on infinite sets of numbers. But sometimes we need to perform arithmetic on a finite set, and we need it to make sense and be consistent

More information

CS1132 Fall 2009 Assignment 1. 1 The Monty Hall Dillemma. 1.1 Programming the game

CS1132 Fall 2009 Assignment 1. 1 The Monty Hall Dillemma. 1.1 Programming the game CS1132 Fall 2009 Assignment 1 Adhere to the Code of Academic Integrity. You may discuss background issues and general solution strategies with others and seek help from course staff, but the homework you

More information

Repetition Through Recursion

Repetition Through Recursion Fundamentals of Computer Science I (CS151.02 2007S) Repetition Through Recursion Summary: In many algorithms, you want to do things again and again and again. For example, you might want to do something

More information

Treaps. 1 Binary Search Trees (BSTs) CSE341T/CSE549T 11/05/2014. Lecture 19

Treaps. 1 Binary Search Trees (BSTs) CSE341T/CSE549T 11/05/2014. Lecture 19 CSE34T/CSE549T /05/04 Lecture 9 Treaps Binary Search Trees (BSTs) Search trees are tree-based data structures that can be used to store and search for items that satisfy a total order. There are many types

More information

Erdős-Rényi Model for network formation

Erdős-Rényi Model for network formation Network Science: Erdős-Rényi Model for network formation Ozalp Babaoglu Dipartimento di Informatica Scienza e Ingegneria Università di Bologna www.cs.unibo.it/babaoglu/ Why model? Simpler representation

More information

CSE 547: Machine Learning for Big Data Spring Problem Set 2. Please read the homework submission policies.

CSE 547: Machine Learning for Big Data Spring Problem Set 2. Please read the homework submission policies. CSE 547: Machine Learning for Big Data Spring 2019 Problem Set 2 Please read the homework submission policies. 1 Principal Component Analysis and Reconstruction (25 points) Let s do PCA and reconstruct

More information

MATH 54 - LECTURE 4 DAN CRYTSER

MATH 54 - LECTURE 4 DAN CRYTSER MATH 54 - LECTURE 4 DAN CRYTSER Introduction In this lecture we review properties and examples of bases and subbases. Then we consider ordered sets and the natural order topology that one can lay on an

More information

The Probabilistic Method

The Probabilistic Method The Probabilistic Method Po-Shen Loh June 2010 1 Warm-up 1. (Russia 1996/4 In the Duma there are 1600 delegates, who have formed 16000 committees of 80 persons each. Prove that one can find two committees

More information

Paths, Circuits, and Connected Graphs

Paths, Circuits, and Connected Graphs Paths, Circuits, and Connected Graphs Paths and Circuits Definition: Let G = (V, E) be an undirected graph, vertices u, v V A path of length n from u to v is a sequence of edges e i = {u i 1, u i} E for

More information

EC121 Mathematical Techniques A Revision Notes

EC121 Mathematical Techniques A Revision Notes EC Mathematical Techniques A Revision Notes EC Mathematical Techniques A Revision Notes Mathematical Techniques A begins with two weeks of intensive revision of basic arithmetic and algebra, to the level

More information

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 24: Online Algorithms

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 24: Online Algorithms princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 24: Online Algorithms Lecturer: Matt Weinberg Scribe:Matt Weinberg Lecture notes sourced from Avrim Blum s lecture notes here: http://www.cs.cmu.edu/

More information

ISA 562: Information Security, Theory and Practice. Lecture 1

ISA 562: Information Security, Theory and Practice. Lecture 1 ISA 562: Information Security, Theory and Practice Lecture 1 1 Encryption schemes 1.1 The semantics of an encryption scheme. A symmetric key encryption scheme allows two parties that share a secret key

More information

Goal of the course: The goal is to learn to design and analyze an algorithm. More specifically, you will learn:

Goal of the course: The goal is to learn to design and analyze an algorithm. More specifically, you will learn: CS341 Algorithms 1. Introduction Goal of the course: The goal is to learn to design and analyze an algorithm. More specifically, you will learn: Well-known algorithms; Skills to analyze the correctness

More information

Homework #5 Algorithms I Spring 2017

Homework #5 Algorithms I Spring 2017 Homework #5 Algorithms I 600.463 Spring 2017 Due on: Saturday, March 18th, 11:59pm Late submissions: will NOT be accepted Format: Please start each problem on a new page. Where to submit: On Gradescope,

More information

CIS 121 Data Structures and Algorithms with Java Spring 2018

CIS 121 Data Structures and Algorithms with Java Spring 2018 CIS 121 Data Structures and Algorithms with Java Spring 2018 Homework 2 Thursday, January 18 Due Monday, January 29 by 11:59 PM 7 Required Problems (85 points), and Style and Tests (15 points) DO NOT modify

More information

Unit 1, Lesson 1: Moving in the Plane

Unit 1, Lesson 1: Moving in the Plane Unit 1, Lesson 1: Moving in the Plane Let s describe ways figures can move in the plane. 1.1: Which One Doesn t Belong: Diagrams Which one doesn t belong? 1.2: Triangle Square Dance m.openup.org/1/8-1-1-2

More information

Table of Laplace Transforms

Table of Laplace Transforms Table of Laplace Transforms 1 1 2 3 4, p > -1 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Heaviside Function 27 28. Dirac Delta Function 29 30. 31 32. 1 33 34. 35 36. 37 Laplace Transforms

More information

LP-Modelling. dr.ir. C.A.J. Hurkens Technische Universiteit Eindhoven. January 30, 2008

LP-Modelling. dr.ir. C.A.J. Hurkens Technische Universiteit Eindhoven. January 30, 2008 LP-Modelling dr.ir. C.A.J. Hurkens Technische Universiteit Eindhoven January 30, 2008 1 Linear and Integer Programming After a brief check with the backgrounds of the participants it seems that the following

More information

MergeSort, Recurrences, Asymptotic Analysis Scribe: Michael P. Kim Date: April 1, 2015

MergeSort, Recurrences, Asymptotic Analysis Scribe: Michael P. Kim Date: April 1, 2015 CS161, Lecture 2 MergeSort, Recurrences, Asymptotic Analysis Scribe: Michael P. Kim Date: April 1, 2015 1 Introduction Today, we will introduce a fundamental algorithm design paradigm, Divide-And-Conquer,

More information

MAT 003 Brian Killough s Instructor Notes Saint Leo University

MAT 003 Brian Killough s Instructor Notes Saint Leo University MAT 003 Brian Killough s Instructor Notes Saint Leo University Success in online courses requires self-motivation and discipline. It is anticipated that students will read the textbook and complete sample

More information

Incompatibility Dimensions and Integration of Atomic Commit Protocols

Incompatibility Dimensions and Integration of Atomic Commit Protocols The International Arab Journal of Information Technology, Vol. 5, No. 4, October 2008 381 Incompatibility Dimensions and Integration of Atomic Commit Protocols Yousef Al-Houmaily Department of Computer

More information

Models of Network Formation. Networked Life NETS 112 Fall 2017 Prof. Michael Kearns

Models of Network Formation. Networked Life NETS 112 Fall 2017 Prof. Michael Kearns Models of Network Formation Networked Life NETS 112 Fall 2017 Prof. Michael Kearns Roadmap Recently: typical large-scale social and other networks exhibit: giant component with small diameter sparsity

More information

15-451/651: Design & Analysis of Algorithms October 11, 2018 Lecture #13: Linear Programming I last changed: October 9, 2018

15-451/651: Design & Analysis of Algorithms October 11, 2018 Lecture #13: Linear Programming I last changed: October 9, 2018 15-451/651: Design & Analysis of Algorithms October 11, 2018 Lecture #13: Linear Programming I last changed: October 9, 2018 In this lecture, we describe a very general problem called linear programming

More information

n! = 1 * 2 * 3 * 4 * * (n-1) * n

n! = 1 * 2 * 3 * 4 * * (n-1) * n The Beauty and Joy of Computing 1 Lab Exercise 9: Problem self-similarity and recursion Objectives By completing this lab exercise, you should learn to Recognize simple self-similar problems which are

More information

9. MATHEMATICIANS ARE FOND OF COLLECTIONS

9. MATHEMATICIANS ARE FOND OF COLLECTIONS get the complete book: http://wwwonemathematicalcatorg/getfulltextfullbookhtm 9 MATHEMATICIANS ARE FOND OF COLLECTIONS collections Collections are extremely important in life: when we group together objects

More information

Hi everyone. Starting this week I'm going to make a couple tweaks to how section is run. The first thing is that I'm going to go over all the slides

Hi everyone. Starting this week I'm going to make a couple tweaks to how section is run. The first thing is that I'm going to go over all the slides Hi everyone. Starting this week I'm going to make a couple tweaks to how section is run. The first thing is that I'm going to go over all the slides for both problems first, and let you guys code them

More information

Lecture 6: Graph Properties

Lecture 6: Graph Properties Lecture 6: Graph Properties Rajat Mittal IIT Kanpur In this section, we will look at some of the combinatorial properties of graphs. Initially we will discuss independent sets. The bulk of the content

More information

Introduction to Algorithms April 21, 2004 Massachusetts Institute of Technology. Quiz 2 Solutions

Introduction to Algorithms April 21, 2004 Massachusetts Institute of Technology. Quiz 2 Solutions Introduction to Algorithms April 21, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Quiz 2 Solutions Quiz 2 Solutions Do not open this quiz booklet

More information

COMP 161 Lecture Notes 16 Analyzing Search and Sort

COMP 161 Lecture Notes 16 Analyzing Search and Sort COMP 161 Lecture Notes 16 Analyzing Search and Sort In these notes we analyze search and sort. Counting Operations When we analyze the complexity of procedures we re determine the order of the number of

More information

CS224W: Social and Information Network Analysis Jure Leskovec, Stanford University, y http://cs224w.stanford.edu Due in 1 week: Oct 4 in class! The idea of the reaction papers is: To familiarize yourselves

More information

Discrete Mathematics and Probability Theory Summer 2016 Dinh, Psomas, and Ye HW 2

Discrete Mathematics and Probability Theory Summer 2016 Dinh, Psomas, and Ye HW 2 CS 70 Discrete Mathematics and Probability Theory Summer 2016 Dinh, Psomas, and Ye HW 2 Due Tuesday July 5 at 1:59PM 1. (8 points: 3/5) Hit or miss For each of the claims and proofs below, state whether

More information

Solutions to Math 381 Quiz 2

Solutions to Math 381 Quiz 2 Solutions to Math 381 Quiz 2 November 7, 2018 (1) In one sentence, what is the goal of your class project? Each team has a different answer here. (2) Write a function in Python which computes a linear

More information

1 Leaffix Scan, Rootfix Scan, Tree Size, and Depth

1 Leaffix Scan, Rootfix Scan, Tree Size, and Depth Lecture 17 Graph Contraction I: Tree Contraction Parallel and Sequential Data Structures and Algorithms, 15-210 (Spring 2012) Lectured by Kanat Tangwongsan March 20, 2012 In this lecture, we will explore

More information

IMPORTANT: Circle the last two letters of your class account:

IMPORTANT: Circle the last two letters of your class account: Fall 2002 University of California, Berkeley College of Engineering Computer Science Division EECS Prof. Michael J. Franklin MIDTERM AND SOLUTIONS CS 186 Introduction to Database Systems NAME: Norm L.

More information

CSE331 Autumn 2011 Midterm Examination October 28, 2011

CSE331 Autumn 2011 Midterm Examination October 28, 2011 CSE331 Autumn 2011 Midterm Examination October 28, 2011 50 minutes; 75 points total. Open note, open book, closed neighbor, closed anything electronic (computers, webenabled phones, etc.) An easier-to-read

More information