Win a copy of Functional Reactive Programming this week in the Other Languages forum!

# Paradoxes and Ironies!!!!

Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
Jim, you are a really deep thinker!
Just beware of Angela, she is probably already aimed at you...
I think propagating weird symbols in Map's post are her work...

Eager Beaver
Ranch Hand
Posts: 187
Hi guys,
The creator of this thread is back....
1. A guy goes to a bank to encash his pay-check bearing amount \$X.Y...ie.X dollars and Y cents(i know nobody gets pay check with fractional amount but puzzles are meant to be unconventional/weird).The man at the counter goofs up by paying him \$Y.X. Anyway,
on the way back home he dispenses 20 cents to the wayside musician. Reaching home he finds that the amount left with him is exactly double the figure written on the check. Find the amount on the check.
2. There are 3 boxes each filled with balls. One of the 3 has only red balls, the other has only white while the 3rd box has a mix of red and white. To make matters worse(or interesting) the label on each box indicating the color of balls inside is FALSE.
You are allowed to pick balls from each box (without peeping inside the box....i know there are a few street smart types on the ranch)and every pick would be treated as an ATTEMPT/TRY in arriving at your answer. GUY WITH THE LEAST NUMBER OF ATTEMPTS WINS!!
3. Expand this => (A-X)(B-X)......(Z-X) = ?.
EAGERBEAVER.
As an aside, has any of you geniuses worked with REXX(mainframe based language widely used for creating utilities and system programming in MVS). I am looking for material to access DB2 via REXX.
Thanks.
[This message has been edited by Eager Beaver (edited May 01, 2001).]
[This message has been edited by Eager Beaver (edited May 01, 2001).]
[This message has been edited by Eager Beaver (edited May 02, 2001).]

Jim Yingst
Wanderer
Sheriff
Posts: 18671
To avoid the wrath of Angela, I will now avoid posting actual solutions, and just taunt others with hints. Accordingly:
1. Ummm... are you sure this is stated correctly? Maybe I'm missing something, but this seems pretty much impossible.
2. Can anyone beat one attempt?
3. Well, I was about to look up the binomial expansion formula (being too lazy to derive it myself), but then I spotted a nice short cut...
Sorry; I've never worked with REXX.
[This message has been edited by Jim Yingst (edited May 02, 2001).]

Jim Yingst
Wanderer
Sheriff
Posts: 18671
I presume the objective is to identify which box has red balls, which has white, and which is mixed.

Angela Poynton
Ranch Hand
Posts: 3143
Why do people think I don't like deep thinkers?

Eager Beaver
Ranch Hand
Posts: 187
Hey guys,
Sorry for not mentioning the objective of puzzle #2 in my prev post. Jim u r right.....identify which box contains what color balls.
Jim puzzle #1 definitely has an answer and I have included all info there is on this one.
eagerbeaver.
[This message has been edited by Eager Beaver (edited May 02, 2001).]

Eager Beaver
Ranch Hand
Posts: 187
Hi Guys,
Here comes another puzzle.....
A giant truck gets loaded to its max capacity and tips the scale on the weigh bridge at 10 tons. It starts from point A and after traversing a distance of 10 miles arrives at a bridge on river kiev. The board reading 'WARNING : VEHICLES NOT TO EXCEED TOTAL WEIGHT OF 10 TONS. 1 gram (CGS system) MORE AND THE BRIDGE COLLAPSES.' has been ignored by our careless driver. When he is about to get on the bridge a sparrow comes from nowhere and perches atop the truck and stays there while the truck traverses the bridge. Surprise of surprises the bridge remains intact and the truck is happily on its way. How did this miracle happen!!

eagerbeaver.
PS : Hope u all have seen sparrows.
[This message has been edited by Eager Beaver (edited May 02, 2001).]
[This message has been edited by Eager Beaver (edited May 02, 2001).]

Sahir Shibley
Ranch Hand
Posts: 275

