Interesting and Humour - page 3969

 
STARIJ:
About 10 years ago, a student I know asked me to solve a problem in C++ with a recursive function. I struggled for 4 hours, tried a hundred variants. Nothing. She should be here soon... And then... I had a miracle... 15 minutes later, the program was ready.

did you get it?

 
STARIJ:
About 10 years ago, a student friend of mine asked me to solve a C++ problem with a recursive function. I struggled for 4 hours, tried a hundred variants. Nothing. She should be here soon... And then... I had a miracle... 15 minutes later, the program was ready.

Two days later the miracle swelled up and prevented you from walking?

 
About 10 years ago, a student I know asked me to solve an 8 queens problem in C++ with a recursive function. Took me 4 hours, tried a hundred variants. Nothing. She should come soon... So I prayed to St. Nicholas the Elijah. A miracle happened - 2 brackets appeared on the screen on top of Norton Comander (it means it was 20 years ago). The glance stuck to the centre of the screen. And only after that I figured out that there was a ellipsis at the bottom - I had to pass a parameter to the function... 15 minutes later the program was ready
 
Дмитрий:

1. Don't be stupid -"If you solve the more general problem of N queens...."

2. First, at least read the conditions for winning the $1,000,000 contest. It's hard, but you should give it a try. I give you a hint - you need a general algorithm for solving the problem for any dimension of the board


To clarify a hint - you do not just need a general algorithm (there are probably even more than one), but namely the algorithm that allows modern computers to solve the problem with large board size in real time. To solve a problem with large number of fields by existing algorithms, modern computers can take too many years (and memory)...

 
Did you get the million?
 
Alexandr Bryzgalov:
Did you get the million?

Nah, there was no change from the $2 million.

 
Vladimir Suschenko:

To clarify a hint - we need not just a general algorithm (there are probably even more than one), but an algorithm that allows modern computers to solve a problem with large board dimensions in real time. To solve a problem with large number of fields with available algorithms, modern computers can take too many years (and memory)...

The problem has already been solved and does not need too many years and even less memory to solve it, at any chessboard dimension>=4.

With respect.
 
Andrey Kisselyov:
the problem is already solved and you don't need too many years and even less memory to solve it, at any chessboard dimension>=4.

Respectfully.

So go get a million. Just get the package.

 
Дмитрий:

So go get the million. Just get the package

if they want the solution so much, they'll bring it themselves.

Respectfully.
 
Vladimir Suschenko:

To clarify a hint - we need not just a general algorithm (there are probably more than one), but exactly an algorithm that allows modern computers to solve a problem with large board dimensions in real time. To solve a problem with large number of fields by existing algorithms, modern computers may need too many years (and memory)...

Nowadays it is fashionable to use SAT/SMT solvers to solve such problems. For maximal speed the problem should be expressed by Boolean functions in cnf form, and then somehow follow the example of this article http://www.cs.cmu.edu/~hjain/papers/sudoku-as-SAT.pdf

Except that sat solver will just answer whether the problem can be solved, in yes/no form. I have no idea how to get the answer itself (shape arrangement) from there, I'm not good at this technology.