L7 - Software Testing, Quality Assurance and Maintenance...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Software Testing, Quality Assurance and Maintenance Winter 2010 Lecture 7 January 18, 2010 Patrick Lam version 2 Input : Directed graph G Output : List of prime paths in G , primePaths nonextendablePaths ; primePaths ; worklist all paths of length 0, i.e. nodes; while worklist 6 = do p worklist . removeFirst (); p i initial node of p ; p f final node of p ; wasExtended false ; if p f has no outgoing edges then nonextendablePaths += p ; else foreach p f such that ( p f ,p f ) is an edge in G do if p f does not appear in p then worklist += p ++ pf ; wasExtended true ; else if p f = p i then nonextendablePaths += p ++ pf ; wasExtended true ; end end end if not wasExtended then nonextendablePaths += p ; end end end primePaths ; foreach p nonextendablePaths do // ( p could only be a suffix of a non-extendable path; Id use a tree:) if p is not a proper subpath of any simple path then primePaths + = p end end Bonus: What is the best (asymptotic) bound you can find for the number of prime paths? Is it tight?What is the best (asymptotic) bound you can find for the number of prime paths?...
View Full Document

This note was uploaded on 03/19/2010 for the course CS 447 taught by Professor Lam during the Winter '10 term at Waterloo.

Page1 / 3

L7 - Software Testing, Quality Assurance and Maintenance...

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

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