Challenge Suggestion: Bishop placement problem

Add a reply

Posted by morchin 1372 days ago:
I have a suggestion of new challenge which is one of the problem in Google Code Jam 2006.

Input:
list of string(square) and the number fo Bishops which you must put, like
["........",
"......#.",
"........",
".#......",
"........",
".....#..",
"........",
"...#...."]
5

Output:
the last 4 digits of number of patterns of places which you can put Bishops.
Symmetric is not considered.

'.' means the place you can put Bishop.
'#' means the place you can not put Bishop.
You can not put the Bishop if other Bishop is put on the diagonal.

example)
Input:
[".#",
".."]
2

Output:
2

the fllowing 2 pattern
"B#"
"B."

".#"
"BB"
Posted by Mark Byers 1367 days ago:
the last 4 digits of number of patterns of places which you can put Bishops.

Why only the last four digits? Is this to allow some sort of optimization where you don't need to calculate the exact number, but only the number base 10000? Wouldn't it be simpler to just ask for the total number of patterns?

Symmetric is not considered.

You mean that if two patterns that are, for example, reflections of each other, both are counted?

I have also made a chess problem suggestion.

I guess we can probably only have one chess related challenge at a time (per season, when we have seasons), so which do you prefer - this idea, or the one I posted just now?

I think this challenge will be easier than the one I suggested. That might be a good thing, considering the difficulty of the recent few challenges. (I prefer difficult challenges but I think some more easy ones would be better for newer users).
Posted by carldr 1367 days ago:
This sounds very difficult to do in a 4-second time limit.
Posted by morchin 1363 days ago:
To Mr.Mark Byers:
> Why only the last four digits?

Actually I do not know why only the last four digits. The problem which Goolge Code Jam submited had the constraints.
Maybe, it is difficult to display the large integer digits for the language like C++ and Java. But it is easy for Python because it has Integer type of multiple-precision. Participants of Google Code Jam may use the language C++, Java, C# and VB except Python.

> You mean that if two patterns that are, for example, reflections of each other, both are counted?

Yes, exactly.

> I guess we can probably only have one chess related challenge at a time (per season, when we have seasons), so which do you prefer - this idea, or the one I posted just now?

I am sorry. I was not able to understand the problem. Is there any example? If you mean the problem which has the same rule as chess. That sounds interesting.

To Mr.carldr:
> This sounds very difficult to do in a 4-second time limit.

I think no problem. Google Code Jam has the following rule.

All submissions have a maximum of 2 seconds of runtime per test case. ... Because the inherent speed differences between Python and the other offered languages is large, some problems may require extra optimization or not be solvable using the Python language.

I think the time of limit depends on the compexity of the submitted problem.
Posted by morchin 1363 days ago:

I am sorry. I was not able to understand the problem. Is there any example?

I overlooked. Your chess related problem is the "how many moves of chess" problem you suggested? I think it may good though I have not had an insight of bottom. Actually I wanted to challenge the algorithm of DFS (Depth First Search).

I am sure that the difficulty of the problem depends on the number of kind of pieces. Thinking the rule of the problem may be interesting.
Posted by sparr 1292 days ago:
just to clarify, for posterity... if memory serves, the google contest involves actually solving the problems, not neccessarily writing a computer program to solve them. the web interface is just a form where you fill in the answers, and all of the answers are easy to remember/type subsets of the actual solution. like for a crossword puzzle they might just ask for all the letters on a particular row. thats why they only ask for the last 4 digits.
Posted by Mark Byers 1292 days ago:
thats why they only ask for the last 4 digits.

Thanks for the explanation!
Posted by sparr 967 days ago:
I think the last-four-digits bit from the google code jam is a holdover from the google puzzle championships where most problems as for some "hash" of a large solution that is easy to communicate but virtually impossible to produce without solving the problem. This is because it is tedious and time consuming to put a very large answer into a web interface.
Posted by sparr 963 days ago:
Only took about a year for my amnesia to kick in and make the exact same post :) Feel free to ignore me.
Posted by Benjamin000 246 days ago:

it is a nice day !
-------------------------------------------------------------------------------


TaylorMade R9 Irons
Taylormade R7 CGB MAX Irons
Callaway X-22 Iron Set
Taylormade R7 CGB MAX Fairway Wood
Titleist AP2 Irons
Ping G15 Irons
Callaway X-22 Iron Set

Add a reply