Games, Mathematics:Probability Puzzles Outrageous 9/18 (solved 9)

Incremental Update

Probability puzzle is available on google app store:

it comprises of 3 levels of difficulty:

Outrageous:

1. Foxes multiplied by hounds divided by the total 5*7/12
2. It’s every permutation of two different digits I used E (east) and N (north), were there is 7 E and 4 N which equals 330
3. 1 minus all possible ways for the mouse to reach the trap multiplied by the ways to get from the trap to the cheese divided by 330 equals 1-6*21/330
4. Ok, so this one is a little tricky, first you can see that train B will be there in 3 minutes no matter what happens with train A. So if Train A does not arrive in 3 minutes or less then the average is 1.5 minute wait time which occurs 2/5 of the time. Now if Train A does make it in the firs 3 minutes then the average wait time between both trains is 1 minute which occurs 3/5 of the time. So the equation is (1.5*2/5)+(1*3/5)
5. There us 13 positions possible to make a couple, 13 seats, with 5 men, and 8 women in a round table.
6. Same as the top question except we lose possible chance to make a couple.
7. There is no correlation, however since it’s those in college the high math or English skills allow you in without the other so it becomes -0.5
9. This is almost exactly the same question as getting serious question 18. Not only can it be done the exact same way but it also uses the same number so it is the same answer (1/3)*(1/3)
11. This is another logic question, the answer is 1

That is the progress so far.

don’t forget to check the earlier levels: Getting serious

Thanks for Ralph for keep these answers coming.

Games, Mathematics:Probability Puzzles Getting serious 33/33 (solved 33)

Incremental Update

Earlier stage: Easy Peasy

Next stage: Outrageous

Probability puzzle is available on google app store:

it comprises of 3 levels of difficulty, this is the second one:

2- Getting serious:

