Thursday, October 10, 2019
Union and Intersection
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.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 ou t 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. B ut 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 ma y 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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment