Ad
  • Custom User Avatar

    how to get this result:

    { "red":1, "blue":1 }, { "red":2, "blue":1 }, "red", [ 5n, 16n ]
    

    ?

    probability to get only one red murble from urn2 is: 2/3 * 1/2 + 1/3 * 2/2 = 2/3.
    thus, probability that there will be exactly 2 red murbles in urn3 is: 1 * 2/3 = 2/3.

    probability to get two red murbles from urn2 is: 2/3 * 1/2 = 1/3.
    thus, probability that there will be exactly 3 red murbles in urn3 is: 1 * 1/3 = 1/3.

    we don't consider 0, 1 or 4 red murbles in urn3, because it is impossible and probabilities for these options are 0;

    if there are 2 red murbles in urn3 then answer is 1/5.
    if there are 3 red murbles in urn3 then answer is 1/2.

    then multiplying probabilities we must get result:
    2/3 * 1/5 + 1/3 * 1/2 = 3/10 (not 5/16). what is wrong with that logic?

  • Custom User Avatar

    test for 1905458700 doesn't look correct.
    1905458700th digits are 0 and 0;
    1905458701st digits are 6 and 1;
    so, sum of 1905458701st digits can't give addition.

  • Custom User Avatar

    How to fix that?

    Expected: [[-72, -60], [-72, -61], [-71, -62], [-71, -63], [-71, -64], [-70, -65], [-70, -66], [-69, -67], [-69, -68], [-69, -69], [-68, -70], [-68, -71], [-68, -72], [-67, -73], [-67, -74], [-66, -75], [-66, -76]],
    instead got: [[-72, -60], [-72, -61], [-71, -62], [-71, -63], [-70, -64], [-70, -65], [-70, -66], [-69, -67], [-69, -68], [-69, -69], [-68, -70], [-68, -71], [-67, -72], [-67, -73], [-67, -74], [-66, -75], [-66, -76]]
    

    I think there is a problem with rounding some numbers. I try to use different ways (eg using abs for negative).