This preview shows pages 1–10. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 11COMP170Discrete Mathematical Toolsfor Computer ScienceDiscrete Math for Computer ScienceK. Bogart, C. Stein and R.L. DrysdaleSection 5.1, pp. 213221Intro to ProbabilityVersion 2.0: Last updated, May 13, 2007Slidesc2005 by M. J. Golin and G. Trippen21Introduction to Probability•Why Study Probability?•Complementary Probabilities•Probability Spaces and Distributions•Probability and Hashing•The Uniform Probability Distribution31Why Study Probability?32Why Study Probability?In Computer Science we often deal withrandom events.Some involve randomness imposed from the outside, e.g.,networking, when requests from computers on the networkenter the network at “random” time.Some involve randomness that we introduce, e.g.,hashing,which is a techinique often used to compactly store informationin a computer for later quick retrieval.33Why Study Probability?In Computer Science we often deal withrandom events.Some involve randomness imposed from the outside, e.g.,networking, when requests from computers on the networkenter the network at “random” time.Some involve randomness that we introduce, e.g.,hashing,which is a techinique often used to compactly store informationin a computer for later quick retrieval.Studying the performance of computer systems in the presenceof these types of randomness, requires understanding randomness, which is the study ofprobability.41Hashing42HashingImagine a company with one hundred employees. There’s notenough room in the main office to give each one a mailbox. So,instead, they have one mailbox for each letter of the alphabet.When a letter arrived, it gets put into the box correspondingto the recipients surname. This is an example of aHash Function.43HashingImagine a company with one hundred employees. There’s notenough room in the main office to give each one a mailbox. So,instead, they have one mailbox for each letter of the alphabet.When a letter arrived, it gets put into the box correspondingto the recipients surname. This is an example of aHash Function.Hashing is a very common programming tool that permits concise storage of data with quick lookups. The general idea isthat we have a set ofrecordsthat need to be stored. Eachrecord is addressed using itskey, e.g., name or ID number.44HashingImagine a company with one hundred employees. There’s notenough room in the main office to give each one a mailbox. So,instead, they have one mailbox for each letter of the alphabet.When a letter arrived, it gets put into the box correspondingto the recipients surname. This is an example of aHash Function.Hashing is a very common programming tool that permits concise storage of data with quick lookups. The general idea isthat we have a set ofrecordsthat need to be stored. Eachrecord is addressed using itskey, e.g., name or ID number....
View
Full
Document
This note was uploaded on 08/25/2010 for the course COMP COMP170 taught by Professor M.j.golin during the Spring '10 term at HKUST.
 Spring '10
 M.J.Golin
 Computer Science

Click to edit the document details