Harry On A Date

Harry is going out on a date with Megan. He is planning out the situations he might face.

What algorithm is he employing to search through the possibilities​?

Relevant algorithms :


Image Credit : xkcd 761 .
A* Search Depth First Search Breadth First Search Dijkstra's Algorithm

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Satyabrata Dash
Jul 3, 2016

Harry starts with an arbitrary node(in this case the situations he might prepare for) and then he traverses deep into it ( i.e 1)A)a) ) and could have traversed deeper if his girlfriend wouldn't have come.

Thus he is applying the Depth First Search Algorithm .

"Well i guess algorithms are more fun than girls."

Yep. Personally, I think using something like A* is a good idea. Instead of exploring the entire search space, we could explore only the nodes with higher priorities

Agnishom Chattopadhyay - 4 years, 11 months ago
Brett Hartley
Jul 21, 2016

The comic strip actually says "I really need to stop using depth-first searches." at the bottom which gives away the answer

Thanks, I have fixed it now.

Agnishom Chattopadhyay - 4 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...