Re ball problem. If you pick one from each box (forgive me if this sounds vulgar) you will get two balls of the same colour. So one of these boxes is the mixed box which automatically eliminates the other one. You will need to continue to pick one from each of these two boxes until you get a different colour from one of the boxes which will confirm it as the box with mixed balls.

Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
Amuzingly watching Jim�s activity, a thought came into my mind (accidentally) First I wanted to ask you all to find a puzzle Jim will not be able to solve. But then I thought "Why do not we..." eeerr I mean "why don�t we grant this Mission Impossible to Jim himself?".
Jim. Mission for you.
Please, make up a puzzle you will not be able to solve.
P.S. It is not plagiarism, it is reuse.
P.P.S. Angela, explanations are in this thread:
Sahir Shibley
The Master is around. He is keeping a low profile becuase, Angela [following the footsteps of PolPot] is hunting down all intellectuals.
Mapraputa Is
...And now it's clear why such a horrible intellectual community as a JR doesn't participate in paradox resolving actively - they are afraid of Angela's persecution. Not to say that it is Angela's personality that exhibits such obscurantist tendencies, just her official post as a moderator of Meaningless Drivel forum requires her to maintain certain level of meaninglessness and persecute too deep thinking. Oh well...

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Sahir- there was additional info in the problem which you haven't made any use of. It's possible to resolve the whole problem by picking just one ball.
Map- well, Eager Beaver's \$x.y problem has me stumped. At this point I'm just waiting to see what others come up with, or what the "official" solution is.
Eager Beaver- I'm a bit confused by your comment about "fractional amounts". I've certainly gotten paychecks that have a nonzero amount of cents on them - is that what you meant? Or are X and Y allowed to have non-integral values? One "solution" is to start with 1 dollar and 79/99 of a cent. After giving away 20 cents the remaining money could be expressed as 79/99 dollars and 1 cent. But that seems an extremely silly way to express an amount of money, and the solution is not unique.
For the truck-and-bridge problem, the possibilities that occur to me are: (1) the giant truck is longer than the bridge, so the full weight of the truck is never on the bridge; (2) the sparrow was flapping its wings or gliding in place so that its weight never actually pressed against the truck; or (3) the sign was wrong, and 1 gram could never possibly mak a difference like that in the real world.

Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
Clarification: one attempt = one pick from a box regardless of how many balles are taken?
Also: were 20C actually taken out of check? In other case any equal numbers like 50.50 will fit
[This message has been edited by Mapraputa Is (edited May 02, 2001).]

Jim Yingst
Wanderer
Sheriff
Posts: 18671
1 attempt = 1 pick of 1 ball from 1 box.

Sahir Shibley
Ranch Hand
Posts: 275
This is my negation of the x.y problem. I am not sure if this is water tight, nevertheless here it is.

Let the amount spent be k.
If subtracting k cents from x dollars and y cents gives you y dollars and x cents
then y = x + 20
this is the first half of the equation.

You get the second part by converting the entire amount to cents.
100x + y - 20 = 100y + x

substituting the values and attempting to solve for x gives you
100x + x + 20 - 20 = 100x + 2000 + x
which gives you 0 = 2000 which is impossible.
I dont think this is solvable for any non zero value of k and where x <> y . Are you sure you havent missed something out.
Maybe he had a beer on the way

OK. Jim. I give up on the ball problem. What is the answer? At least give me a hint.

[This message has been edited by Sahir Shibley (edited May 03, 2001).]

Sahir Shibley
Ranch Hand
Posts: 275

OK. I got it now. The labels. Yet its not possible with one try. Suppose you pick one ball from a box, its a red ball and the label says red. That means you have picked a ball from the mixed box. You still need to pick one more ball from one of the other two boxes to identify the other two.

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Sahir- for the ball problem, keep going. You're almost there.
For the \$x.y problem, I don't see where your equation y = x + 20 came from. It makes no sense to me. However I agree with the second equation:
100x + y - 20 = 100y + x
This reduces to:
99x - 20 = 99y
y = x - 20/99
This has an infinite number of solutions, but none for which both x and y are integers.
[This message has been edited by Jim Yingst (edited May 02, 2001).]

Nanhesru Ningyake
Ranch Hand
Posts: 452
Originally posted by Mapraputa Is:
First I wanted to ask you all to find a puzzle Jim will not be able to solve

Ok, here's a fun puzzle for Jim (and everybody else!). Solve this one, and you'll win the title "The Boss", or anything better Sahir can think of
I call this problem, simply, 'The Triangles Problem'. Take a look at the diagram below:

<pre>
<big>
0
/\
1 --
/\/\
2 ----
/\/\/\
3 ------
/\/\/\/\
4 --------
/\/\/\/\/\
5 ----------
</big></pre>

Given the level 'n' (0,1,2,3...) your task is design an equation to find T(n) which is the total number of triangles at that level. These are triangles of all types, sizes, inverted, overlapping etc. It would be better if you draw this out on paper and start working on it.
Here's some sample data:
<pre><big>
n T(n)
1 1
2 5
3 13
4 27
5 48</big></pre>
The challenge is to find the most elegant and simple solution. Enjoy!

[This message has been edited by Nanhesru Ningyake (edited May 02, 2001).]

