





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















Course Evaluations The CourseEvalUM system will be open for student participation Tuesday,April 28th, through Wednesday, May 13th. Please as soon as possible complete the evaluations for this course. We consider them extremely important. WHAT YOU GET FROM COMPLETING THE EVALUATION (READ) One hundred undergraduates who submit all of their Spring 2009 CourseEvalUM evaluations will be randomly selected to register first in the fall for Spring 2010 courses. Here is the flyer with this information: https://www.irpa.umd.edu/Assessment/...romo_flyer.pdf WHERE TO GO TO COMPLETE THE EVALUATION https://www.courseevalum.umd.edu/portal As always, any students who submit all of their evaluations through CourseEvalUM will be able to see the student-view results posted at Testudo.
Problem Type
Find any satisfactory solution Example → Find path from A to F
Find best solution (vs. cost metric) Example → Find shortest path from A to E
Some Algorithm Strategies
Backtracking Algorithm
Backtracking Algorithm – Reachability
Backtracking Algorithm – Map Coloring Color a map using four colors so adjacent regions do not share the same color. Coloring map of countries If all countries have been colored return success Else for each color c of four colors and country n If country n is not adjacent to a country that has been colored c Color country n with color c Recursively color country n+ If successful, return success Return failure Map from wikipedia – http://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Map_of_USA_with_state_names.svg/650px- Map_of_USA_with_state_names.svg.png
Divide and Conquer
Dynamic Programming Algorithm
Fibonacci Algorithm
fibonacci(0) = 1 fibonacci(1) = 1 fibonacci(n) = fibonacci(n-1) + fibonacci(n-2)
If n is 0 or 1, return 1 Else compute fibonacci(n-1) and fibonacci(n-2) Return their sum
n
Dynamic Programming – Shortest Path Djikstra’s Shortest Path Algorithm S =
while ( not all nodes in S )
Greedy Algorithm
At each step of algorithm Choose best local solution
n
Coins – 30 20 15 1 Find minimum number of coins for 40 Greedy Algorithm fails
Greedy Algorithm – MST Kruskal’s Minimal Spanning Tree Algorithm
Brute Force Algorithm
Generate and evaluate possible solutions until Satisfactory solution is found Best solution is found (if can be determined) All possible solutions found Return best solution Return failure if no satisfactory solution