Drunk?!?! Kruskal's or Prim’s
Drunk?!?! Kruskal's or Prim’s
After a lovely dinner with my girlfriend I found myself unable to drive home after drinking more than 1.5 litter of wine.
Before I was able to drive home I started to drink water and I’ve started to think how to get home without the police catching me…?#?#?#?#?#?#
The first thing that popups was – Prim's algorithm is a greedy algorithm that finds a minimum spanning tree for a connected weighted undirected graph. This means it finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized – English Please – What is the shortest way to get home?????
So using my WP7 maps I started to calculate each road possible to get home from the restaurant, than I remembered that Kruskal’s is much better when the weighted of each branch is unknown…….
Kruskal's algorithm is an algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph. This means it finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized.
But than I received the decisive conclusion – My girlfriend said –> Sit down and be quiet, I’ll drive.
Some times it’s better to listen to someone else especially when you drunk…….