Live data from Hacker News

Ask HN: Solving problems by mapping to other problems that we know how to solve

news.ycombinator.com

1–10 of 81 posts

Ask HN: Solving problems by mapping to other problems that we know how to solve

#1
Is there a line of research that looks into solving difficult / intractable problems by finding a mapping that expresses them as different problems that we know how to solve?

A fairly surreal and probably overly optimistic example would be, for example, to solve traveling salesman problems using chess engines. What we would need is to find right mappings: (1) from a traveling salesman problem to a chess position and, (2) from a traveling salesman route to a chess move (or move sequence)

A general solution for a "compiler" that can translate between any pair of problems feels unrealistic but I can imagine developing a mapping between, say, a tic tac toe game and simple chess positions where you could: (1) translate a tic tac toe position into a chess position (2) solve the chess position (3) translate the solution into a tic tac toe sequence

Any thoughts or pointers to relevant research would be much appreciated!

Re: Ask HN: Solving problems by mapping to other problems that we know how to solve

#5
This isn't a complete answer to your question, because it's generally more theoretical than operational, but the thing you're describing is often called "reduction":

https://en.wikipedia.org/wiki/Reduction_(complexity)

In practice, there are many cases where people use SAT solvers for other problems. For some examples:

http://homepages.math.uic.edu/~jan/mcs401/reductions.pdf

Re: Ask HN: Solving problems by mapping to other problems that we know how to solve

#6
I have no advice, but this is a very powerful way of looking for solutions. Today I ran into some physics postdocs at the skatepark. They told me about their research doing fluid mech experiments to simulate the behaviour of space near but not in a black hole. One of them (Sam) wrote his highly entertaining PhD thesis about the analogy of a draining bathtub's vortex with black holes

https://arxiv.org/abs/2009.02133

Re: Ask HN: Solving problems by mapping to other problems that we know how to solve

#10
The satisfaction problem is considered the "ultimate" problem to reduce into. Because SAT is very flexible in representation, is NP complete (and therefore a huge variety of problems map to it), and sometimes is efficient.

You can't solve NP-complete problems efficiently, but SAT (and 3SAT) is basically the best attempt at that complexity class.

-----------

The constraint satisfaction problem is another one that is sometimes used.

For example, Sudoku, Traveling Salesman, coloring problems and more all reduce into the 3SAT problem. However, a dedicated traveling-salesman solver will be faster than pretty much any general purpose 3SAT solver, but its still easier to use another person's solver than writing your own.

---------

An intriguing "simpler" problem is the maximum-flow problem, which is surprisingly flexible and usable in many many algorithms. Its not as widely applicable as 3SAT is, but maximum-flow is "efficient" to solve (in P-time and P-space).

---------

A good book into this (including these "cannonical" problems, like maximum flow or 3SAT) is "Algorithm Design" by Jon Kleinberg and Eva Tardos. This only covers the basics of course. 3SAT and constraint satisfaction are their own respective fields with basically their own branches of mathematics.

A lot of Graph algorithms are also worth knowing. It seems like many, many problems map into graph algorithms (max-clique, topological sort, minimum spanning tree, etc. etc.)

> A general solution for a "compiler" that can translate between any pair of problems feels unrealistic but I can imagine developing a mapping between, say, a tic tac toe game and simple chess positions where you could: (1) translate a tic tac toe position into a chess position (2) solve the chess position (3) translate the solution into a tic tac toe sequence

Yup, that's a 3SAT solver for ya. It will solve the problem, eventually, but 3SAT is NP complete, so the heat-death of the universe may come about before the answer comes out.

If you know your problem is less complex than NP-complete, you'll want to map it to some other problem that's got less complexity (so that the algorithm finishes faster).

Post reply on HN