1. Accounting program (was problem solving)

Hi there,

This post seems to be having a bit of a problem getting through so
here it is again...


This is a sort of riddle, and riddles are written to confuse the reader
into thinking that something is true when it really is not true.  There
are usually a bunch of statements that are true followed by usually
one statement that pretends to discredit one or more of the previous 
statements.

For this particular problem, the students pay 30 dollars total, but
once they get 3 dollars back from the clerk they immediately have
no longer paid 30 dollars so the number 30 should get tossed.  After
they get 3 dollars back they have paid a total of 27 dollars so
the remaining math has to begin with 27 dollars, not 30 dollars.

A similar riddle would be since the clerk gave the students back
3 dollars and kept 2 *and* they only paid 27 dollars total (after
getting back the 3 dollars) where did the 2 dollars even come from?

Other examples:

Two US mint coins total 30 cents, and one of them is not a nickel.
What are the two coins?
(This will be easy if you have watched the show "Scrubs" recently,
where they used this old riddle on the show).

One of my old favorites:
"In this one town the barber shaves everyone who does not shave themself.
Since the barber does not shave those who shave themself then who 
shaves the barber?"
Note that if the barber shaves himself then he does not shave himself
because he does not shave people who shave themself, but then he
cant shave himself in the first place.  If he did shave himself then
he would be one of those people who he does not shave, so the paradox
begins.





Take care,
Al

E boa sorte com sua programacao Euphoria!


My bumper sticker: "I brake for LED's"

 From "Black Knight":
"I can live with losing the good fight,
 but i can not live without fighting it".
"Well on second thought, maybe not."

new topic     » topic index » view message » categorize

2. Re: Accounting program (was problem solving)

Al Getz wrote:
> Two US mint coins total 30 cents, and one of them is not a nickel.
> What are the two coins?
> (This will be easy if you have watched the show "Scrubs" recently,
> where they used this old riddle on the show).
Two people just wrecked your bike with a sledgehammer and a crowbar and one of
them wasn't me.

> One of my old favorites:
> "In this one town the barber shaves everyone who does not shave themself.
> Since the barber does not shave those who shave themself then who 
> shaves the barber?"
You forgot to mention that the barber does not have a beard.

Pete

new topic     » goto parent     » topic index » view message » categorize

3. Re: Accounting program (was problem solving)

Al Getz wrote:
> 
> Hi there,
> 
> This post seems to be having a bit of a problem getting through so
> here it is again...
> 
> 
> This is a sort of riddle, and riddles are written to confuse the reader
> into thinking that something is true when it really is not true.  There
> are usually a bunch of statements that are true followed by usually
> one statement that pretends to discredit one or more of the previous 
> statements.
> 
> For this particular problem, the students pay 30 dollars total, but
> once they get 3 dollars back from the clerk they immediately have
> no longer paid 30 dollars so the number 30 should get tossed.  After
> they get 3 dollars back they have paid a total of 27 dollars so
> the remaining math has to begin with 27 dollars, not 30 dollars.
> 
> A similar riddle would be since the clerk gave the students back
> 3 dollars and kept 2 *and* they only paid 27 dollars total (after
> getting back the 3 dollars) where did the 2 dollars even come from?
> 
> Other examples:
> 
> Two US mint coins total 30 cents, and one of them is not a nickel.
> What are the two coins?
> (This will be easy if you have watched the show "Scrubs" recently,
> where they used this old riddle on the show).
> 
> One of my old favorites:
> "In this one town the barber shaves everyone who does not shave themself.
> Since the barber does not shave those who shave themself then who 
> shaves the barber?"
> Note that if the barber shaves himself then he does not shave himself
> because he does not shave people who shave themself, but then he
> cant shave himself in the first place.  If he did shave himself then
> he would be one of those people who he does not shave, so the paradox
> begins.
> 
> 
> Al
> 
> E boa sorte com sua programacao Euphoria!
> 
> 
> My bumper sticker: "I brake for LED's"
> 

  It was Cornell Mustard with the candlestick in the drawing room.

Har Har Har.

Don Cole

new topic     » goto parent     » topic index » view message » categorize

4. Re: Accounting program (was problem solving)

Pete Lomax wrote:
> 
> Al Getz wrote:
> > Two US mint coins total 30 cents, and one of them is not a nickel.
> > What are the two coins?
> > (This will be easy if you have watched the show "Scrubs" recently,
> > where they used this old riddle on the show).
> Two people just wrecked your bike with a sledgehammer and a crowbar and one
> of them wasn't me.

Ha ha, yeah, i had to laugh at that one too he he.  That Janitor cracks
me up.

> 
> > One of my old favorites:
> > "In this one town the barber shaves everyone who does not shave themself.
> > Since the barber does not shave those who shave themself then who 
> > shaves the barber?"
> You forgot to mention that the barber does not have a beard.
> 
> Pete

Pete, that's certainly clever, but logic is logic, and sometimes saying
one thing definitely implies another thing without any doubt whatsoever.
In other words, if the barber does not have a beard then he is one of those
people who does not shave himself and since he shaves all those who do not
shave themself it's still a contradiction because in short form we would
still be saying "the barber shaves himself but he does not shave himself".

I've also heard that the barbers beard caught on fire (hee hee) but
then again that means he doesnt shave himself and so he shaves himself
and the paradox shows up again anyway (with laughts i guess too).
Maybe this is what Don was alluding to in his post which i read already.

A little more (short) interesting read on this paradox can be found here:
http://www.logicalparadoxes.info/barber.html

Looking at things like this definitely helps a persons programming
technique in any language because programming in it's best form is
a perfectly logical endeavor, similar to chess.

I would like to see a program that can deal with things like this
written in Euphoria, but it would take a huge amount of effort and
research im sure.  Automated reasoning deals with this kind of thing,
and in this case would prove that there was a paradox; a set of 
statements that have no solution.  Something to do this written in
Euphoria would be really great!  I think it would have to be able to
interpret the human language however to be totally automatic.
Anyone up to the challenge?



Take care,
Al

E boa sorte com sua programacao Euphoria!


My bumper sticker: "I brake for LED's"

 From "Black Knight":
"I can live with losing the good fight,
 but i can not live without fighting it".
"Well on second thought, maybe not."

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu