Project 1 : Phase 1 22C:021 CS II Data Structures.

Slides:



Advertisements
Similar presentations
CS 206 Introduction to Computer Science II 09 / 05 / 2008 Instructor: Michael Eckmann.
Advertisements

CS 206 Introduction to Computer Science II 04 / 01 / 2009 Instructor: Michael Eckmann.
* Bellman-Ford: single-source shortest distance * O(VE) for graphs with negative edges * Detects negative weight cycles * Floyd-Warshall: All pairs shortest.
Analysis and Modeling of Social Networks Foudalis Ilias.
Edited by Malak Abdullah Jordan University of Science and Technology Data Structures Using C++ 2E Chapter 12 Graphs.
CS171 Introduction to Computer Science II Graphs Strike Back.
Distributed Breadth-First Search with 2-D Partitioning Edmond Chow, Keith Henderson, Andy Yoo Lawrence Livermore National Laboratory LLNL Technical report.
CSE 522 – Algorithmic and Economic Aspects of the Internet Instructors: Nicole Immorlica Mohammad Mahdian.
Networks. Graphs (undirected, unweighted) has a set of vertices V has a set of undirected, unweighted edges E graph G = (V, E), where.
CS2422 Assembly Language and System Programming Linking Loader Department of Computer Science National Tsing Hua University.
Parallel Routing Bruce, Chiu-Wing Sham. Overview Background Routing in parallel computers Routing in hypercube network –Bit-fixing routing algorithm –Randomized.
Cluster Analysis.  What is Cluster Analysis?  Types of Data in Cluster Analysis  A Categorization of Major Clustering Methods  Partitioning Methods.
Sampling from Large Graphs. Motivation Our purpose is to analyze and model social networks –An online social network graph is composed of millions of.
Spring 2010CS 2251 Graphs Chapter 10. Spring 2010CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs.
CS 206 Introduction to Computer Science II 11 / 03 / 2008 Instructor: Michael Eckmann.
Chapter 9 Graph algorithms Lec 21 Dec 1, Sample Graph Problems Path problems. Connectedness problems. Spanning tree problems.
CISC667, F05, Lec15, Liao1 CISC 667 Intro to Bioinformatics (Fall 2005) Phylogenetic Trees (II) Distance-based methods.
Graph, Search Algorithms Ka-Lok Ng Department of Bioinformatics Asia University.
CS 206 Introduction to Computer Science II 11 / 05 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 03 / 25 / 2009 Instructor: Michael Eckmann.
Fall 2007CS 2251 Graphs Chapter 12. Fall 2007CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs To.
CS 206 Introduction to Computer Science II 03 / 30 / 2009 Instructor: Michael Eckmann.
Dijkstra’s Algorithm Slide Courtesy: Uwash, UT 1.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Clustering Unsupervised learning Generating “classes”
The Erdös-Rényi models
Computer Science 112 Fundamentals of Programming II Graph Algorithms.
Biological Networks Lectures 6-7 : February 02, 2010 Graph Algorithms Review Global Network Properties Local Network Properties 1.
Distributed Coloring Discrete Mathematics and Algorithms Seminar Melih Onus November
1 Converting Categories to Numbers for Approximate Nearest Neighbor Search 嘉義大學資工系 郭煌政 2004/10/20.
Small-world networks. What is it? Everyone talks about the small world phenomenon, but truly what is it? There are three landmark papers: Stanley Milgram.
Shortest Path Problem Weight of the graph –Nonnegative real number assigned to the edges connecting to vertices Weighted graphs –When a graph.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
ANALYSIS AND IMPLEMENTATION OF GRAPH COLORING ALGORITHMS FOR REGISTER ALLOCATION By, Sumeeth K. C Vasanth K.
Lists II. List ADT When using an array-based implementation of the List ADT we encounter two problems; 1. Overflow 2. Wasted Space These limitations are.
A genetic approach to the automatic clustering problem Author : Lin Yu Tseng Shiueng Bien Yang Graduate : Chien-Ming Hsiao.
3. SMALL WORLDS The Watts-Strogatz model. Watts-Strogatz, Nature 1998 Small world: the average shortest path length in a real network is small Six degrees.
ITEC 2620A Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: 2620a.htm Office: TEL 3049.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Class 9: Barabasi-Albert Model-Part I
Lecture 10: Network models CS 765: Complex Networks Slides are modified from Networks: Theory and Application by Lada Adamic.
ENEE150 – 0102 ANDREW GOFFIN Project 4 & Function Pointers.
1 Directed Graphs Chapter 8. 2 Objectives You will be able to: Say what a directed graph is. Describe two ways to represent a directed graph: Adjacency.
Graphs. Introduction Graphs are a collection of vertices and edges Graphs are a collection of vertices and edges The solid circles are the vertices A,
– Graphs 1 Graph Categories Strong Components Example of Digraph
Project 2 22C:021 Computer Science II : Data Structures.
Graph Theory. undirected graph node: a, b, c, d, e, f edge: (a, b), (a, c), (b, c), (b, e), (c, d), (c, f), (d, e), (d, f), (e, f) subgraph.
Community detection via random walk Draft slides.
Informatics tools in network science
Network Partition –Finding modules of the network. Graph Clustering –Partition graphs according to the connectivity. –Nodes within a cluster is highly.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
7 Finding Bridge in a Graph. What is a bridge ? A C D B F G E.
DATA MINING: CLUSTER ANALYSIS (3) Instructor: Dr. Chun Yu School of Statistics Jiangxi University of Finance and Economics Fall 2015.
Direct Variation Section 5-2. Goals Goal To write and graph an equation of a direct variation. Rubric Level 1 – Know the goals. Level 2 – Fully understand.
Project CS 116 Section 4 Deadline 04/28 11:59PM Points: 12.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
Lecture 23: Structure of Networks
Lecture 23: Structure of Networks
CSE 4705 Artificial Intelligence
Network Science: A Short Introduction i3 Workshop
The Watts-Strogatz model
Greedy Algorithms / Dijkstra’s Algorithm Yin Tat Lee
Data Structures – Stacks and Queus
Why Social Graphs Are Different Communities Finding Triangles
Department of Computer Science University of York
Clustering 77B Recommender Systems
Cluster Validity For supervised classification we have a variety of measures to evaluate how good our model is Accuracy, precision, recall For cluster.
Lecture 23: Structure of Networks
Local Clustering Coefficient
Clustering The process of grouping samples so that the samples are similar within each group.
Presentation transcript:

