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

Logic Puzzles

So, we are having a review of Probability An Statistics 101?

Given a continuous normal probability distribution from 1 to 3
No such thing. Continuous normal probability distributions don't have lower and upper bounds.

what is the probability 0f 2.0?
Assuming continuous-normal, zero. Assuming probability distribution from 1 to 3, insufficient data -- it depends on which non-continuous-normal distribution you have in mind.

When we make make measurements we take the arithmetic average of repeated measurements as an estimate of a true value. Why is this valid?
If the measurement errors are random, no other method of estimating the true value is likely to be closer. If the measurement errors aren't random it isn't valid.

I have three rods cumming off a continuous production line. The mean and standard deviations are
3 0.4
2.5 0 .2
4 0.8.
When put end to end what are the max and min lengths? What is probability of three rods together equaling 9.5 meters?
Assuming continuous normal length distributions, min and max length, insufficient data -- it depends how many rod sets you produce. Probability of 9.5 meters, zero.
 
Instead I found it fun to whip up a program which I think implements your plan. It prints
. . . . Numcases = 884736. That's 3^3 * 2^15.

I have taken pride over the decades that my software codes have been fast-running, and you'll seldom see code quite as brutish as the attachment. Time was when running through 884,000 cases would have been excessively time-consuming. Instead, in 2022 the program completes almost immediately.

Since code is good enough if it's fast enough, I'm more-or-less happy with the attachment, though there would be changes on delivery to a paying customer!
 
Not sure that's a red herring -- adding the 4th prisoner makes the problem harder to analyze.

Three can get to 75% chance of marriage/silver easily: ...
BRAVO! Did you find this yourself just now? I always thought you were a very smart guy.
Thanks, but obviously not as smart as I should be...

More than most puzzles, this one stumps many of the best solvers. It's just so "obvious" that you can't outperform 50%. Do you have an INTUITIVE explanation of how you can beat 50%?
I just observed that the "obvious" 50% solution doesn't use all the information the warden gives the prisoners. So I tried to think of something useful they could do with the extra information. After that it's just a matter of counting up the cases.

Aha! But my red herring was indeed just a herring ... but a tricky herring if I do say so myself. You still get 75% easily:


Pick one of the players. Call him George.

George always Abstains, and the other three players all ignore George.

homer-simpson-doh.gif


Pedant. "Randomly" used informally like this always means "Randomly with a uniform distribution."
If "Randomly" is the intent, "Randomly but not necessarily uniformly" would be written.
[pedantmode]Okeydokey. But if some of the other unspecified details of the scenario are filled in in certain ways, they can bump their odds up above 75%.[/pedantmode]
 
Assuming continuous-normal ...

There you guys go again, assuming "Normal" distribution.
Skies are not always Blue. Distributions are not always Normal.
In particular I call attention to "Black swan" events — Do you recall the Nobel economists who blew up their hedge fund by assuming "normalness" in Treasury pricings? If you study financial market stats, you may look for normalness in vain. What with Ukraine and Whatshisname, 2020, 2021 and 2022 etc. All we see lately are Black Swans.

I hope we can restrict further attention in this thread to The Cauchy Distribution instead of Gauss' so-called The Normal Distribution

If your simulator/calculator lacks a Cauchy variate, there are two easy ways to generate one.
(1) Take the quotient of two zero-mean Normal variates.
(2) Take the tangent of a Uniform variate.
@@Mathematicians: Is this correct?)
 
For a continuous(infinite) PDF the probability of a finite number is zero. A trick question of sorts. The probability of a finite point is the limit of the integral as the limits of integration go to zero. dx can not go to zero, then is then 0.

The arithmetic mean as the best estimator applies to a normal distribution. Maximum likelihood estimators. Take the derivative of the PDF and solve for the maximum. Min max problem.

The average of the normal PDF from 1 to 3 woud be two. I should have said with1 and 3 being +- 5 standard deviations of the average which is about 99.9% of the distribution or so.

The average of the 3 bars together is the sum of the averages. The standard deviations combine RMS root sum squared. 5 or 6 standard deviations are general but mot always considered to be the limits. I usually used 5 SD.
 
Instead I found it fun to whip up a program which I think implements your plan. It prints
. . . . Numcases = 884736. That's 3^3 * 2^15.

I have taken pride over the decades that my software codes have been fast-running, and you'll seldom see code quite as brutish as the attachment. Time was when running through 884,000 cases would have been excessively time-consuming. Instead, in 2022 the program completes almost immediately.

Since code is good enough if it's fast enough, I'm more-or-less happy with the attachment, though there would be changes on delivery to a paying customer!

Right. If the customer is only interested in solving that one puzzle you've got it made. But if he wants to solve all puzzles of a given type it would be hard to sell a program that is hard-coded for just that problem. One motto is "If you have to solve it for three, then you might as well solve it for N".
 
I doubt there is any one specific solution for a class of problems.There are approaches and strategies for classes of problems.

For me iterative solutions were always more time efficient than rrying to reduce it to a closed solution. Many problems are non linear and can olny be solved by iterative techniques.

Spreadsheets have a basic solver. Examples should be online. Try 'excel solver'.

Swammerdami is speaking from experience.
 
Dmitri:
(1) Exactly one of us three brothers is guilty of the old man's murder.
(2) Exactly one of us three brothers is a Knucklehead.
(7) None of us three are Knights.
(8) Papa had a mole on his left ankle.

Ivan:
(3) Exactly two of us three brothers are guilty of the old man's murder.
(4) Exactly one of us three brothers is a Knight.
(9) No, I am not guilty.
(10) Papa had a mole on his right ankle.


Alexei:
(5) I am not guilty of my father's death.
(6) None of us three are Knuckleheads.
(11) Exactly one of us three brothers is a Knave.
(12) There are exactly two true statements among (1), (7) and (10).

Analysis:
If Ivan is a knight, then Dmitri and Alexei killed Fyodor (3). And 3,4,9,10 are all true.
If Ivan is a knight then (1) is false and (7) and (8) are also false, thus Dmitri is a knave rather than a knucklehead.
If Dmitri is a knave, then (2) is false and there are either 0 or 2 knuckleheads. So, Alexei's statement (6) is true! This means Alexi cannot be a knave because he made a true statement. Nor can he be a knight because (5) was a false statement. Then Alexei would be a knucklehead...except that 5 and 6 would be both false.
So, this solution doesn't seem to work.

If Ivan is a knave, then 3, 4, 9, and 10 would all be false.

Back to Swami's original clue: Dmitri cannot be a knight and claim 7 that none of them is a knight. So let's test Dmitri next:
If Dmitri is a knave, then 7 is false meaning either Alexei or Ivan must be a knight.

If Alexei is a knight then 5, 6, 11, and 12 must be true. 6 means that Dmitri and Ivan are not knuckleheads. Therefore they must be either knights or knaves. If Dmitri is not a knight, then he must be a knave, and if 11 is true then Ivan must be a knight. But we've eliminated Ivan from knighthood above. So, Alexei cannot be a knight either.

So far, it seems that Dmitri, Ivan, and Alexei are not knights. We have no knights, just knaves and knuckleheads.

... At this point I decided to throw up my hands in defeat.
 
So far, it seems that Dmitri, Ivan, and Alexei are not knights. We have no knights, just knaves and knuckleheads.

... At this point I decided to throw up my hands in defeat.

Well done! Once you know there are no Knights, Dmitri must be Knucklehead and 27 cases {Knight, Knuck, Knave}^3 have been reduced to just four: (Knuck) x (Knuck, Knave)^2. Assuming either Ivan or Alexei Knucklehead will lead to a contradiction.

This is NOT an easy puzzle — and I'm very impressed with the friend who got it in 20 minutes. I did want it to be challenging.
 
So far, it seems that Dmitri, Ivan, and Alexei are not knights. We have no knights, just knaves and knuckleheads.

... At this point I decided to throw up my hands in defeat.

Well done! Once you know there are no Knights, Dmitri must be Knucklehead and 27 cases {Knight, Knuck, Knave}^3 have been reduced to just four: (Knuck) x (Knuck, Knave)^2. Assuming either Ivan or Alexei Knucklehead will lead to a contradiction.

This is NOT an easy puzzle — and I'm very impressed with the friend who got it in 20 minutes. I did want it to be challenging.
I'm still recommending that you arrest the butler.
 
So far, it seems that Dmitri, Ivan, and Alexei are not knights. We have no knights, just knaves and knuckleheads.

... At this point I decided to throw up my hands in defeat.

Well done! Once you know there are no Knights, Dmitri must be Knucklehead and 27 cases {Knight, Knuck, Knave}^3 have been reduced to just four: (Knuck) x (Knuck, Knave)^2. Assuming either Ivan or Alexei Knucklehead will lead to a contradiction.

This is NOT an easy puzzle — and I'm very impressed with the friend who got it in 20 minutes. I did want it to be challenging.

Your program was a big hint as to how to go about this. For example, you listed out the various claims by each brother in the // comments. There was a lot I didn't understand in the program though (like, are those "for (Bt[n]..." statements nested? without { } of their own?). But this is not a thread on C++ programming so I should look that up myself if I'm curious.

Perhaps I'll continue working it out manually as I find myself looking to avoid doing work around the house.
 
There was a lot I didn't understand in the program though (like, are those "for (Bt[n]..." statements nested? without { } of their own?). But this is not a thread on C++ programming so I should look that up myself if I'm curious.

