• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

Logic Puzzles

Back in the 80s I stumbled on an early 20th century puzzle book in a used book store. Puzzle books with word and math peoblems were common. Crossword puzzles. When I was good paper back puxxles books were common on the mahgazie racks.

There were daiky puzles in newspapers. If you want a challnge try the NYT crossword puzzle


Or the Mensa sample test.


 
NPR has a cpuple of weekend puzzle word game shows.



 
You are captured by an evil warlord and are facing beheading.

He gives you a chance to live.

You are facing him with his palms up. In one hand he has two marbles. He puts his hands behind him and brings them forward with fists closed.

There can be two balls in one fist, or 1 ball in each fist. What are the odds of choosng correctly and living? Guess right and you live.
 
You are captured by an evil warlord and are facing beheading.

He gives you a chance to live.

You are facing him with his palms up. In one hand he has two marbles. He puts his hands behind him and brings them forward with fists closed.

There can be two balls in one fist, or 1 ball in each fist. What are the odds of choosng correctly and living? Guess right and you live.
There are three possible combinations:
  1. Two marbles in his left hand
  2. Two marbles in his right hand
  3. One marble in each hand
The guess "both marbles in one fist" would be correct if either 1 or 2 occurs.

But we don't know how the warlord chooses a combination. As the puzzle is written there's no indication that the warlord ever moves any marbles between his hands. I can make two guesses at the probabilities:
  1. Two marbles in his left hand: 33.3% or 100% chance.
  2. Two marbles in his right hand: 33.3% or 0% chance.
  3. One marble in each hand: 33.3% or 0% chance.
Which means that "both marbles in one fist" either has a 66.6% or 100% chance of being correct.

But then again, the warlord is evil so he probably has one marble in each hand just to fuck with me.

If the warlord is Monty Hall then he'll open a door to reveal a goat and give me the chance to change my answer.
 
The possibilities. The odds are 1 in 3. I was hoping somebody else was gong to try and solve it. I could have made it seem more complicated by adding more marbles.

Simple combinatorics. You either see it or go down a rabbit hoe over analyzing the problem.

LeftRight
02
20
11
 
You are captured by an evil warlord and are facing beheading.

He gives you a chance to live.

You are facing him with his palms up. In one hand he has two marbles. He puts his hands behind him and brings them forward with fists closed.

There can be two balls in one fist, or 1 ball in each fist. What are the odds of choosng correctly and living? Guess right and you live.
What is the "right" choice? We need that information to calculate the probability of getting it.
 
You are captured by an evil warlord and are facing beheading.

He gives you a chance to live.

You are facing him with his palms up. In one hand he has two marbles. He puts his hands behind him and brings them forward with fists closed.

There can be two balls in one fist, or 1 ball in each fist. What are the odds of choosng correctly and living? Guess right and you live.
What is the "right" choice? We need that information to calculate the probability of getting it.
Are you serious? Down the rabbit hole we go?

Bigfield got it nicely. No muss no fuss.
 
You are captured by an evil warlord and are facing beheading.

He gives you a chance to live.

You are facing him with his palms up. In one hand he has two marbles. He puts his hands behind him and brings them forward with fists closed.

There can be two balls in one fist, or 1 ball in each fist. What are the odds of choosng correctly and living? Guess right and you live.
What is the "right" choice? We need that information to calculate the probability of getting it.
Are you serious? Down the rabbit hole we go?

Bigfield got it nicely. No muss no fuss.
Do some reading on permutations and combinations.
 
You are captured by an evil warlord and are facing beheading.

He gives you a chance to live.

You are facing him with his palms up. In one hand he has two marbles. He puts his hands behind him and brings them forward with fists closed.

There can be two balls in one fist, or 1 ball in each fist. What are the odds of choosng correctly and living? Guess right and you live.
What is the "right" choice? We need that information to calculate the probability of getting it.
Are you serious? Down the rabbit hole we go?

Bigfield got it nicely. No muss no fuss.
Actually, Bigfield pointed out the same problem I did. He said: "But we don't know how the warlord chooses a combination. As the puzzle is written there's no indication that the warlord ever moves any marbles between his hands." You have the habit of omitting important information, and when asked for it, you get snarky.
 
I tell you I wrote a number from 1-10 on a piece of paper and if you guess it I'll give yo $20.

How I choose the number is irrelevant. The odds for you are 1/10 regardless.

Using the idea of someone putting theeir hands behind him and bringing the fists forward closed is irrelevant, intened to muddy the waters. If I added more marbles it would have required calucltubg the combinations and make it a math problem.

