1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Project P9 Graphs Jarek Rossignac CS1050: Understanding and Constructing.

Slides:



Advertisements
Similar presentations
Alyce Brady CS 470: Data Structures CS 510: Computer Algorithms Post-order Traversal: Left Child - Right Child - Root Depth-First Search.
Advertisements

How to Create a Transparent Image. Locate an image Locate an image, right-click on it and select “Save image as...” or “Save picture as…”
Microsoft FrontPage Monday January 28, The Basic FrontPage Setup.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Project P3: CSG Lecture 08, File P3.ppt Due Feb 14 Individual.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Programming Project 2 SORTING Lecture 05, file P2 Due January.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Programming Project 1 Truth Table Lecture 03, file P1 Due January.
Breadth-First Search Seminar – Networking Algorithms CS and EE Dept. Lulea University of Technology 27 Jan Mohammad Reza Akhavan.
E-Portfolio Using sites.Google.com. Why Google? Easy to use Easy to share Accessible Permanent.
Implementation of Graph Decomposition and Recursive Closures Graph Decomposition and Recursive Closures was published in 2003 by Professor Chen. The project.
Graphs CS-240/341. Graphs Used for representing many-to-many relationships –can take two forms directed (digraph) - a finite set of elements called vertices.
What is the next line of the proof? a). Let G be a graph with k vertices. b). Assume the theorem holds for all graphs with k+1 vertices. c). Let G be a.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
Creating and Editing Feature Data Francisco Olivera, Ph.D., P.E. Srikanth Koka Department of Civil Engineering Texas A&M University.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Computer Science 5 Spring 2007 Module 3 7/12/2015 1:55:57 PM7/12/2015 1:55:57 PM7/12/2015 1:55:57 PM.
Lecture 13 CSE 331 Oct 2, Announcements Mid term in < 2 weeks Graded HW2 at the END of the class.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 06: COMPLEXITY Sections 2.2 and 2.3 Jarek Rossignac CS1050:
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
HTML Hyper Text Markup Language. What is an HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup.
Minimum Routing Cost Spanning Trees Kun-Mao Chao ( 趙坤茂 ) Department of Computer Science and Information Engineering National Taiwan University, Taiwan.
Windows Listening Guide.  The software that manages the sharing of the resources of a computer. The overall function of the computer.  MASTER CONTROLLER.
Chapter 2 – Introduction to the Visual Studio .NET IDE
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02b: Tutorial for Programming in Processing Jarek Rossignac.
[Insert Header Here] [Type Fact #1 Here] [Drag your image on top of this box and resize it using the handles on the edges]
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 09: SEQUENCES Section 3.2 Jarek Rossignac CS1050: Understanding.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
04 MPEG-4, 1 Jarek Rossignac, CoC & GVU Center, Georgia Tech SM, June D Compression Jarek Rossignac GVU Center and College of Computing Georgia Tech,
Tech Training 12/16/19 How to add a post How to edit a post How to add & assign a category How to add tags.
Computer Science I Recap: variables & functions. Images. Pseudo-random processing.
Graphs. Graphs Similar to the graphs you’ve known since the 5 th grade: line graphs, bar graphs, etc., but more general. Those mathematical graphs are.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Graphic pipeline  Scan-conversion algorithm (high level)  Pixels.
Tutorial 7 Creating Animations. XP Objectives Learn about animation Create a timeline Add AP divs and graphics to a timeline Move and resize animation.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 17a: ACTIVE ZONES of CSG primitives Jarek Rossignac CS1050:
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 5.
1NetBeans Tutorial Using the “Properties” menu, name the List “List1” and the button “Button1”. NetBeans Tutorial6.
How to use this SPARKlab Authoring Template (PowerPoint 2007 for Windows) 1.Save this file as a PowerPoint Presentation (.pptx) with the name of the SPARKlab.
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Processing  Install Processing  Learn how to edit, run, save, export,
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 05: SORTING Section 2.1 Jarek Rossignac CS1050: Understanding.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 04: SETS AND FUNCTIONS 1.6, 1.7, 1.8 Jarek Rossignac CS1050:
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.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 09a: PROOF STRATEGIES Section 3.1 Jarek Rossignac CS1050:
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
CSE 421 Algorithms Richard Anderson Autumn 2015 Lecture 5.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
[Insert Header Here] [Type Fact #1 Here] [Type Fact #1 Here] [Drag your image on top of this box and resize it using the handles on the edges]
[INSERT HEADER HERE] [Type Fact #1 Here] [Drag your image on top of this box and resize it using the handles on the edges]
Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech.
Adobe Photoshop CS5 Chapter 2 Using Selection Tools and Shortcut Keys.
Making Word Clouds With Wordle.
3451-S2008: Project 4 Solid = finite 3D region bounded by the mesh
Graph Traversals Some algorithms require that every vertex of a graph be visited exactly once. The order in which the vertices are visited may be important,
Lecture 19: CONNECTIVITY Sections
Learning the Basics – Lesson 1
3451-S2008: Project 4 (revised) Ray = line through eye and mark (picked surface point) Cylinder = all points of distanceradius to ray Stabbed vertex =
What is the next line of the proof?
COMP 6/4030 ALGORITHMS Prim’s Theorem 10/26/2000.
Alyce Brady CS 470: Data Structures CS 510: Computer Algorithms
Graph Algorithm.
Picture with Caption layout
Minimum Spanning Tree Neil Tang 3/25/2010
Connected Components Minimum Spanning Tree
Graphs Chapter 13.
Minimum Spanning Tree Neil Tang 4/3/2008
Picture with Caption layout
Presentation transcript:

1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Project P9 Graphs Jarek Rossignac CS1050: Understanding and Constructing Proofs Spring 2006

2 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Objectives Learn how to represent, display, and traverse graphs. Learn how to compute a vertex spanniging tree Learn how to compute the topological distance between two nodes

3 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Graph editor To Load a graph: click in the graphic window and press "l". To add an edge: click the start point and drag to the end point These will be snapped to existing points if close enough. To move a point, click and drag it while pressing the space bar To toggle the display of point numbers: press "n" To resize and recenter: press "f" When run locally in Processing To save the graph: press "s" To make a picture: press "i"

4 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Assignment P9, individual Modify the code as indicated to compute the Vertex Spanning Tree with vertex 0 as root and set the color of its edges and vertices to not 0. Post on your PPP: –the image showing the result of your algorithm on the graph provided –the piece of the code that computes the coloring of the VST edges and vertices (with comments) –a discussion of its time complexity –a link to your source code –the applet to run your source codeyour source code

5 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Compute spanning tree by growing Start from seed and grow by layers

6 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Colors of points and edges 18 points col[0]=1 (141,518) col[1]=2 (43,216) col[2]=3 (300,30) col[3]=3 (556,216) col[4]=2 (458,518) col[5]=2 (298,443) col[6]=2 (169.0,381.0) col[7]=3 (150.0,280.0) col[8]=3 (409.0,398.0) col[9]=3 (292.0,317.0) col[10]=4 (278.0,203.0) col[11]=4 (401.0,259.0) col[12]=4 (404.0,183.0) col[13]=4 (315.0,130.0) col[14]=4 (182.0,185.0) col[15]=5 (457.0,321.0) col[16]=6 (481.0,257.0) col[17]=5 (217.0,126.0) 30 edges col[0]=1 (0,1) col[1]=1 (1,2) col[2]=0 (2,3) col[3]=1 (3,4) col[4]=1 (4,0) col[5]=1 (0,5) col[6]=1 (6,0) col[7]=0 (6,5) col[8]=1 (7,6) col[9]=1 (8,5) col[10]=1 (6,9) col[11]=0 (5,9) col[12]=0 (8,4) col[13]=0 (7,9) col[14]=0 (8,9) col[15]=1 (9,10) col[16]=0 (10,7) col[17]=1 (9,11) col[18]=0 (10,11) col[19]=0 (11,8) col[20]=0 (11,12) col[21]=1 (12,3) col[22]=1 (2,13) col[23]=0 (13,12) col[24]=0 (13,10) col[25]=0 (10,14) col[26]=1 (11,15) col[27]=1 (15,16) col[28]=1 (14,17) col[29]=1 (14,7)

7 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Declarations int vn =5; // initial number of vertices int en =5; // initial number of edges int cap=128; // max nuber of edges and vertices pt[] P = new pt [cap]; // points edge[] E = new edge[cap]; // edges int [] colEdge = new int[cap]; // colors of edges int [] colVert = new int[cap]; // colors of points int mj=10; // user-controlled limit on depth of vertex spanning tree

8 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Set up void setup() { size(600, 600); // window size PFont font = loadFont("Courier-14.vlw"); textFont(font, 12); for (int i=0; i<cap; i++) { // clear vertices, edges, colors P[i]=new pt(0,0); E[i]=new edge(0,0); colEdge[i]=0; colVert[i]=0;}; for (int i=0; i<vn; i++) { P[i].setFromValues(-sin((i+0.5)*TWO_PI/vn)* (width*0.45)+width/2.0,cos((i+0.5)*TWO_PI/vn)* (height*0.45)+height/2.0);}; for (int i=0; i<vn; i++) {E[i].setFromValues(i,in(i)); }; VST(); // vertex-spanning-tree }

9 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac VST void VST() { // colors of edges and points in VSY // insert your code here // my placeholder code just to have something (please delete) for (int i=0; i<vn; i++) {colVert[i]=0;}; // resets vertex colors for (int i=0; i<en; i++) {colEdge[i]=0;}; // resets edge colors colVert[0]=1; // seeds the VST root at vertex for (int i=0; i<en; i++) { if(i%2==1) { colEdge[i]=1; colVert[E[i].s]=1; colVert[E[i].e]=1;};}; // changes colors of odd edges and their vertices }

10 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Edge class class edge{ int s,e; edge (int ps, int pe) {s = ps; e = pe;}; edge makeCopy() {return(new edge(s,e));}; void setFromValues(int ps, int pe) {s = ps; e = pe;}; void show() { line(P[s].x,P[s].y,P[e].x,P[e].y);}; void write() {println("("+s+","+e+")");}; }

11 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Results