Questions about algorithmic strategies that quickly solve a problem well most of the time, but give no guarantees.
Questions tagged [heuristics]
242 questions
31
votes
3 answers
Measuring the difficulty of SAT instances
Given an instance of SAT, I would like to be able to estimate how difficult it will be to solve the instance.
One way is to run existing solvers, but that kind of defeats the purpose of estimating difficulty. A second way might be looking a the…
Artem Kaznatcheev
- 4,872
- 2
- 28
- 57
24
votes
3 answers
How does an admissible heuristic ensure an optimal solution?
When using A* (or any other best path finding algorithm), we say that the heuristic used should be admissible, that is, it should never overestimate the actual solution path's length (or moves).
How does an admissible heuristic ensure an optimal…
Ashwin
- 281
- 1
- 2
- 10
20
votes
1 answer
When to use SAT vs Constraint Satisfaction?
If I have a hard problem, one standard approach is to express it as a SAT instance and try running a SAT solver on it. Another standard approach is to express it as a constraint satisfaction problem, and try using a CSP solver. The two feel…
D.W.
- 167,959
- 22
- 232
- 500
16
votes
1 answer
How does consistency imply that a heuristic is also admissible?
A heuristic function $h (n)$ is...
Consistent if the estimated cost from node $n$ to the goal is no greater than the step cost to its successor $n'$ plus the estimated cost from the successor to the goal.
Admissible if $h(n)$ never overestimates…
user58348
- 161
- 1
- 1
- 3
15
votes
2 answers
Initial temperature in simulated annealing algorithm
I've done some testing of different initial temperatures in my simulating annealing algorithm and noticed the starting temperature has an affect on the performance of the algorithm.
Is there any way of calculating a good initial temperature?
Undefined
- 251
- 1
- 2
- 4
12
votes
3 answers
Why is the A* search heuristic optimal even if it underestimates costs?
A* search finds optimal solution to problems as long as the heuristic is admissible which means it never overestimates the cost of the path to the from any given node (and consistent but let us focus on being admissible at the moment).
But why does…
statBeginner
- 231
- 1
- 2
- 6
11
votes
1 answer
Algorithm to create dense style crossword puzzles
I am working on creating a program to generate dense American style crossword puzzles of grid sizes between 15x15 - 30x30. The database of words I'm using ranges between 20,000 and 100,000 words of all varying lengths. The current algorithm I'm…
219CID
- 211
- 2
- 5
11
votes
3 answers
Difference between heuristic and approximation algorithm?
i have a problem regarding the following situation.
I have two arrays of numbers like this:
index/pos 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Array 1(i): 1 2 3 4 7 5 4 3 7 6 5 1 2 3 4 …
user6697
- 347
- 1
- 2
- 6
9
votes
2 answers
Maximum Stacking Height Problem
Has the following problem been studied before? If yes, what approaches/algorithms were developed to solve it?
Problem ("Maximum Stacking Height Problem")
Given $n$ polygons, find their stable, non-overlapping arrangement
that maximizes their…
user16652
9
votes
1 answer
How to implement the details of shotgun hill climbing to make it effective?
I am currently working on a solution to a problem for which (after a bit of research) the use of a hill climbing, and more specificly a shotgun (or random-restart) hill climbing algorithmic idea seems to be the best fit, as I have no clue how the…
Sim
- 591
- 1
- 5
- 14
8
votes
2 answers
What is the no free lunch theorem?
I've been reading about the No Free Lunch Theorem, but I can't quite understand what it is about. I've heard this theorem described elsewhere as the claim that "no general purpose universal optimiser exists". On the other hand, the Wikipedia…
Casebash
- 333
- 2
- 7
8
votes
3 answers
How does the 3-opt algorithm for TSP work?
I understand that the 3-Opt Heuristic for solving the Traveling Salesman problem involves removing three edges from a graph and adding three more to recomplete the tour. However, I've seen many papers that mention that when three edges are removed,…
u3l
- 213
- 1
- 2
- 7
8
votes
2 answers
Is using a more informed heuristic guaranteed to expand fewer nodes of the search space?
I'm reading through the RMIT course notes on state space search.
Consider a state space $S$, a set of nodes in which we look for an element having a certain property.
A heuristic function $h:S\to\mathbb{R}$ measures how promising a node is.
$h_2$ is…
Alexander Suraphel
- 181
- 1
- 1
- 3
8
votes
1 answer
What is the approximation ratio of this bin-backing algorithm?
Consider the following algorithm for bin packing:
Initially, sort the items by their size.
Put the largest item in a new bin.
Fill the bin with small items in ascending order of size, up to the largest item that fits.
Close the bin. If some items…
Erel Segal-Halevi
- 6,088
- 1
- 25
- 60
7
votes
1 answer
A Good Resource for Christofides' Heuristic
Is there an explanation Christofides's Heuristic for solving TSP which does not simply state the algorithm and go ahead to prove the bound?
To be specific:
(Disclaimer : I am an engineer who knows very little about graph theory but need this for a…
user6422