DCSIMG
Drunk?!?! Kruskal's or Prim’s - Shai Raiten

Shai Raiten

 Subscribe

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…….

Posted: Apr 27 2011, 10:41 PM by shair | with 4 comment(s) |
תגים:,

Comments

Gil Fink said:

:-)

# April 28, 2011 7:40 AM

Offir Shvartz said:

especially when you are a NERD

# April 28, 2011 12:38 PM

Gian Maria said:

It is amazing how a geek mind, even drunk, try to solve each simple problem using logic and algorithm background :).

But I think that making your girlfriend drive is the KISS perfect solution :) and probably it adhere even to S.O.L.I.D. princpile ihihih

# April 28, 2011 5:12 PM

Arvin said:

LOL

How can u think of spanning trees after being so drunk!!

# May 1, 2011 8:46 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: