COP3502_16_AlgorithmAnalysis2

# COP3502_16_AlgorithmAnalysis2 - More Algorithm Analysis...

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

Computer Science Department University of Central Florida More Algorithm Analysis COP 3502 – Computer Science I

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

View Full Document
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?
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!

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

View Full Document
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
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?

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

View Full Document
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
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!

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

View Full Document
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
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
Ask a homework question - tutors are online