Search found 284 matches
- Sun Jan 05, 2003 11:27 pm
- Forum: Algorithms
- Topic: A difficult problem which no one haven't solve
- Replies: 4
- Views: 3711
I recently analyzed a similar problem: How many boolean NxN matrices are there that don't contain the same value three times in a row (horizontally or vertically)? Examples for n=4: 0010 0010 1101 0010 (good) 0001 0010 1101 0010 (bad because of the three 0's in the first row) So far I've only attack...
1+4) I agree, volunteers might be easy to find. But then the admins have to trust them, not only because someone could intentionally do bad stuff, but maybe even more importantly because of unintended accidental stuff. Plus, if you add a C++ thing that's only slightly better than the Java equivalent...
1) Who's gonna do the work to add the BigInt library? Who's gonna add the regular expression library? Who's gonna add the polygon library? Who's... 2) I agree, you shouldn't be forced to write your own BigInt class. You should be able to get a BigInt class for free by using Java. 4) You're right, if...
Yes, in a perfect world all languages would be equally well-suited for problem solving. Really? That would mean that the old languages would've to be constantly updated and extended, because the new ones are. You know, there was a reason people created C++. They thought C was not as good as they wan...
Hmm, we don't agree totally, though. While I do advocate the support of the java.math package here at UVA, I do *not* advocate support for gmp. Why? Because java.math is part of the Java standard library and it was ripped out of it. gmp on the other hand is a totally different story. Here we're talk...
- Thu Nov 14, 2002 2:55 pm
- Forum: Volume 1 (100-199)
- Topic: 136 - Ugly Numbers
- Replies: 156
- Views: 38697
1) It is linear. 2) It is not exactly like mine. 3) It is better than mine. Why? 1) Your whole work is done inside the loop, which is executed k-1 (or n-1, we called used to call it n) times. Inside you have two constant time commands and three loops. In one iteration of the outer loop, each inner l...
- Thu Nov 14, 2002 6:56 am
- Forum: Volume 1 (100-199)
- Topic: 136 - Ugly Numbers
- Replies: 156
- Views: 38697
- Wed Nov 13, 2002 8:15 pm
- Forum: Volume 1 (100-199)
- Topic: 136 - Ugly Numbers
- Replies: 156
- Views: 38697
epsilon0, you're very close to my linear time solution. The big difference is that I don't search for mul2, mul3 and mul5. I know where to look them up in constant time. No idea about a logarithmic solution and I doubt that there is one. It's easy to see that an O(n) solution is optimal for the repo...
- Tue Nov 12, 2002 7:14 pm
- Forum: Volume 1 (100-199)
- Topic: 136 - Ugly Numbers
- Replies: 156
- Views: 38697
- Tue Nov 05, 2002 5:02 pm
- Forum: Algorithms
- Topic: Generating Combinations
- Replies: 5
- Views: 4437
I've written a tutorial on this topic a while ago that also includes several algorithms:
http://www.cs.ubc.ca/~pochmann/topcoder ... index.html
http://www.cs.ubc.ca/~pochmann/topcoder ... index.html
- Thu Oct 24, 2002 5:38 am
- Forum: Volume 103 (10300-10399)
- Topic: 10368 - Euclid's Game
- Replies: 14
- Views: 7505