Last Updated 15 Apr 2020

Union and Intersection

Category Essay Examples
Essay type Research
Words 874 (3 pages)
Views 437

Primary Task Response: Write at least 3 paragraphs that respond to the following questions with your thoughts, ideas, and comments. Be substantive and clear, and use examples to reinforce your ideas. Part I: Describe how the notion of union and intersection apply to retrieving records in databases. Give an example of 2 sets that might appear in a database to help in your description. A prominent couple is found murdered in their mansion located in an affluent neighborhood. The housekeeper found the bodies and called the police.

The housekeeper tells the detectives that quite a few valuables are missing from the house: artwork, electronics, jewelry, cash etc. In the initial stages of the investigation the detectives cannot decide whether this was a robbery gone wrong or a murder the perpetrator tried to disguise into a robbery. Not wanting to miss any potential leads the police compiles a joint list of suspects: every suspect on this list is either a known robber or a known killer (or both). For the first set R={x| x has a robbery rap sheet} they access the Theft/Robbery Division database.

For the second set M={y |y has a murder in his criminal record} they access the Homicide Division database. It is not uncommon that different divisions within the same police department maintain different databases. Although state and national databases do exist they are usually slow moving and most often than not they generate unmanageably long lists of suspects. The advantage of a local database consists in a much easier access and output which is oftentimes much more relevant to the investigation – in 99% of the cases the crime is perpetrated by a local suspect.

Haven’t found the relevant content? Hire a subject expert to help you with Union and Intersection

$35.80 for a 2-page paper

Hire verified expert

Thus the initial set of suspects S is the union of R and M: S=R? M. Suppose however that S has too many suspects. Given the personnel shortage it is not feasible to investigate every name which appears in S. the police needs to find a way to narrow down this list. After re-interviewing the neighbors, it turns out that one of them witnessed a suspicious green Chevy van idling on a street corner close to the murdered couple’s house. The van was in a rough shape which made it unlikely to be owned by one of the local residents.

The detectives have now a clue that helps them narrow down their list of suspects. They access the DMV database to extract the list of drivers who own an older model green Chevy van. In other words they retrieve the set C= { z | z owns a green Chevy van}. The investigators then compare their list of suspects S , to the names listed in C, looking for common entries. In other words they are interested in the set of prime suspects P, where P is the intersection between S and C: P=S? C. Part II :Discuss the notion of the logical "or" and the logical "and" in computer programming (coding) or flowcharts.

Why is it important to know how to apply these correctly? The traditional scope of computer science was the automation of numerical operations. But since reasoning can be seen as a kind of computation, in principle it can be automated as well. Computers represent information using bits. A bit is a symbol with two possible values, zero and one. The word bit comes from binary digit, because zeros and ones are the digits used in binary representations of numbers Computer bit operations correspond to the logical connectives.

Information is represented using bit strings, which are lists of zeros and ones. Operations on the bit strings can be used to manipulate this information. At a very basic level, the binary string approach accompanied by the operations that can be performed with these strings via the logical connectives constitute our way of translating the problem in a form the computer can “understand”. Eventually, the computer is the perfect executant so it will end up doing exactly what we told him to do – which is not always the same with what we intended to have him do.

The difference between 0 and 1 may not seem large; however, in absolute terms is as large as the difference between true and false, or the difference between black and white. The use of 0’s and 1’s is a matter of convenience if anything else; alternatively we can work with “dinks” and “dunks” with exactly the same (logical) result. A quick example is most likely going to drive this point home. One of the places where logical connectives are used most frequently are the internet search engines. Suppose however that by a silly programming mistake a certain search engine XYZ. om reads “or” instead of “and” and vice-versa. Suppose your instructor recommended an article written by Jones and Smith on the topic of logical connectives. The instructor could not remember the authors’ first names nor the exact title of the paper but he suggested that a quick search on XYZ. com should help you locate the paper in no time. Needless to say if your search query “Jones” AND “Smith” AND “Logical” AND “connectives” is interpreted as “Jones” OR “Smith” OR “Logical” OR “connectives” the chances of locating the paper are just as great as the chances of finding thr needle in the haystack.

Haven’t found the relevant content? Hire a subject expert to help you with Union and Intersection

$35.80 for a 2-page paper

Hire verified expert

Cite this page

Union and Intersection. (2016, Nov 28). Retrieved from

Not Finding What You Need?

Search for essay samples now

We use cookies to give you the best experience possible. By continuing we’ll assume you’re on board with our cookie policy

Save time and let our verified experts help you.

Hire verified expert