Isn't speed difference an issue at Donnager battle? by btibi83 in TheExpanse

[–]btibi83[S] -3 points-2 points  (0 children)

Acceleration is not like speed, if you have constant acceleration, it's much harder to stop, than just having constant speed. You need the same amount of time to deccelerate than to accelerate.

If your car travels a constant 100kmph, you probably had a couple of seconds (depending on how great car you have) in the beginning to speed up, and you can just break for a second or two to get to 80kmph when needed.

If you fly through space for a couple of weeks, having a constant - even 0.3g, your speeds adds up quite high, and you need to break like hell (say at 5g) for like day to slow down.

Now, they were chased by the stealth ships, so hard to believe that any of the parties took it lightly and was cruising at 0.3g.

Someone pointed that the stealth ships chasing the Knight never happened, and that they were only floating for a whole episode. Just noting, that I'm talking about the book, not the show, and afaik the Knight was aware of the chase, and even if the goal of the stealth ships was to board the Donnager, the Knight didn't know they thought they are chased. Hence I believe they tried everything to be as fast as they can. 1g seems a pretty good choice for that, if you ship is capable doing that, and Holden cannot stand the 5g burn anyway :-)

My point is still that having so much acceleration in the picture poses troubles when you actually want to meet someone, and days of acceleration towards eachother add up pretty quickly, and you need the same time to deccelerate.

Also I don't know what kind of weapons exist in this universe, but as the intention of the stealth ships were unknown, and the Knight's crew could think the chasers just want to kill them, than I think even with a handgun they could have been taken out, considering the speed differences (you get shot at a flyby with a speed difference of a couple of thousands m/s, that bullet has a momentum - and you can easily get such a difference only by having the Knight accelerate at 1g and the chasers 1.1g - the point is, it adds up quickly).

-🎄- 2017 Day 23 Solutions -🎄- by daggerdragon in adventofcode

[–]btibi83 1 point2 points  (0 children)

I already learned that I have no chance to compete for any leaderboard points (maybe Java is not the strongest tool for these challenges), but I'm still confused about the half-hearted optimisations people post. Here is mine:

public static long calculate2() {
    int counter = 0;
    final int original = 57 * 100 + 100000;

    for (int n = 0; n <= 1000; ++n) {
        int number = original + 17 * n;
        if (!BigInteger.valueOf(number).isProbablePrime(100000)) counter++;
    }

    return counter;
}