Lecture27 - Course Evaluations Deb Deppeler CS367 Lecture 1...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
10/13/11 1 Course Evaluations Deb Deppeler CS367 Lecture 1 Can I have a volunteer to return them to Cathy Richard? (5352 CS – fifth floor mailbox) Use #2 Pencils Please comment on: Your use of: Course Web Pages, Tutorials and Related Links My use of: PowerPoint Lecture Notes, Document Camera and Blackboard
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/13/11 2 Shortest (cheapest) path from v to z Shortest (cheapest) path: ____________________________ 3 3 1 1 4 2 1 10 5 5 3 3 1 1 2 6 3 1 1 v s a b h z g y f m d x n e
Background image of page 2
10/13/11 3 front PathNode front Vertex cost prev Vertex next V weight priority queue
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/13/11 4 Adjacency Matrix (Weighted) a b c d e f g h i j k l a b c d e f g h i j k d 1 3 1 3 10 5 2 f g e c b a
Background image of page 4
10/13/11 5 Adjacency Matrix a b c d e f g h i j k l a b c d e f g h i j k 1 3 1 3 10 5 2 g d f e c b a
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/13/11 6 Cycle Detection (Undirected) static boolean hasCycle( Vertex v ) { if ( v.equals(v.getPredecessor()) ) return false; v.setMark( IN_PROGRESS ); Iterator iter = v.getAdjacent(); while ( iter.hasNext() ) { Vertex u = (Vertex) iter.getNext(); u.setPredecessor(v); int mark = u.getMark(); if ( ( mark == IN_PROGRESS ) || return true; } } v.setMark( DONE ); return false; }
Background image of page 6
10/13/11 7 Cycle Detection Algorithm 3 3 1 1 4 2 1 10 5 5 3 3 1 1 2 6 3 1 1 v s a b h z g y f m d x n e
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/13/11 8 Announcements Announcements Handout TODAY ! A4: Due Tomorrow (Fri) 11:59pm H3: Due next Tuesday (in class)
Background image of page 8
10/13/11 9 Last Lecture Last Lecture Directed Graphs Weighted Graphs Traversals Shortest Path
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/13/11 10 This Lecture This Lecture Graphs Implementation Adjacency List Adjacency Matrix Cycle Detection Spanning Trees
Background image of page 10
10/13/11 11 Topological Order Topological Order Assign numbers to nodes such that: for every edge Vx->Vy,  Vx's no. < Vy's no. Impossible, if there  are cycles. 764 564 354 367 302 752 552 352 764 367 354 552 302 564 752 352 8 7 6 5 4 3 2 1
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/13/11 12 Topological Order Topological Order Multiple assigments are possible 764 367 354 552 302 564 752 352
Background image of page 12
13 Topological Algorithm Topological Algorithm If no cycles, can find node with no  outgoing edges: assign last number to it For any node with all sucessors assigned,   can assign the next to last number. 764
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/17/2011 for the course COMP SCI 367 taught by Professor Horowitz during the Spring '10 term at Wisconsin.

Page1 / 45

Lecture27 - Course Evaluations Deb Deppeler CS367 Lecture 1...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online