The code is in vanilla C, not in C++.
And yes, in the Code
for (x = 0; x < WIDTH; x++) for (y = 0; y < HEIGHT; y++) for (z = 0; z < DEPTH; z++) { whatever(); }​
any braces are optional because each for body is a single statement. (' for (...) { ... } ' is a single statement so so is ' for (...) for (...) { ... } '.

But I write the fors right underneath each other, as in the source posted upthread. No need for indentations, especially here where the nesting is 16 levels deep!

Perhaps I'll continue working it out manually as I find myself looking to avoid doing work around the house.

Given that no brother is a Knight (I do not vouch for your proof of that), Dmitri is quickly shown to be Knucklehead. Then assume statement (1) is true — that will soon lead to contradiction. So (1) is false; complete solution soon follows.
 
There was a lot I didn't understand in the program though (like, are those "for (Bt[n]..." statements nested? without { } of their own?). But this is not a thread on C++ programming so I should look that up myself if I'm curious.

The code is in vanilla C, not in C++.
And yes, in the Code
for (x = 0; x < WIDTH; x++) for (y = 0; y < HEIGHT; y++) for (z = 0; z < DEPTH; z++) { whatever(); }​
any braces are optional because each for body is a single statement. (' for (...) { ... } ' is a single statement so so is ' for (...) for (...) { ... } '.

But I write the fors right underneath each other, as in the source posted upthread. No need for indentations, especially here where the nesting is 16 levels deep!

Perhaps I'll continue working it out manually as I find myself looking to avoid doing work around the house.

Given that no brother is a Knight (I do not vouch for your proof of that), Dmitri is quickly shown to be Knucklehead. Then assume statement (1) is true — that will soon lead to contradiction. So (1) is false; complete solution soon follows.

Hey! No spoilers!!
 
Guess2:
Dmitri: Knucklehead
T (1) Exactly one of us three brothers is guilty of the old man's murder.
F (2) Exactly one of us three brothers is a Knucklehead.
T (7) None of us three are Knights.
F (8) Papa had a mole on his left ankle.

Ivan: Knave
F (3) Exactly two of us three brothers are guilty of the old man's murder.
F (4) Exactly one of us three brothers is a Knight.
F (9) No, I am not guilty.
F (10) Papa had a mole on his right ankle.

Alexei: Knucklehead
T (5) I am not guilty of my father's death.
F (6) None of us three are Knuckleheads.
T (11) Exactly one of us three brothers is a Knave.
F (12) There are exactly two true statements among (1), (7) and (10).

Edit: Phooey! I just noticed that 12 was true! Arrgh.
 
Frustrated, I decided to "turn to the back of the book for the answer". I plugged your program into Visual Studio and ran it for the correct answers this morning. But I won't print the result here, in case anyone else is still working on it.
 
This one's a bit old:
A father and son were driving to the river to go fishing. A truck ran through a stop light and hit the car on the driver's side. When the ambulance arrived the father was dead, but the son was still living, and was rushed to the hospital. The surgeon saw the boy and said, "I can't operate on this boy, because he is my son". What's going on here?
 
This one's a bit old:
A father and son were driving to the river to go fishing. A truck ran through a stop light and hit the car on the driver's side. When the ambulance arrived the father was dead, but the son was still living, and was rushed to the hospital. The surgeon saw the boy and said, "I can't operate on this boy, because he is my son". What's going on here?
Why is Anthony Jeselnik never there when you need him?
 
This one's a bit old:
A father and son were driving to the river to go fishing. A truck ran through a stop light and hit the car on the driver's side. When the ambulance arrived the father was dead, but the son was still living, and was rushed to the hospital. The surgeon saw the boy and said, "I can't operate on this boy, because he is my son". What's going on here?
The boy has gay mae married parents, if the doctor is male.
The doctor is the wife, if the doctor is female.
The doctor is the divorced father and the wife remarried, with the new husband adopting the boy.
The boy was put up for adoption at birth.

......
 
This one's a bit old:
A father and son were driving to the river to go fishing. A truck ran through a stop light and hit the car on the driver's side. When the ambulance arrived the father was dead, but the son was still living, and was rushed to the hospital. The surgeon saw the boy and said, "I can't operate on this boy, because he is my son". What's going on here?
The boy has gay mae married parents, if the doctor is male.
The doctor is the wife, if the doctor is female.
The doctor is the divorced father and the wife remarried, with the new husband adopting the boy.
The boy was put up for adoption at birth.

......

The doctor is the boy's mother (as you correctly said). It used to puzzle people 20 years ago, but most people today don't find the notion of a woman doctor to be so unimaginable. (That's what Bomb#20 meant by bringing up Anthony Jeselnik who sometimes uses mysogynistic humor).
 
Back
Top Bottom