Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problematic OR

Status
Not open for further replies.

SamBones

Programmer
Aug 8, 2002
3,186
0
36
US
I just got back from giving blood (you all should, it saves lives). Anyway, there was a screening questions I struggled with. Regardless of who you are or where you've been, it only has one valid answer. Yes.

Red Cross Screening Question said:
In the last three years, have you ever been outside the United States or Canada?

During the period of time in question I've only been in the US, therefore I have to answer "Yes", since I've been outside Canada.

Due to the sentence structure, the only valid answer is "Yes".

One other take-away is that overworked nurses have very little patience for smart alec programmers explaining boolean logic. They also can get their revenge in a micro-aggression called "find the vein".

 
From the programming truth tables: OR
True OR False = True
False OR True = True
True OR True = True
False OR False = False

AND
True AND False = False
False AND True = False
True AND True = True
False AND False = False

For more examples see Truth Tables.

James P. Cottingham
I'm number 1,229!
I'm number 1,229!
 
I'm sure everyone has noticed that SamBones managed to magically transform a 66% chance of giving his guests something that they want into a 75% chance simply by adding additional granularity to the underlying assumptions behind the meaning of the "yes" responses. I would guess that this is a questionable application of the principle of indifference. Preferences for tea or coffee, or both, or neither, don't have the same feel of having inherently equal odds in the same way as a coin flip has equal odds of being heads or tails. Rather, I would say that beverage preferences are unknown, not equal. Hence it's probably not correct to come up with a lot of subcategories within the "yes" answers and automatically assign them all equal odds.
 
Hi 2ffat,

correct and how about [tt]Tea AND Coffee[/tt]?

Code:
#Define Tea true
#Define Coffee false
:)

Bye, Olaf.
 
kwbMitel, you'll always be invited. I don't mind brewing beverages for Tek-Tippers. [bigsmile]

karluk, the percentages are based on the number of possible options only, not the desirability or possibility of the options. Like with a coin, I may really want "heads" badly, and the coin may be imbalanced and favors one face over the other, but there are still only two possible outcomes (assuming an edge balance isn't possible).

Looking at the truth tables, I think I missed a category. There are actually six...
[ol 1]
[li]Wants nothing (replied "No" to original question, so not counted in percentages)[/li]
[li]Wants tea[/li]
[li]Wants coffee[/li]
[li]Wants both tea and coffee (AND)[/li]
[li]Wants either tea or coffee, both is OK (OR)[/li]
[li]Wants either tea or coffee, but NOT both (XOR)[/li]
[/ol]

 
This time the comparison is flawed, Sam. People do have a will and preference, coins not. People rather tend to not want tea and coffee at the same time, not even thinking of mixing them together. And in your new list, the 4 and 5 overlap, though it's a difference stance to accept both as OK or want both.

Anyway, it's not a categorization in the sense of equally probable choices. You can also split dice results in only two results 1 or higher than 1, but then need to attach different probabilites. Thinking in stereotypes, you would get almost 100% satifaction with tea in England and with coffee in Italy.

Bye, Olaf.
 
Can't you just serve beer and be done with it? :)
[cheers]

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Wants neither tea nor coffee = Reply "No"
Wants tea only = Reply "Yes"
Wants coffee only = Reply "Yes"
Wants both tea and coffee = Reply "Yes"

The question was "Do you want tea or coffee?"

Should be:
Wants both tea and coffee = Reply "NO"

because it means:
I don't want tea OR coffee (NO)
I want tea AND coffee - not offered.

However, you left out the most obvious:
Wants either tea or coffee = Reply "YES"

Which brings us full circle back to Sam Bones correct determination that he had a 66% chance of providing satisfaction.
YES - wants coffee only - gets tea - not satisfied
YES - wants tea only - gets tea - SATISFIED
YES - wants either tea or coffee gets tea - SATISFIED



Randy
 
Randy,

welcome to the discussion.

If you take the or in the question as xor, all your inferences are okay to me. In natural language or typically is used as xor, which confirms what you say. Putting it back to three outcomes still doesn't take into accout the probabilities for them. Aside of that flaw, natural language OR is not limited to be an operator of booleans but could also be a conjunction of options and as such has nothing to do with the boolean algebra at all, as I indicated with my #Defines joke.

That would make this whole discussion moot, or put it in a new direction. The or in the tea or coffee question only becomes a boolean algebra or, if you expand to "do you want tea or do you want coffee?" as that connects two booleans.

Humans, right? They don't know what they want. Language is flawed, totally flawed...

Bye, Olaf.
 
OlafDoschke said:
... how about Tea AND Coffee?

Code:
#Define Tea true
#Define Coffee false
[rofl2]

James P. Cottingham
I'm number 1,229!
I'm number 1,229!
 
Late to the party here.

The father wants tea. It's hard to answer two questions in one answer. My wife asks me multiple questions in one breath.
I answer the first question only, or only until a positive answer is provided.

Using normal conversation conditions, the 'tea' word was likely inflected to imply an interrogative. Then an incomplete sentence 'or coffee?' follows, making another question.
Do you want a tea? Or coffee?

Answers 'yes.' Get the man a tea woman
Answers 'no.' Man gets nothing
Answers 'no.yes' get the man a coffee woman

With my system it's 100% certain he wants tea and a 33% chance the missus doesn't have to go back to the kitchen after making my sandwich.

I've been scared of elevators for years, but I've been taking steps to fix the problem.
 
The correct wording of the sentence is this:

In the last three years, have you ever been outside (the United States or Canada)?

An unforeseen consequence of the information revolution has been the exponential propagation of human error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top