Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Dijkstra's + A*

1.3.1

QuestionAnswer
Dijkstra's Finds the shortest path between one node and all other nodes on a weighted graph A type of breadth-first search It doesn’t work for edges with a negative weight value If there is more than one shortest path, only one will be outputted
Dijkstra's in English (to calculate the shortest path) 1set initial dist-from-start for all vertices 2each vertex: afind unvisited vertex closest to start bfor unvisited connected vertex: iCalc dist from start iiIf i < dist: 11Shortest distance = new distance 12Previous vertex = current + visited
Dijkstra's in English (to output the shortest path) 4. Start from a goal vertex 5. Add the previous vertex to the start of a list 6. Repeat from step 5 until the start vertex is reached 7. Output the list
Dijkstra's in pseudocode (don't need to learn, just be able to trace and recognise)
A* Finds shortest path between vertices Weighted graph Nodes pruned Optimal path followed Heuristic estimates cost between next vertex + goal then follows path Best-first search Needs graph + heuristic data Doesn’t stop at first path
pruned (A*) never searched
If heuristic overestimates (A*) may not work
Heuristic data (A*) estimate of the remaining distance to the goal after we move from one vertex to another
dijkstra refinement A*
If heuristic underestimates (A*) takes longer
A* in english (To calculate the shortest path between two nodes) 1Set initial g+f for all nodes 2Until visited goal aPick unvisited node w/ lowest f bFor each unvisited connected node ig=edge+current edge iiIf i < f: 1connected node f value = newly calculated distance 2previous = current node + current
A* in english (To output the shortest path) 3. Start from a goal vertex 4. Add the previous vertex to the start of a list 5. Repeat from step 4 until the start vertex is reached 6. Output the list
G (A*) shortest distance from start
H (A*) heuristic
F (A*) G+H
A* in pseudocode (don't need to learn, just be able to trace and recognise)
Created by: FlashCardFun!
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards