COP3502_16_AlgorithmAnalysis2

COP3502_16_AlgorithmAnalysis2 - More Algorithm Analysis...

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

View Full Document Right Arrow Icon
Computer Science Department University of Central Florida More Algorithm Analysis COP 3502 – Computer Science I
Background image of page 1

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

View Full DocumentRight Arrow Icon
More Algorithm Analysis page 2 Announcements Comment on Class Workload thus far: # of hours expected of a full-time college student: Just like a full-time job: around 40 or 50 or so hours/week It is said that for every hour in class, You can expect up to three hours of work outside class Now do the math: If you are registered for 12 credits That adds up to 36 hours of outside-class work per week For a total of 48 hours per week Now ask yourself: For this class, do you really put in 9 hours/week outside of the class?
Background image of page 2
More Algorithm Analysis page 3 Announcements Comment on Class Workload thus far: Now ask yourself: For this class, do you really put in 9 hours/week outside of the class? Not even close! If there’s no program due, the average student puts in ZERO hours per week outside class They don’t even review notes for a MINUTE! So how long then does a program take? Let’s even say 10 hours (which is high for most students) Since they are due every two weeks (or so) That adds up to 5 hours per week that you invest (at a max) Leaving still 4 hours per week of study time!
Background image of page 3

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

View Full DocumentRight Arrow Icon
More Algorithm Analysis page 4 Program 3 Program 3: Match-Making Given a list of n men and n women Also given the men’s ratings of the women And the women’s ratings of the men Find the best overall matching of men and women in the group So you must find ALL possible matchings
Background image of page 4
More Algorithm Analysis page 5 Program 3 Program 3: Match-Making Example: Following chart shows how the men rate the women: Following chart shows how the women rate the men: Diana Ellen Fran Adam 4 8 7 Bob 6 7 5 Carl 5 9 6 Adam Bob Carl Diana 7 6 8 Ellen 6 5 9 Fran 4 7 3 How many matchings will there be?
Background image of page 5

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

View Full DocumentRight Arrow Icon
More Algorithm Analysis page 6 Program 3 Program 3: Match-Making Example: Here are the six (ALL) matchings: M1 S M2 S M3 S Adam+Diana 4 Adam+Diana 4 Adam+Ellen 6 Bob+Ellen 5 Bob+Fran 5 Bob+Diana 6 Carl+Fran 3 Carl+Ellen 9 Carl+Fran 3 Total 12 1 8 15 M4 S M5 S M6 S Adam+Ellen 6 Adam+Fran 4 Adam+Fran 4 Bob+Fran 5 Bob+Diana 6 Bob+Ellen 5 Carl+Diana 5 Carl+Ellen 9 Carl+Diana 5 Total 16 1 9 14
Background image of page 6
More Algorithm Analysis page 7 Program 3 Program 3: Match-Making Example: Here are the six (ALL) matchings: M1 S M2 S M3 S Adam+Diana 4 Adam+Diana 4 Adam+Ellen 6 Bob+Ellen 5 Bob+Fran 5 Bob+Diana 6 Carl+Fran 3 Carl+Ellen 9 Carl+Fran 3 Total 12 1 8 15 M4 S M5 S M6 S Adam+Ellen 6 Adam+Fran 4 Adam+Fran 4 Bob+Fran 5 Bob+Diana 6 Bob+Ellen 5 Carl+Diana 5 Carl+Ellen 9 Carl+Diana 5 Total 16 1 9 14 This is clearly the best match!
Background image of page 7

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

View Full DocumentRight Arrow Icon
More Algorithm Analysis page 8 Program 3 Program 3: Match-Making Must use recursion Must use permutations (this SAME algorithm) Points to ponder: The assignment says that you will try ALL possible matchings So think about what it is that you need to permute
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 09/21/2011.

Page1 / 41

COP3502_16_AlgorithmAnalysis2 - More Algorithm Analysis...

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

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