As stated there are a fixed number of combinations to to choose from rgadless of how the choise is made by the war lord.

Bigfield did reason it out and get the right answer.

With a table for this problem is easy to see the answer.

How would you calculate the answer?
 
Using the idea of someone putting theeir hands behind him and bringing the fists forward closed is irrelevant, intened to muddy the waters. If I added more marbles it would have required calucltubg the combinations and make it a math problem.
When students of probability are given word problems, the problem usually doesn't tell you that the coin being tossed is a fair coin, or that the dice being rolled are fair dice, but the problem is usually unworkable unless you make that assumption. However, you expected us to assume we are dealing with an evil but fair warlord, which is a bit more of a stretch.

In addition, the puzzle could have been a brain teaser: "I said the warlord put his hands behind his back, I didn't say he did anything with the marbles while his hands were concealed. Gotcha!"

The warlord could have used any number of random or non-random mechanisms to choose a combination?
  • Perhaps he had an aide, out of sight of the contestant, roll a fair six-sided dice, and he arranged the marbles depending on some evenly weighted mapping between dice results and marble combinations?
  • Perhaps he had the aide flip a coin to determine the hand for the first marble, and then again for the second marble? In that case there is a 50/50 chance there is one marble in each hand, because we then have to count both the permutations and combinations of marble locations.
  • Perhaps he only put one marble on each hand on a Sunday, in which case there's a 6 in 7 chance that the marbles are both in one hand, assuming that the day of the contest itself is completely random. Do warlords work on Sundays? I've never looked into it.
  • Perhaps he always put one marble in each hand, in which case there is 0% chance that the marbles are both in one hand.
Do some reading on permutations and combinations.
If I added more marbles it would have required calucltubg the combinations and make it a math problem.
I learned and forgot the formulae for calculating permutations and combinations about a month ago. Something involving factorials that I could probably derive if I ever need to.

It's enough to have an intuitive understanding of the problem, and then go and figure out the maths if and only if you actually need it.
 
Here's a famous chestnut (probably posted on this very forum a few years ago) dealing with permutations. No fair Googling!

The warden is tired of running the prison with its 100 prisoners, numbered #1 to #100. He announces a game. If ALL 100 prisoners succeed in their quest, then ALL will be set free. But if even a single prisoner fails, then ALL will be executed. The prisoners are given 24 hours to discuss strategy; but then the game begins and no further communication is permitted.

There are 100 cards, labeled #1 to #100 and they are placed randomly (uniformly) into 100 boxes labeled #1 to #100, one card per box.

Each prisoner in turn enters alone into the room with the boxes, and opens 50 of them. If he finds the card with his own number he completes his quest. He leaves the boxes and their contents exactly as he found them, and any fingerprints etc. are erased. If he fails then ALL 100 prisoners are immediately executed.

What is a good strategy, if any, for prisoners? What is their survival chance approximately?
 
Using the idea of someone putting theeir hands behind him and bringing the fists forward closed is irrelevant, intened to muddy the waters. If I added more marbles it would have required calucltubg the combinations and make it a math problem.
When students of probability are given word problems, the problem usually doesn't tell you that the coin being tossed is a fair coin, or that the dice being rolled are fair dice, but the problem is usually unworkable unless you make that assumption. However, you expected us to assume we are dealing with an evil but fair warlord, which is a bit more of a stretch.

In addition, the puzzle could have been a brain teaser: "I said the warlord put his hands behind his back, I didn't say he did anything with the marbles while his hands were concealed. Gotcha!"

The warlord could have used any number of random or non-random mechanisms to choose a combination?
  • Perhaps he had an aide, out of sight of the contestant, roll a fair six-sided dice, and he arranged the marbles depending on some evenly weighted mapping between dice results and marble combinations?
  • Perhaps he had the aide flip a coin to determine the hand for the first marble, and then again for the second marble? In that case there is a 50/50 chance there is one marble in each hand, because we then have to count both the permutations and combinations of marble locations.
  • Perhaps he only put one marble on each hand on a Sunday, in which case there's a 6 in 7 chance that the marbles are both in one hand, assuming that the day of the contest itself is completely random. Do warlords work on Sundays? I've never looked into it.
  • Perhaps he always put one marble in each hand, in which case there is 0% chance that the marbles are both in one hand.
Do some reading on permutations and combinations.
If I added more marbles it would have required calucltubg the combinations and make it a math problem.
I learned and forgot the formulae for calculating permutations and combinations about a month ago. Something involving factorials that I could probably derive if I ever need to.

It's enough to have an intuitive understanding of the problem, and then go and figure out the maths if and only if you actually need it.
I was talking to Soldier not you. I agree, intuitive is good.