Project 1 : Phase 1 22C:021 CS II Data Structures

Project 1 Plan Part I (for week 1) – Turn the myListGraph class into a generic class. – Implement clusteringCoefficient(v) and clusteringCoefficient() – Add an additional data member to the myListGraph class called “locations” to keep track of an array of points. – Add the constructor: myListGraph(n, d, p) to myListGraph.

Project 1 Plan Part II (for week 2) – Implement the methods in the myListGraph class to compute average path length. Part II (for week 3) – Run experiments, gather data, make plots, and write report.

Making myListGraph Generic The List class needs to be made generic to store values of type supplied by the user of class The LinkList class needs to be made generic to pass down values of correct type to Link The myListGraph class needs to be made generic to pass down values of correct type to LinkList.

Making myListGraph Generic Correct way of instantiating arrays of Generic types: theItems = (AnyType[]) new Object[ newCapacity ];

Code to Test Generic myListGraph Will soon be available on class webpage

Clustering Coefficient Algorithm For a vertex V with n neighbors, there exist Q = (n choose 2) = n(n – 1) / 2 total pairs Find total number of pairs of neighbors that actually have connections, call this P Compute the clustering cofficient C v for V as C v = P / Q The algorithm to find such pairs of connected nodes is similar to listTriangles from Assignment 2

Why do we need “locations” We need to know the locations of points within our square to find distances between them. This variable will store the location of i th vertex at index i in “locations” array. Computing distances between points – Distance = Sqrt ((x 2 - x 1 ) 2 + (y 2 - y 1 ) 2 ) Review project 1 problem to see why distances between points is important

Using Probability factor While generating a graph, probably factor p determines if we connect to another of our neighbors or to a non-neighbor To use this factor, generate a floating random number and compare it with p – If the generated number is less than p, connect to a non-neighbor – Otherwise, connect to your neighbor