SUNY Geneseo Department of Computer Science


Probability, Expectation, and Indicator Random Variables

Thursday, April 25

CSci 242, Spring 2013
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture

Questions?

Table size and hash function

            h = 0
            for each character c in string
                h = ( h * 256 + c ) % tableSize        // Can also multiply c by its position and add to h

Java Scanners

Generally a scanner is something that breaks a stream of characters into “lexemes” (word-like units such as words, numbers, punctuation marks, etc.)

Demonstration program that reads words from a file and prints them

Probability

Appendix C.2 through discrete distributions, C.3 through expected value, and analysis of hashing with chaining in 11.2

Indicator random variables

Expected sum of indicators for k_i in chain is sum of expected indicator values = sum of probabilities = n/m

Next

Analysis of hashing

Backtracking review


Next Lecture