Diferente pentru blog/meet-in-the-middle intre reviziile #69 si #70

Nu exista diferente intre titluri.

Diferente intre continut:

Using meet in the middle becomes obvious. We can brute force through the numbers on each side of the equality and find a colision.
The algorithm takes O(sqrt(n)) space and O(sqrt(n)) time.
h2. Bidirectional search(interview question)
h2. Bidirectional search
bq. Find the shortest path between two nodes nodes in a large graph which you can’t keep in memory, for example the Facebook friendship graph.
One neat idea is instead of starting the search from one node, start from both and see when the two search spaces meet. If the distance between two nodes is $k$ and the average branching factor in the network is $p$ then we explore $O(p^k/2^)$ nodes instead of $O(p^k^)$ nodes.
This approach works well on both path finding problems on explicit graphs and on implicit state graphs like ones in games.
 
h2. Caveats
Unlike divide and conquer the trick in meet in the middle can't be applied recursively because the sub problems don't have the same structure as the original problem.

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.