I an not a mathematician, I forgot it nd had to look up the equations for combinations and permutations when I thought up the problem.
 
Last edited:
Using the idea of someone putting theeir hands behind him and bringing the fists forward closed is irrelevant, intened to muddy the waters. If I added more marbles it would have required calucltubg the combinations and make it a math problem.
When students of probability are given word problems, the problem usually doesn't tell you that the coin being tossed is a fair coin, or that the dice being rolled are fair dice, but the problem is usually unworkable unless you make that assumption. However, you expected us to assume we are dealing with an evil but fair warlord, which is a bit more of a stretch.

In addition, the puzzle could have been a brain teaser: "I said the warlord put his hands behind his back, I didn't say he did anything with the marbles while his hands were concealed. Gotcha!"

The warlord could have used any number of random or non-random mechanisms to choose a combination?
  • Perhaps he had an aide, out of sight of the contestant, roll a fair six-sided dice, and he arranged the marbles depending on some evenly weighted mapping between dice results and marble combinations?
  • Perhaps he had the aide flip a coin to determine the hand for the first marble, and then again for the second marble? In that case there is a 50/50 chance there is one marble in each hand, because we then have to count both the permutations and combinations of marble locations.
  • Perhaps he only put one marble on each hand on a Sunday, in which case there's a 6 in 7 chance that the marbles are both in one hand, assuming that the day of the contest itself is completely random. Do warlords work on Sundays? I've never looked into it.
  • Perhaps he always put one marble in each hand, in which case there is 0% chance that the marbles are both in one hand.
Do some reading on permutations and combinations.
If I added more marbles it would have required calucltubg the combinations and make it a math problem.
I learned and forgot the formulae for calculating permutations and combinations about a month ago. Something involving factorials that I could probably derive if I ever need to.

It's enough to have an intuitive understanding of the problem, and then go and figure out the maths if and only if you actually need it.
I like your work. It's good to know that somebody here besides myself actually understands math. Keep up the good work!
 
I tell you I wrote a number from 1-10 on a piece of paper and if you guess it I'll give yo $20.

How I choose the number is irrelevant. The odds for you are 1/10 regardless.
OK here you're explaining what's necessary to win the money. Very good. That's the way to present a math puzzle.
Using the idea of someone putting theeir hands behind him and bringing the fists forward closed is irrelevant, intened to muddy the waters. If I added more marbles it would have required calucltubg the combinations and make it a math problem.

As stated there are a fixed number of combinations to to choose from rgadless of how the choise is made by the war lord.
True, but what's the point? Did you want us to post what that number is?

Anyway, let me present a "correctly presented" puzzle. Say the warlord tells you truthfully that he will give you a chance to live. He places two red balls and two blue balls in an opaque bag and explains that if you pull two blue balls without looking and without replacement, then you will live. What are your chances of living assuming that there's an equal probability of pulling each of the four balls?

This puzzle provides all the information you need to solve it and states clearly what you are to come up with to solve it.
Bigfield did reason it out and get the right answer.
Actually, he posted some possible answers because he wasn't sure what he needed to post to solve the puzzle.

By the way, you should take some lessons from Bigfield. He's demonstrated understanding of the material. I'm sure he didn't acquire that understanding by flying off the handle every time he was corrected.
With a table for this problem is easy to see the answer.

How would you calculate the answer?
What, exactly, do you want me to calculate?
 
I am not expecting anything from you Soldier.

I wanted to see if you could reason through a simple non textbook problem, which you were unable to do.
 
Here's a famous chestnut (probably posted on this very forum a few years ago) dealing with permutations. No fair Googling!

The warden is tired of running the prison with its 100 prisoners, numbered #1 to #100. He announces a game. If ALL 100 prisoners succeed in their quest, then ALL will be set free. But if even a single prisoner fails, then ALL will be executed. The prisoners are given 24 hours to discuss strategy; but then the game begins and no further communication is permitted.

There are 100 cards, labeled #1 to #100 and they are placed randomly (uniformly) into 100 boxes labeled #1 to #100, one card per box.

Each prisoner in turn enters alone into the room with the boxes, and opens 50 of them. If he finds the card with his own number he completes his quest. He leaves the boxes and their contents exactly as he found them, and any fingerprints etc. are erased. If he fails then ALL 100 prisoners are immediately executed.

What is a good strategy, if any, for prisoners? What is their survival chance approximately?
If I put 100 numbered balls in a box the odds of picking any one number is 1/100. 100 people pull a ball and put it back. Random sampling with replacement. The odds of picking a specific number is 1/100 for each person.

