An Assortment of Things 1.This class will go over the exam. If you haven’t taken the exam yet (like maybe you forgot and didn’t show up) please don’t attend.

Slides:



Advertisements
Similar presentations
Introduction to Algorithms Lecture 12 Prof. Constantinos Daskalakis CLRS
Advertisements

Graphs CSE 331 Section 2 James Daly. Reminders Homework 4 is out Due Thursday in class Project 3 is out Covers graphs (discussed today and Thursday) Due.
ICOM 4035 – Data Structures Lecture 15 – Graph ADT
PSU CS Algorithms Analysis and Design Graphs.
CS 206 Introduction to Computer Science II 03 / 27 / 2009 Instructor: Michael Eckmann.
Trees 2 and Doubly Linked Lists As you arrive: Please snarf today’s code.
1 Graphs: Traversal Searching/Traversing a graph = visiting the vertices of a graph by following the edges in a systematic way Example: Given a highway.
Graphs By JJ Shepherd. Introduction Graphs are simply trees with looser restrictions – You can have cycles Historically hard to deal with in computers.
Graph Theory - I. Today’s Plan Introduction Special Graphs Various Representations Depth First Search Solve a problem from GCJ Breadth First Search Solve.
CS 240: Data Structures Tuesday, July 31 st Graphs, Applications of Previous Data Structures.
Graphs.
Graphs. Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs Birmingham Rugby London Cambridge.
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 25: Graph Traversal, DAGs, and Weighted Graphs.
Using Search in Problem Solving
Graphs & Graph Algorithms Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Chapter 9: Graphs Basic Concepts
Important Problem Types and Fundamental Data Structures
Welcome to CompSci 100! As You Arrive… Make sure you grab a syllabus packet. Read through it. I will be covering the most essential points in my talk,
MA/CSSE 473 Day 12 Insertion Sort quick review DFS, BFS Topological Sort.
CSC 331: Algorithm Analysis Decompositions of Graphs.
Recursion. Review  Recursive solutions, by definition, are built off solutions to sub-problems.  Many times, this will mean simply to compute f(n) by.
Representing and Using Graphs
BackTracking CS335. N-Queens The object is to place queens on a chess board in such as way as no queen can capture another one in a single move –Recall.
WONDERWALL JUNIOR CERT MUSIC PERFORMANCE. LISTEN WONDERWALL MUSIC VIDEO.
Graphs. 2 Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs Birmingham Rugby London Cambridge.
1 Cheryl Underhill Blackville School English 10C/10G Presented by:
Please snarf the code for today’s class. Then think about the famous 8-Queen’s Puzzle. The question is: is there a way to arrange 8 queens on a (8x8) chessboard.
Graphs. Definitions A graph is two sets. A graph is two sets. –A set of nodes or vertices V –A set of edges E Edges connect nodes. Edges connect nodes.
Your Final Concert Movie Project How you will create a movie about the song you took “pictures” of.
Problem Solving with Data Structures using Java: A Multimedia Approach Chapter 12: Circular Linked Lists And Graphs: Lists and Trees That Loop.
Math – Rational Equations 1. A rational equation is an equation that has one or more rational expressions in it. To solve, we start by multiplying.
Lesson 17. For the First Time II. Lesson A A. For the First Time- Chorus Go: For 10 points, write the answer to this question on a Music Slip: What is.
CS 61B Data Structures and Programming Methodology Aug 5, 2008 David Sun.
Where’s the title? You gotta search for it!. PotW Solution String s = new Scanner(System.in).next(); int[] prev = new int[s.length() * 2 + 2]; Arrays.fill(prev,
Week 10 - Friday.  What did we talk about last time?  Graph representations  Adjacency matrix  Adjacency lists  Depth first search.
Graphs A graphs is an abstract representation of a set of objects, called vertices or nodes, where some pairs of the objects are connected by links, called.
COSC 2007 Data Structures II
Optimization Problems The previous examples simply find a single solution What if we have a cost associated with each solution and we want to find the.
CS3249 Elements of User Interfaces. Group with your DESIGN GROUP Screen Group 1 Group 2 Group 3 Group 4 Group 6 Group 5 Group 7 Computer Group 8.
Main Index Contents 11 Main Index Contents Graph Categories Graph Categories Example of Digraph Example of Digraph Connectedness of Digraph Connectedness.
LEARNING STYLES! WHAT YOU DO NATURALLY!. VISUAL/VERBAL LEARNER See it, read it Study best alone.
Everyday Math Lesson Grade 4 World Tour: Flying to Africa.
Building and Solving Complex EquationsProjector resources Building and Solving Complex Equations Projector Resources.
Graphs David Kauchak cs302 Spring Admin HW 12 and 13 (and likely 14) You can submit revised solutions to any problem you missed Also submit your.
Building and Solving Equations 2Projector Resources Building and Solving Equations Projector Resources.
Graphs. What is a graph? In simple words, A graph is a set of vertices and edges which connect them. A node (or vertex) is a discrete position in the.
BackTracking CS255.
Comments on the “Three Piles” Problem
You should understand everything on this slide
Cse 373 April 14th – TreEs pt 2.
CSE373: Data Structures & Algorithms Lecture 15: Introduction to Graphs Catie Baker Spring 2015.
Comp 245 Data Structures Graphs.
Graph.
Graphs (picture above from ) 7/29/2009
Graph Representation (23.1/22.1)
Chapter 9: Graphs Basic Concepts
Graphs.
Chapter 11 Graphs.
Depth-First Search Graph Traversals Depth-First Search DFS.
Shortest Path Algorithm for Weighted Non-negative Undirected Graphs
Graphs.
Graphs.
Backtracking.
Graphs.
Applications of BFS CSE 2011 Winter /17/2019 7:03 AM.
Graphs.
Analysis and design of algorithm
Chapter 9: Graphs Basic Concepts
James Wei Professor Peck 9/20/2013
Prof. Ramin Zabih Graph Traversal Prof. Ramin Zabih
Presentation transcript:

An Assortment of Things 1.This class will go over the exam. If you haven’t taken the exam yet (like maybe you forgot and didn’t show up) please don’t attend this class. 2.Please get in groups of 3-4 people (4 is better…1 and 2 are NOT ok)

The Plan for Today 1.A Musical Interlude 2.We review a few key questions from the exam a.whoWinsPilesList (Recursive backtracking) b.getMissingParens (Stacks) 3.I introduce “Graphs” the final structure we will look at 4.Hand back exams

The Music Video Project 1.A student created CompSci 100 tradition 2.Create a music video, recorded song, or just a set of lyrics about some part of CompSci Work in groups 4.Your creations will be played as folks arrive for the final exam 5.Extra credit (but that’s not really the point)

Work on teams of 3-4 to Solve whoWinsPilesList Do not work by yourself or with a partner Snarf the code and check your solution as you develop it There is a hint at the bottom of the textfile, if everyone on you team really is stuck When you finish, more on to getMissingParens Make sure everyone on your team understands how this code works When you are finished, submit your code via ambient

Graphs “Nodes” with edges between them A B C D Could be “cyclic” or “acyclic” Could be “directed” or “undirected” Might represents a map, where nodes represent cities and edges represent roads

A Node Class…similar to the way we do with linked lists and trees class Node { public String name; public ArrayList neighbors; } A adjacency list, where each node ‘name’ maps to a list of neighbors HashMap > graph; //is there an edge from a to b? boolean edgeExists = graph.get(“A”).contains(“B”); A adjacency matrix, where connections between nodes is represented by a 2D matrix boolean [][] graph; //is there an edge from 3 to 17? boolean edgeExists = graph[3][17]; Represent the graph below with all 3 different mechanisms 0 1 2

Can even be implicit dog grand dad You can move between two words if the last letter of the previous word matches the first letter of the next word