Sahir Shibley
Ranch Hand
Posts: 275
He had y cents and when he spent 20 cents it became equal to x.
so x = y - 20 which is also y = x + 20.
Also obviously non integer values of x and y are out of the question because its silly to express something like 75 cents as
\$ 1/2 and 25 cents.
[This message has been edited by Sahir Shibley (edited May 02, 2001).]

Jim Yingst
Wanderer
Sheriff
Posts: 18671
If he had 2 dollars and 10 cents, and spent 20 cents, then he would have 1 dollar and 90 cents. How would this be represented by your equation y = x + 20? The second equation is correct; the first is incomplete.
And of course, I agree that fractional values of x and y are silly. It's just that (a) Eager Beaver said something about fractional values at the beginning, which didn't make much sense, and (b) there's no solution possible otherwise. So I thought the possibility worth mentioning.
Re: the triangle problem. Oh sure, that's easy... errr... hmmm... I think I'll leave this one for others to look at, before I provide a solution. Yeah, that's the ticket.

Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
If 20 c were taken out of check and x.y = y.x, than x could
1) remain the same => x=y which kind of contradict to the -20c operation
2) become x-1 => y becomes y+1 which gives us y = x � 1 which being combine with Jim�s calculations above gives us...

Sahir Shibley
Ranch Hand
Posts: 275
Originally posted by Jim Yingst:
[B]If he had 2 dollars and 10 cents, and spent 20 cents, then he would have 1 dollar and 90 cents. How would this be represented by your equation y = x + 20? The second equation is correct; the first is incomplete.
[B]

Thats exactly what I am driving at. The first equation arises from the fallacy \$x.y - 20 = \$y.x. That is if he has \$2.10 and he spends 20 cents he should have \$10.2.

For example if I wanted to prove there are no positive integers x<sup>n</sup>+ y<sup>n</sup> = z <sup>n</sup> such that for n >2 (Not that I want to. Andrew Wiles has already done it ). I would start out with the assumption that such a thing is true and if I succeed in negating it by proving that if it were true then it would always lead to an impossibility then I have the proof.
I think the solution when it comes may involve something that isnt really kosher like mixing decimals and fractions .
[This message has been edited by Sahir Shibley (edited May 02, 2001).]

Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
Maybe the name of this thread gives us a clue...
Regarding false balls:
Jim, maybe I misunderstand something. If we are lucky we can identify boxes with one try, yes. But consider this situation: we have three signs: white, red, white. Ok, we immediately know that box with white balls is hidden under "red" sign. Then we take a ball from either of two others and it happened to be red. How do you know if it's out of "red" or "mixed" box? Or the puzzle imply that the signs must be exactly one "white", one "red" and one "mixed"? Then it�s too easy...

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Ah, you're right. I was making the assumption that the three signs were "red", "white", and "mixed", like the boxes themselves (but of course, the signs are all on the wrong boxes.) It's true this isn't actually stated in the problem. But I'm betting it's something Eager Beaver meant to say, kind of like the problem statement itself. Because without this assumption, there's no elegant solution possible - it's always possible that you will be in a situation where you just have to keep drawing balls from boxes, hoping to finally find a ball different in color from the last one you drew from that box. Note that it's also possible that the signs could say "blue", "orange" and "yellow with purple polka dots". But that makes the signs completely useless to the problem - why mention them at all? I assumed that Eager Beaver put the signs in the problem for a reason, and made one additional assumption that was necessary in order for the signs to actually be useful.
This is not unusual - for your guard problem, we needed to make the additional assumptions that (a) each guard knew which door led to freedom, and (b) each guard knew whether the other guard told the truth or not. These were never stated in the problem, but they seemed necessary to get a solution, so we made the assumptions. Actually it's possible to revise the solution to remove the need for (b), but not (a). I'll leave that as an exercise for those interested.
> Maybe the name of this thread gives us a clue...
When you find a paradox, it's usually an indication that the logical system you've set up is based on faulty premises. Paradoxes are not inherently profound - they just point to errors in reasoning. Simple example - "This statement is false." The fundamental error is to assume that a sentence must have a boolean truth value. This one doesn't. Once you identify that error and throw it out, there's nothing profound left. The sentence is a collection of symbols with no real meaning.
In the case of the \$x.y problem, Sahir and I seem to agree that the problem is logically impossible. I disagree with one part of Sahirs reasoning, but I don't suppose it matters, since our conclusion is the same. The apparent inconsistency in the problem indicates that either (1) we have misunderstood something, (2) we have overlooked something, or (3) the problem has no solution. It's not enough to say "it's a paradox" unless you can find the cause of the problem.
"Too easy"? Well, most of these problems are easy after you've realized the solution. They may or may not seem that way beforehand...

Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
Because without this assumption, there's no elegant solution possible
I also love elegant solutions, but "elegant" and "too easy" do not combine well. When I first thought about this puzzle, the first idea that came to my mind solved "white", "red", "mixed" problem. There are not so many puzzles Map can solve from the first try. That�s why she decided that she missed something and... yes! She found a way to complicate the problem
Note that it's also possible that the signs could say "blue", "orange" and "yellow with purple polka dots".
Well, that�s basically the same like if there was no signs at all.
So your assumption was that signs were just moved from "right" box to "wrong", whereas Map assumed that their values were restricted by "white", "red", "mixed" but doubles and omissions were allowed, as long as signs do not match boxes.
This is not unusual - for your guard problem, we needed to make the additional assumptions that (a) each guard knew which door led to freedom, and (b) each guard knew whether the other guard told the truth or not.
I have no idea why folk employed both guards , but assumption a) is a good point. I think a good puzzle should eliminate any ambiguity. Or different people will make different assumptions. Remember Map�s puzzle1? "there are three numbers, 0,1,2..." Some people asked me how well the guy who could answer "I do not know" knew math... I think the variant with stones is much better.
Of course, you can say that making right assumptions are part of puzzle solving... Maybe.
Maybe the name of this thread gives us a clue...
When you find a paradox, it's usually an indication that the logical system you've set up is based on faulty premises.

Actually I thought more about irony, I suspected that Eager Beaver tease us and the answer is something like "he just had extra 20c in his pockets..."
Paradoxes are not inherently profound - they just point to errors in reasoning. Simple example - "This statement is false." The fundamental error is to assume that a sentence must have a boolean truth value. This one doesn't.
It�s difficult to define what is profound and what is not, but this particular paradox was resolved only in XX century, so there must be something in it... BTW, it�s not enough to say �this one doesn't�, the question is why. There are different levels of languages. The lowest is "object language", which simply states "the paper is white" (1) If we want to say something about the previous sentence, we use the language level 2 or metalanguage. The sentence "the sentence "the paper is white" is wrong" (2) belong to metalanguage. Now if we want to say something definite about sentence (2) we have to use language level3. Of course, it�s easy to mix these cases when we use natural language (to produce sentences of all possible levels) and the whole problem sounds like useless theorizing, but if to think about programming languages � then it becomes practical. Data is our language level1, Java is language level2, which makes sense out of them, compiler � language level3, which makes (or not) sense out of our Java programs...
Do not believe in all I said

Eager Beaver
Ranch Hand
Posts: 187
Hey Jim,
At the onset let me confess that I committed a blunder in my first puzzle(\$X.Y)....i am extremely sorry and now running around the ranch to find a place to hide and save face from u folks!!! I have edited the puzzle so please go back once and have a look. I think it should not be a difficult one for you geniuses here.
My apologies to all those who have been sincerely going about the puzzle.

eagerbeaver,
furrowing in the dead log for a hiding place!!

Nanhesru Ningyake
Ranch Hand
Posts: 452
Oh dear EB, did you know people all over the world have been cheating on their clients, pretending to be working, while trying to solve this puzzle...

Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
Yeah, Eager Beaver, you almost destroyed the whole civilization...
Yuur problem is solved. Map is waiting for Jim's explanaton "how to count your change if you do not have any JVM around"

Eager Beaver
Ranch Hand
Posts: 187
Nanhesru,
I can clearly visualise all the constituent triangles and the single composite triangle.....need some time to arrive at a mathematical expression. Will get back soon!
eagerbeaver.
JIM/MAP/SAHIR........the labels, as rightly deduced by Jim are 'red', 'white' and 'mixed' and wrongly placed.

Eager Beaver
Ranch Hand
Posts: 187
Jim,
The bridge is much longer than the truck.....however I liked ur guess though that would not apply here. Btw the sparrow is taking a much wanted rest....so no flapping of wing.
eagerbeaver.

Eager Beaver
Ranch Hand
Posts: 187
Hi all,
Here comes another puzzle rolling at U.....
10 boxes...each filled with balls.....no,i do not have any preferences for balls....hope none here have any objection to the term. Well, all but one contain balls weighing 10 grams each.The rogue box has all balls weighing 11 grams each. Devise a strategy to find out the odd box out. Here again, the guy with least number of weighing wins!!
eagerbeaver.

