Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 1337

Algorithms for finding an element in some specified data-structure (most commonly, in a tree).

6 votes
1 answer
2k views

How to extend Bellman-Ford to solve the $k$ shortest path routing?

Browsing the wikipedia I got to this page where it is said: Finding k shortest paths is possible by extending Dijkstra algorithm or Bellman-Ford algorithm and extend them to find more than one pa …
2 votes

Proving 2 heuristics are admissible

The only additional constraint which is required for $h_3$ and $h_4$ to be admissible is that both $h_1(n)$ and $h_2(n)$ return non-negative values for any state $n$, but this is always accomplished - …
Carlos Linares López's user avatar
2 votes
Accepted

Why is IDA$^*$ faster than A$^*$? Why does IDA$^*$ visit more nodes than A$^*$?

Since you already implemented IDA$^*$ you certainly understand why it expands more nodes than A$^*$, i.e., it starts from the start state with a new depth-first traversal in each iteration. Note first …
Carlos Linares López's user avatar
2 votes

How to find a path that connects all the dots in the matrix?

Actually, grid graphs are a very specific class of input problems, and a good number of algorithms are known that can solve problems which remain hard in other instances, i.e., non-grid graphs. Even …
Carlos Linares López's user avatar
1 vote

Space complexity of breadth-first search

That's not entirely correct Tobi. Breadth-First search requires to store in memory only those nodes awaiting for expansion. Thus, it only requires to store in memory $b^d$ nodes in the worst case, i.e …
Carlos Linares López's user avatar
5 votes
Accepted

Why do we prefer DFS to find connected components?

Two components $G_1(V_1, E_1)$ and $G_2(V_2, E_2)$ are connected if and only if there is a path between any vertex $v_1\in V_1$ and any other vertex $v_2\in V_2$. Here I'm assuming that both component …
Carlos Linares López's user avatar
6 votes
Accepted

Are depth-first/breadth-first considered special cases of best-first?

The answer to your question is, in both cases, No. The reason is as follows: Both depth-first search and breadth-first search are uninformed search algorithms. A distinctive feature of these algorit …
Carlos Linares López's user avatar
7 votes
Accepted

Bidirectional Dijkstra vs Dijkstra

Absolutely yes! your arguments are correct. And, as matter of fact, it is very easy to come up with a graph where Bidirectional Dijkstra would expand more nodes than Unidirectional Dijkstra, following …
Carlos Linares López's user avatar
2 votes

Symmetry in Pattern Databases

From your question I assume you understand how symmetries are computed. As an exercise, make sure to understand the example given in Figure 4 which refers to the easiest of all symmetries, the Mirror …
Carlos Linares López's user avatar
5 votes
Accepted

Minimax algorithm when all the options are the same

Shaull's answer is absolutely correct, and by referring Zermelo's theorem it is pointing in the right direction. However, beyond the observations done on the rationality of your opponent, the point …
Carlos Linares López's user avatar
6 votes

Comparison between IDA* and Recursive best first search

Let me please start by succintly summarizing the behaviour of RBFS. For a thorough explanation of the algorithm refer to the original journal paper: Richard Korf. Linear-space best-first search. Artif …
Carlos Linares López's user avatar
1 vote

What are the conditions that make the A* algorithm optimal over the other unidirectional sea...

This is a nice question! Indeed, A* is known to be asymptotically optimal in the number of expansions. This is usually understood by saying that any algorithm solving the same problem should expand th …
Carlos Linares López's user avatar
5 votes
Accepted

Heuristic for sokoban puzzle problem

Hi there CoderInNetwork, That ain't an easy question and any advances regarding a good heuristic function would be very welcome. Indeed, I will refer in my answer to Andreas Junghanns' PhD written in …
Carlos Linares López's user avatar
2 votes
Accepted

Using A* search with different heuristic values

This problem is known as the Target Value Search Problem (TVS) and it can be succintly described as follows: Given a graph $G(V,E)$, two nodes $s$ and $t$ ($s, t\in V)$ and a target value $T$ find a …
Carlos Linares López's user avatar
6 votes
Accepted

Artificial Intelligence: Condition for BFS being optimal

¡Nice question really! The book is right and it just suffices for the path cost to be a nondecreasing function of the depth of the node ---though an additional note should be posted, see below. This …
Carlos Linares López's user avatar

15 30 50 per page