4

This is a question from one of my homework problems, but the wording is very weird, so I'd like to clarify my understanding on it.

4.Find all bars in 'Chicago' (and display all attributes) for which we know either the address (i.e., addr in our schema) or the phone number but not both.

Is this problem asking me to find all bars in Chicago that we do not know the address and the phone number of? Or only bars that we know both the address and the phone number?

In other words, I'm very confused on what "not both" at the end of the sentence really means.

3
  • The request specifies either the address or the phone number, not both. Neither of your interpretations are the same as the request. Either + or excludes "both" and "none". Apr 7, 2016 at 23:17
  • A or B but not both is equivalent to formal logic's A xor B.
    – Lawrence
    Apr 7, 2016 at 23:44
  • We collect addresses and phone numbers for bars. Find the bars where we are missing data.
    – bib
    Apr 8, 2016 at 0:26

1 Answer 1

2

Find all bars in Chicago for which we know either the address or the phone number, but not both.

This sentence means: Find all bars in Chicago for which we know either:

  • [the address] or [the phone number],

but we do not know

  • both [the address and the phone number]

So let's say the adress is A, and the phone number is PN. If you know both the phone number and the address (A + PN) you don't need to find the bar. But if you only know the address (A), or you only know the phone number (PN) then you do need to find the bar.

It's probably easier to understand the sentence if you understand why someone is saying it.

Here is a situation: You are making a tourist guide to bars in Chicago. You have another old guide (1 month old) that you use to help you. The people that wrote the guide were lazy. Sometimes they wrote the address in their guide. Sometimes they wrote the phone number in their guide. Sometimes they didn't write the address and they didn't write the phone number. Sometimes they just didn't write about the bars at all. But their information was reliable

Your job is to help making a new guide to bars in Chicago, but you want to make it a good guide. You need the missing information. So you need to make a list of every bar that you don't have good information about. So if you don't know their phone number, they go on the list. If you don't know their address, they go on the list. But if you know their address and their phone number they don't go on the list because you don't need to get any more information about them. And , of course, if you don't know their address and you don't know their phone number they need to go on the list!

So you only need to get information if you don't know [the address AND the phone number].

Not the answer you're looking for? Browse other questions tagged or ask your own question.