Sahir Shibley
Ranch Hand
Posts: 275
If the labels on the boxes are red,white and mixed and if its guranteed that they are all false then the solution is to pick one ball from the box labelled mixed. All labels are false. So either of the other two boxes are mixed. Suppose you got a white ball then since the labels cannot be true the box labelled red contains mixed colours.
Cheers
Sahir

[This message has been edited by Sahir Shibley (edited May 03, 2001).]

Colin Russell
Greenhorn
Posts: 5
For the truck/bridge problem is the answer that the truck tips the scales at 10 tons at the start but then drives 10 miles to the bridge which would reduce the fuel load taking the total weight, even with the considerable mass of a sparrow, below the 10 ton and 1 gram weight restriction?

Eager Beaver
Ranch Hand
Posts: 187
COLIN,
^5 to you brother. You have hit the bulls eye!!
SAHIR,
Thats it!! Well done.
thanks for participating.

eagerbeaver.
[This message has been edited by Eager Beaver (edited May 03, 2001).]

Angela Poynton
Ranch Hand
Posts: 3143
OK Here's one for you.
Two men walk into a room. One looks around and realises he's about to die. Why?

Eager Beaver
Ranch Hand
Posts: 187
Hi guys,
One more from eager's stable....
How deep can you walk inside a forest.
Btw, what happened to the 'helicopter' poser posted by Stevie. I have no clue to that one.
eagerbeaver.

Frank Carver
Sheriff
Posts: 6920
For the truck problem, presumably any significant loss of mass from the truck during the journey or before crossing the bridge would save it. Here are some of the infinite number of possible solutions:
1. The co-driver gets out and walks over the bridge.
2. It's a line-painting truck which has delivered a ton of paint to the road on the way to the bridge.
3. It stopped to deliver its load of frammis-widgets to a customer between the weigh-station and the bridge.
Is this puzzle actually about something else? This seems too simple a solution, and a bit tedious to ask lots of "yes/no"s to home in on the particular one the questioner has in mind.
As for the boxes of balls:
Take one ball from a/the box marked "mixed", note the colour (call it colour A) - you now know the colour of the balls in that box (they must be all the same, because the label must have lied). Now if there is another box with a label indicating the same colour as the ball you have in your hand, put it in that box If there is another box labelled "mixed", then it must contain the other colour, so put your ball in there. You now know that the three boxes contain colour A, mixed and mixed ! If there are no boxes labelled mixed, I think you need two gets and a put, to ensure such an outcome. I think this solves Map's generalization of allowing duplicates, but (of course) can't solve the "meaningless labels" variant.
As for the helicopter, if the teacher is actually in the helicopter (closest associated subject rule from grammar), but the man is (I dunno) climbing a mountain with (say) his wife beside him and a remote control in his hand would that be a valid solution?
As for Angela's latest, I'm not sure this sort of classic "yes/no" is entirely suited to a forum like this. Presumably the game is to guess the particular solution you have in mind, rather than to find any or the first solution which solves the puzzle (like the balls and paycheck examples). Maybe together we can all solve it quickly, but look forward to a lot of strange (WA#-style) questions

Angela Poynton
Ranch Hand
Posts: 3143
good point frank .... nobody post questions or answers to this one here .. I'll start a seperate thread!

Sahir Shibley
Ranch Hand
Posts: 275
\$x.y problem original amout is 26.53.

The equation is as follows
2 (100x + y ) = 100y + x - 20
converting the equation to code gives
<pre>
class XYPuzzle{
public static void main(String[] args){
float result = 0;
outer: for(int valX = 0 ; valX <100 ; valX++) {
for(int valY =0; valY < 100; valY ++) {
if( (((valY * 100) + valX) - 20) == ((( valX * 100) + valY) * 2) ) {
result = (( valX * 100) + valY) ;
System.out.println(result);
break outer;
}
}
}
}
}
</pre>

Does this count as cheating ?

[This message has been edited by Sahir Shibley (edited May 03, 2001).]

Sahir Shibley
Ranch Hand
Posts: 275

Ten boxes problem. You need to weigh them thrice in batches of three.

Thiru Narayanan
Greenhorn
Posts: 23
3. Expand this => (A-X)(B-X)......(Z-X) = ?.
Is the answer not 0 (Zero), as the equation has one element (X-X) in it?
THIRU

Manju Jain
Ranch Hand
Posts: 168
Hope, not everybody is aware of this one.
There are 1000 coins and 10 bags. Fill the bags with these coins in such a way that if I ask you a random number ranging from 1 to 1000, you should be able to give me the bag/s equalling the number of coins asked for. Not a coin more, not a coin less ie. no manipulation of removing or adding according to the number. So figure out how many coins each bag will contain.