QueenAlice.com


Username:

Password:

Remember me



Forgot Password?
Registration FREE!





Topic: How many?
Back to Forum Index
Back to Forums List


Author

Message
richerbyUnited Kingdom flag
Feb 8 2012 08:46 PM
kingdave wrote:
Here is a another strategy to try. Define B(n) to be the Blutigeroo count, where his criteria for exclusion would have to be generalized to the n case. I suspect that finding a closed form for B(n) is doable.

I doubt it, since both the number and nature of the constraints depends on n. Combinatorial counting problems tend to be computationally intractable (very often #P-complete, which is at least as bad as being NP-hard and probably much worse), often even when the problem of finding a single solution is easy (polynomial time). A closed form, depending on how exactly you define the term, would suggest a polynomial-time algorithm.

Dave.

Blutigeroo
Feb 9 2012 03:02 AM
I'm with Richerby on this one. I'm not suggesting that anyone give up on it but it is looking more and more like the kind of complexity that does not allow a formulaic approach. For small numbers of n players, an algorithm seems the only solution. For large n, that too becomes problematic ... at least until quantum computing takes hold!

Richerby, I recycled a constraint that I had remmed out but it was not the best one to use which is simply:
if ((b > 12) or (c > 12) or (d > 12)) continue;

... that shaves the time down a tiny bit further (down to 32% of the first algorithm). Anyhow, the point is taken.

Kingdave, your approach seems to be the best one although the original error is a concern. Were you able to eliminate any possibility of that in further runs? If so, I think I can say after a quick test that B(n) fails for n larger than 4. This is probably because further constraints are needed (n-2 constraints?). For B(5) I get 43451 after confirming that my generalized algorithm agrees with Kingdave for n < 5.

kingdaveUnited States flag
Feb 9 2012 09:32 AM
Blutigeroo, for n = 5 you would need to add another constraint: the sum of any 3 numbers has to be <= 36. Can you try adding that and see what you get? Your other constraint would be the sum of any 2 numbers is <= 28, right?


Blutigeroo
Feb 9 2012 09:57 AM
Thanks ... that got it. I had tried the constraint but I had it as a formula {i.e. (n-1)*12-8}. I didn't notice that it was incorrect and therefore failed ... the last constant should have been a 12. I've confirmed your result: 39801

Previous 1 2 3 4 5

©2004-2025 Queen Alice Internet Chess Club
All rights reserved.