1. Well, you are tossing a dice, How many tosses to get a number larger than 4.
Hint: [5,6]
2. what is the probability that some of the people shares their birthday. (for more info: https://en.wikipedia.org/wiki/Birthday_problem (Very interesting, promise)
3. what is smallest group size such that the probability of a common birthday is bigger than half.
4. on average how many tosses does it take to get two heads in a row?
5. someone selects a coin uniformly at random from the jar and tosses it. if it comes up heads, what is the probability the coin is fair?
6. Babies are 0.51 boys, 0.49 girls.
7. the unpleasant disease problem, The trick here is to remember who is positive and who has the disease based on actual prevalence and population size
8. Each one of the 9 regular coins accounts for 1/8 possibilities of 3 heads. The two headed coin accounts for 8/8 possibilities.
9. The hint give you a big clue here on the formula to use, it’s 4/1+4/2+4/3+4/4
10. basketball team, your skills are between 0 and 1, maximize your chance to join the team
11. the shooting game
Break the question up in to parts
Chances of A killing B in the first round is 1/2 if this occurs there is a 2/3 chance that C wins and a 1/3 chance that A wins
Chances of A missing B and B missing C is 1/8 in that case there is a 1/16 chance that A will die and a 1/16 chance that the new round starts with exactly the same odds of winning or losing as the previous round
Chance of A missing B and B killing C 3/8 in that case A has a 3/16 + 3/(16*8) + 3/(16*8*8) + 3/(16*8*8*8) + …
In the end if you add that all up you will get that A has about a 40.634% chance to win the duel (interestingly enough B has the worst chance to win the duel despite being the best shot and if A intentionally misses his first shot then his chances to win sky rocket)
Answer: 128/315 or 0.40634 or 40.634%
12. As send by Ralph: “You basically take the amount of two step jumps and make the combinations out of it, we know the minimum two step jumps is 0 and the max is 4 so:
0 two step jumps = 1 combination
1 two step jumps = 8 combination
2 two step jumps = (6+5+4+3+2+1) = 21 combination
3 two step jumps = (4+3+2+1)+(3+2+1)+(2+1)+(1) = 20 combination
4 two step jumps = 5 combination
1+8+21+20+5=55”
14. The binary string
I started with small strings and looked for a pattern,
1/4 consecutive 1s
3/8 consecutive 1s
8/16 consecutive 1s
The denomination is easy just multiply the previous denominator by 2. But the numerator was harder so after trying a few that failed the patter I noticed that you add the previous numerator to the sum of it’s combined previous numerator and denominator so the next string is
(8+3+8)/32=19/32
Then the next string is
(19+8+16)/64=43/64
Then the next string is
(43+19+32)/128=94/128
then the final string is
(94+43+64)/256=201/256
15. Its easier if you start backwards, we know there are 3 rounds, so in round three your expected to win (1+2+3+4+5+6)/6=3.5
So in round 2 you should either stop at 4,5, or 6; otherwise just go to round 3. So in round 2 your expected to win (4+5+6)/3=5 at a 50% chance or 3.5 at a 50% chance. So in round 1 you should either stop at 5 or 6 otherwise just go to round 2. Therefore 5.5/3+5/3+3.5/3 or 14/3 is the expected payoff or value of the game.
16. The hint gave me a clue that it’s always the same, so I assumed what if there where two chairs and two passengers, then there is a 50% chance that the first passenger sat in his own chair. What if there is 3 seats and 3 passengers then there is a 2/3 chance that the first passenger sat in a seat that isn’t his and (1/2)*(1/3)=1/6 chance for the second passenger also meaning the last passenger will have a 50-50 chance of someone sitting in his chair. It seems to be true that if seats are more than 1 and passengers = seats then under those conditions the answer is always 1/2.
17. Ralph: “Here is the answer is shows, 100*(1-0.19^0.5)/0.9. I had to look this formula up, but I used (100/9)*(10-4.359) note I probably had to be more significant than 5.359, it’s supposed to be the square root of 19, but I don’t know how to do that on android keyboard”
18. The biologist and the bacteria
This one takes a bit of math to solve. First let X equal the chance that a single bacteria will eventually die out (This is not 0.25 because it is not the chance it will die out in the next period).
X=0.25*(1+X^2+X^2+X^2)
X=0.25+0.75X^2
4X=1+3X^2
3X^2-4X+1=0
Factors to
(X-1)*(3X-1)=0
So X is either 1 or 1/3.
1 is impossible because that is a 100% chance to die out so each bacteria has a 1/3 chance to die out meaning the answer is (1/3)*(1/3)
19. You get this by factoring 1000 by 7, 11, and 13 and then remove any repeats
20. The first day is automatically a block, the rest of the equation is a 0.8 chance (if it’s cloudy or sunny) of a 0.6 chance of a new block plus a 0.2 chance (rainy) of a 0.8 probability of a new block over the next 9 days so the equation is 1+9*(0.8*0.6+0.2*0.8)
21. Answer: 1+9*0.7 however I solved it the same way I did question 20, my formula was 1+9*(0.5*0.5+0.25*0.75+0.25*1.05)
22. It’s an equation, in which 2 fractions multiply together to get 1/2 while following the marbles rule
In this case (3/4)*(2/3).
23. Of those with 0.9 or more math ability, 95% are in university. Of the general population 50% are in university. 0.9 math ability is 10% of the population. So 0.95*0.1/0.5 or 19%
25. Answer: 2*0.51*0.49^2 I can’t remember exactly how i got this. honestly this one gave me a lot of trouble and I think I lucked in to it, I still don’t understand why the answer isn’t 0.49*0.51
26. Answer: I just used the slope formula for this, so (80-20)/(100-0)
27. what is the expected length in meters of he longer piece?
28. It’s logic, read the question again it’s asking how much time the clock will spend at 3 from now to infinity
29. Answer: I looked up the Markov process to finally get this, I can’t remember what my equation looked like but this is the answer 252*0.5^10
30. Answer: This one is just logic, if you read carefully you should get it, the answer is 0.6
31. Answer: 1 – e^(-1) I know that wasn’t my formula, I looked up the formula bootstrapping and it showed two different formulas, one for small sample and one for infinitely large sample, I don’t think I had to plug in any numbers at all from what I recall the answer is just that formula
32. Answer: 4/10, I wish it saved my original formula because it a lot bigger, from what I recall I did different variations of votes where C must get votes 1 and 2, T can only get one or zero votes when 3 votes are counted, can have two or less when vote 5 is counted, and can not have all 3 of his votes until at least the 7th vote is counted, I then divided that number by every possible permutation of the counted votes

Thanks to Ralph and Manuel for contributing to this solution post.

Computer, Games: Hacked app solutions Levels 7-10 {Finale} (Copied)

Level Seven: Nuclear Plant

First Episode

Second episode

Stage One:

foreach var_a in input {
input.push(var_a + 1).remove(0);
}
return input;

OR

var_b = [];
foreach var_a in input {
var_b.push(var_a + 1);
}
return var_b;

Stage two:

function f1: var_a {
return var_a > -1;
}
return input.map(f1);

OR

input.map(function var_a -> (var_a > -1));

OR

var_b = [];
foreach var_a in input {
var_b.push(var_a > -1);
}

Stage three:

function f1: var_a {
return var_a[0] + 1 * var_a[1] + 1;
}
foreach var_a in input {
if var_b == 0 || var_b > f1(var_a) {
var_c = var_a;
var_b = f1(var_a);
}
}
return var_c;

Level Eight: Killer Robot

Stage One:

function f1: var_a {
foreach var_b in var_a {
var_c = var_c * 10 + var_b;
}
return var_c;
}
var_b = f1(input[0]) + f1(input[1]);
var_a = [];
var_c = var_b / 10;
if var_c > 0 {
var_a.push(var_c);
}
var_a.push(mod(var_b, 10));

Stage two:

var_a = [];
foreach var_b in input {
if var_b == “(” || var_b == “[” {
var_a.push(var_b);
}
else {
if var_a.length == 0 {
return false;
}
var_c = var_a.pop;
if var_c == “(” && var_b != “)” {
return false;
}
if var_c == “[” && var_b != “]” {
return false;
}
}
}
return var_a.length == 0;

Level Nine: Skynet

Stage One:

function f1: var_a, var_b {
if var_b.is_list {
while var_b.length > 0 {
f1(var_a, var_b.remove(0));
}
}
else {
var_a.push(var_b);
}
return var_a;
}
f1([], input);

Level Ten: Retirement

Stage One:

draw(input[0],input[1]);

That’s all, Folks.

Thanks to Mr. Andrew.

Computer, Games: Hacked app solutions Levels 4-6 (Copied)

Level Four: Cheatcode

First Episode

Third and final episode

Stage One:

while var_a < input.length {
var_b = var_a + 1;
while var_b < input.length {
if input[var_b] < input [var_a] {
var_c = input[var_b];
input[var_b] = input[var_a];
input[var_a] = var_c;
}
var_b++;
}
var_a++;
}
return input;

Stage Two:

var_a = [];
foreach var_b in input.sort {
while var_b != var_c {
var_a.push(var_c++);
}
var_c++;
}
return var_a;

Stage Three:

var_a = “”;
foreach var_b in input {
if var_a != var_b.sort && var_a != “” {
return false;
}
var_a = var_b;
}
return true;

Level Five: Corrupted

Stage one:

var_a = input.length -1;
while var_a > -1 {
var_b = var_b + input[var_a] * pow(2, input.length – var_a – 1);
var_a–;
}
return var_b;

Stage two:

if input == 1 {
return false;
}
var_a = 2;
while var_a < input {
if mod(input, var_a) == 0 {
return false;
}
var_a++;
}
return true;

Stage three:

while var_a < input.length – 1 { if input[var_a] > input[var + 1] {
return false;
}
var_a++;
}
return true;

Level Six: Cyber Attack

Stage One:

while var_a < input.length {
var_b = var_a;
while var_b != input[var_a] {
input.insert(var_a++, var_b++);
}
return input;
}

OR

var_a = [];
var_b = input.pop + 1;
while var_c < var_b {
var_a.push(var_c);
var_c++;
}
return var_a;

Stage two:

if input[0] == “)” {
return false;
}
foreach var_a in input {
if var_a == “(” {
var_b++;
}
else {
var_b–;
}
}
return var_b == 0;

Stage three:

return input.push(input.remove(0));

Games

Computer, Games: Hacked app solutions Levels 1-3 (Copied)

Second episode

Third and final episode

Stage One:

input + 1;

Stage Two:

input> 0;

Stage Three:

if input < 0 {
return -input;
}
return input;

Stage Four:

abs(input);

Level two: High School Hack

Stage One:

while var_a < input {
var_b = var_b + input;
var_a++;
}
return var_b;

Stage Two:

pow(input, 2);

Stage Three:

foreach var_a in input {
var_b++;
}
return var_b;

Stage Four:

var_a = [];
while var_b < input {
var_a.push(var_b);
var_b++;
}
return var_a;

Hacked App – level three: Jailbreak

Stage One:

foreach var_a in input {
if var_a > var_b {
var_b = var_a;
}
}
return var_b;

OR

while var_a < input.length { if input[var_a] > var_b {
var_b = input[var_a];
}
var_a++;
}
return var_b;

Stage two:

foreach var_a in input {
var_b = max(var_b, var_a);
}
return var_b;

OR

while var_a < input.length {
var_b = max(var_b, input[var_a]);
var_a++;
}
return var_b;

Stage three:

while input > 1 {
input = input – 2;
}
return input;

OR

if input / 2 * 2 == input {
return 0;
}
return 1;

Stage four:

foreach var_a in input {
if var_a != input.pop {
return false;
}
}
return true;

OR

while var_a < input.length {
if input[var_a] != input[input.length – 1 – var_a] {
return false;
}
var_a++;
}
return true;

Games, Mathematics:Probability Puzzles Easy Peasy 32/32 (solved 32)

Later stage: Getting serious

Probability puzzle is available on google app store:

it comprises of 3 levels of difficulty, This is the first one:

1. Easy Peasy:
1. Julius Ceasar tosses two fair coins, probability of two heads?
Hint: [h,h – h,t – t,t – t,h]
2. six individual socks, 2 red,2 blue, 2 purple.
probability of blindly picking a matching pair.
Hint: [you already picked one of six, the rest are 5, one of which is matching the one you have]
3. rolling a fair six-sided dice, probability of even number.
Hint: [1,2,3,4,5,6]
4. roll two fair independent six-sided dice, probability of getting 12 in total.
Hint: [1,1-1,2-1,3,………6,6]
5. boys’ birth probability 0.51, girls’ 0.49, the probability of getting 2 girls birth.
6. in a perfectly shuffled deck of 52 cards, with 4 aces, what is the probability of drawing 2 aces.
Hint: if you draw one card, the deck is less by one.
7. in 40 cards deck with 4 aces-yet not drawn- what is the probability of drawing only one ace in two draws.
Hint: first pick is ace, 4/40 and second pick is not an ace 36/39, remember these are 2 draws
8. a deck contains 4 suits, 13 cards each, the probability of drawing two cards of same suit.
Hint: first draw doesn’t count, in the second draw the deck is 51 cards this time and 12 cards of the required suit.
9. These weird monkeys favor 3 types of berries, red, yellow, blue.
but not all monkeys created equally.
the probability of a monkey favoring red to blue and yellow
Hint: [RYB,RBY,BRY,BYR,YRB,YBR], the trick here is the monkey prefers red over blue, but you are not sure that she prefers yellow to red or blue.
10. you have stolen from the king, he is feeling generous, you are a smart guy, maximize you chance of survival in his game, 100 marbles, 50 white and 50 black marbles, put them in 2 jars.
Jars have 50-50 chance to b picked.
Hint:
Answer: (1/2)*(1)+(1/2)*(49/99) = (1/2)+(0.495)=0.747 (Good Luck)
11. Alice and Bob found unfair coin of 72% heads to 28% tails, they agreed to a game Alice will toss twice, if it comes up Heads then Tails, she wins; If came up Tails then Heads, Bob wins; if came up Heads or Tails it is a draw. What is Bob’s probability of winning?
Hint: Since the two consecutive coin tosses are independent, Pr[HT]=Pr[H]Pr[T], and Pr[TH]=Pr[T]Pr[H]. Does the winner depend on the bias Pr at all?(Note that the probability that someone wins in the first round does depend on the bias; but since the game is repeated until either HT or TH happens, it does not. For more, you may want to read about von Neumann’s trick; essentially, Alice and Bob have equal chances of winning, but the (expected) duration of the game will depend on the bias p=0.72))
Copied from http://math.stackexchange.com/questions/1622474/what-is-the-probability-of-bob-winning-the-game
12. boys’ birth probability 0.51, girls’ 0.49, researcher is interested to interview 50 families in which they are exactly 8 children.
what is the probability that at least in one family the children will all be of the same gender?
Hint:
13. Monty Hall game with 10 doors 9 goats and a car, if you switch what is your probability of winning the car?
Hint: at first you picked a door of 1/10 chance of winning, when the 8 doors were eliminated, the remaining one door (the one you didn’t pick) its chance didn’t change still at 1/10, but you odds have changed from 1/10 to 9/10.
14. you roll 2 six-sided fair dices, the probability that the sum of outcome is 7.
Hint: only 6 combination of dices can result of 7, the total outcomes are 36.
15. 0.05 of population are gays, 0.95 are straight, Susie can guess with 90% accuracy if one is gay or straight, what is the possibility that one is gay?
Hint:
16. the three dice puzzles,
Hint:
17. ancient Romans, [0,2], [2,10],[10,30],[30,70] and [70,90], what is the life expectancy of an ancient Roman, who was still alive at age of 30?
Hint:
18. a friend wants you to guess the amount of money he has, if yuo guess right the cash is yours, 50% chance he has 0$, 25% chance he has 1$,  24% chance he has 100$, 1% chance he has 1000$ what is the amount you should guess in order to maximize your experience?
Hint:
19. two departments A and B, A has a 50-50 men-women ratio,  B has 0.1 men and 0.2 women.
the overall acceptance in both departments are 0.3for men, and 0.25 for women.
22. to calculate the outcome of two daughters, from a couple who declared they have one daughter already, 0.49 girl birth, 0.51 boy birth.