As it is a random process I see no general statistical sampling process that changes the odds. The puzzle did not say the prisoners could not talk to each other. If the first prisoner is successful and then tells the other prisoners the number of the box he picked reducing sample size and improving the odds for the next prisoner. If not having numbers on the box serves no purpose.

If they can not communicate the successfully picked boxes then it is straight probabilities. and each prisoner in turn has the same probability of success.

The 50 box out of 100 twist is just another sampling problem.

I'll work out both scenarios, unless I am totally off base.

Nice little problem Swami.
 
As it is a random process
It isn't.

The problem should state that the prisoner opens the boxes one at a time and gets to see the number on each card the reveals before choosing the next box.

(I saw the solution on Veritasium a few months ago, so I can't participate.)

Here is how the problem is stated on Wikipedia, using drawers instead of boxes:
The director of a prison offers 100 death row prisoners, who are numbered from 1 to 100, a last chance. A room contains a cupboard with 100 drawers. The director randomly puts one prisoner's number in each closed drawer. The prisoners enter the room, one after another. Each prisoner may open and look into 50 drawers in any order. The drawers are closed again afterwards. If, during this search, every prisoner finds their number in one of the drawers, all prisoners are pardoned. If even one prisoner does not find their number, all prisoners die. Before the first prisoner enters the room, the prisoners may discuss strategy — but may not communicate once the first prisoner enters to look in the drawers. What is the prisoners' best strategy?
Interestingly, the Wikipedia article says that each prisoner has a 50% chance of success if they choose 50 drawers at random, but this does not account for the fact that they will not choose the same drawer/box twice. The odds of finding their number after 50 random guesses should be (1/100 + 1/99 + ... + 1/51), which is about 69 (nice) percent.
 
The problem should state that the prisoner opens the boxes one at a time and gets to see the number on each card the reveals before choosing the next box.
Drat! I should have stated the problem more carefully.

Interestingly, the Wikipedia article says that each prisoner has a 50% chance of success if they choose 50 drawers at random, but this does not account for the fact that they will not choose the same drawer/box twice. The odds of finding their number after 50 random guesses should be (1/100 + 1/99 + ... + 1/51), which is about 69 (nice) percent.
I beg to differ. Your 2nd pick has a 1/99 chance of success only if the first pick failed. So that 1/99 needs to be multiplied by the chance of 1st-pick failure, i.e. 99/100. 1/99*99/100 = 1/100. And so on. 50% IS the chance of success opening 50 bins at random. AND the chance of success for 1st prisoner to pick no matter how he plays.
 
I disagree. Didn't look it up on the net.

Pick 1 of 100 objects from a box and the probability is 1/100.Put the object back in and pick another and the odds are still 1/100. That is called random sampling with replacement

Pick 1 out of 100 and the odds are 1/100. Do not put the object back and pick again and the odds are 1/(100-1). Sampling without replacement.

I did the experimnt to porve it to myself back in the arly 80s when I sted doing qulaity and relibility work. Put 100 blue chips in and 80red chis in a box. Shake and pick, and put it back. shake again and sample. Repeat 20 times. The percentage sampled should bclose to 20/80.

It was tedious but instructive back when I did the simple experiments. These days you can do it wit random number generators. Scilab is good free till with statistcal functions.

Put numbers 1 - 10 on 10 chips. Shake and pick. Put it back in and shake, sample again. As samples go to infinity there should be an equal number of picks for all the numbers. You can trt 100 samples for numbers 110 on chips. Then repeat ecluding each numer picked.

Put two chips in a box lbeld 1 and 2 , shake an pick. the odds are 50/50.

Unless there is a defined algorim for picking from a selection, I call it random sampling.

If the first prisoner walks in and picks a box the odds are 1/100. If the next prisoner walks in and picks from the 100 not knowing the previous pick, the odds are still 1/100, Sampling with replacement.

If the first prisoner walks in and selects 1 out of 100 the odds are 1/100. If the next prisoner walks in and picks excluding the previous pick the odds are 1/99 and so on. Sampling without replacement. But Swami said each prisoner selects 50 out of 100 bozes an opens all of them.

The way Swami defined the problem each prisoner opens 50 boxes. If the first prisoner selected 50 and only opened 1 box 1'd say it is 0.5/50. If he opens all 50 boxes the odds of finding his number is 0.5. The next prisoner walks in and selects 50 boxes excluding the previous pick. What are the odds of finding his number in the 50 boxes?


As an approximation I'd say the probability is close to zero of the prisoners surviving.
 
Back
Top Bottom