Hacker News new | past | comments | ask | show | jobs | submit login

In one of my Engineering classes back in the day, our prof told us about the Euler algorithm and that it was impossible to stay off the island in the middle if you could only cross each bridge once and if there were an odd number of bridges.

Someone in class responded immediately: "Build another bridge."

The prof congratulated him on his lateral thinking.




>>The prof congratulated him on his lateral thinking.

May be this is lateral thinking to some people but it's actually changing the problem and not solving the original problem.

I can always to pretend to solve the problem by just changing it.

Respectfully submitted.


Isn't changing the problem usually quite an elegant way to solving a problem..? I don't have any examples to hand, but I'm pretty sure being able to rerepresent or slightly change a problem has been applied to great success. In the applied sciences at least...


Yes

For theoretical problems sure, you want to solve that problem, though a lot of solutions rely on analyzing a partial graph with some edges removed

For practical problems, changing the problem might be much cheaper/easier than keeping to the original one


In the article:

> We take all the destinations that have an odd number of connections in this tree (Euler proved there must be an even number of these), and carefully pair them up. Because all the destinations now have an even number of edges, we’ve created an Eulerian graph, so we create a route that crosses each edge exactly once.



In this case, both figuratively and literally lateral.

I always appreciate three hours of deep compsci thinking interrupted by someone outside saying "why wouldn't we just run an extra cable?" or something. I'm glad your professor encouraged it, because it is very often useful.


I think the biggest "aha-moment" (I believe the kids say "mind blowing" these days) in my entire education was the final few slides of the final class of "Introduction to Algorithms and Data Structures". Basically, if you're able to loosen the constraints of the problem, to solve for the specific case, not the general, by making assumptions about your input data set (perhaps it's almost sorted already) or accepting an only almost-correct solution (say, for travelling salesman, you just want a solution reasonably close to the best, it matters less if it is the best) you can make your algorithms orders of magnitude faster/simpler/better.


Business-wise: lease a ferry!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: