Title: Midterm Review
1Midterm Review
- CSC 172
- SPRING 2002
- LECTURE 15
2Diversity
- The Faculty of the College affirms that
diversity, pluralism, and respect for difference
are fundamental values in our community. Learning
cannot advance in an atmosphere of prejudice or
intimidation. All members of our community --
regardless of culture, religion, gender, or
sexual orientation -- are entitled to learn and
work in an environment of civility, dignity,
fairness, and mutual respect. - As a faculty, we condemn recent events on campus
that exhibit bigotry, insensitivity to life, and
hostility toward people on the basis of their
ethnicity, religion, or sexual orientation.
These malevolent behaviors and attitudes
undermine our collective work and have no place
in our community of learning. - As scholars, we encourage one another -- and as
teachers we encourage our students -- to reject
these expressions of intolerance and work
together to build the kind of open community that
makes authentic learning possible. We cannot
afford to be indifferent. We must speak out
against these deplorable expressions. We must
expect better of ourselves and of one another.
- Thank you,
- Sanford L. Segal
- Chair of the Faculty Council
- Steering Committee
3Freedom of thought
- Do people have the right to hold wrong opinions?
- Do we tolerate intolerance?
- Treating people decently does not imply approval.
4Professionalism
- People have both public and private lives
- Sort of like public and private interfaces
- public life provides a context for social
interaction - public life is to some degree regulated (laws,
cultures) - We often deal with people with whom we disagree
because we can share purposes with people - Professionalism allows us to maintain a workable
public interface with diverse people - Tolerance (public) does not imply that you agree
(private) - So, it is possible to maintain both workable
social relationships and individual freedom of
thought
5Scholarship
- Being a member of the university community
implies a shared objective a public society - The tradition of scholarship is a tradition of
openness - This implies having the courage to take credit
for your statements - Having to take credit for your statements tends
to raise the level of discussion
6General Recurrence Relations
- The solution to
- T(n) aT(n/b) O(nk)
7Proof
- Assume T(1) 1
- Assume n is a power of b
- n bm
- n/b bm-1
- nk (bm)k bmk bkm (bk)m
- So,
- T(bm) aT(bm-1) (bk)m
8Divide by am
9 10Telescoping
11agtbk
- The sum is a geometric series with ratio lt 1
- Since the sum of such an infinite series would
converge to a constant, the finite sum is also
bound by a constant
12abk
- Each term of the sum is 1
- The sum contains 1logbn terms
- abk implies logba k
13altbk
- The sum is a geometric series with ratio gt 1
14(Aside)
15(No Transcript)
16Chuck-a-Luck
- Show that in Chuck-a-Luck, the probability of any
event in which all three dice have different
values is twice the probability of any event
where one number appears exactly twice and six
times the probability of any event in which all
three dice show the same number.
17Chuck-a-Luck
- Show that in Chuck-a-Luck, the probability of any
event in which all three dice have different
values is twice the probability of any event
where one number appears exactly twice and six
times the probability of any event in which all
three dice show the same number.
18Chuck-a-Luck
- An event is a unique throw of the dice
- There are 6 different events of all the same
number - P(all 1s) 1/216
- P(all 2s) 1/216
-
- P(all 6s) 1/216
19Chuck-a-Luck
- There are 120 events where all the numbers are
distinct 654 - But some are indistinguishable
- There are 6 ways to arrange 3 items
- P(any event where all numbers different) 6/216
- So,
20Chuck-a-Luck
- There are 30 different ways of getting the same
number exactly twice 65 - For each event (say 2 1s, and one 2) there
are 3 ways to get it ((1,1,2),(1,2,1),(2,1,1)) - P(any event where one number appears twice)
3/216
21Error Correcting Codes
- If no two strings in a code differ in fewer than
three positions, then we can actually correct a
single error, by finding the unique string in the
code that differes from the received string in
only one position. It turns out that there is a
code of 7 bit string that corrects single errors
and contains 16 strings. Find such a code.
22Error Correcting Codes
- 0000 and 0001 differ by 1
- 0000 and 0011 differ by 2
- 0000 and 0111 differ by 3
- So, if I only allowed 0000 and 0111 and there was
only one error, then I could always recover - 0001,0010,0100,1000 -gt 0000
- 1111,0011,0101,0110 -gt 0111
23Error Correcting Codes
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
24Error Correcting codes d 1
a b c d P(abc) P(abd) P(bcd)
0 0 0 0 1 1 1
0 0 0 1 1 0 0
25Error Correcting codes d 1
a b c d P(abc) P(abd) P(bcd)
0 0 0 0 1 1 1
0 0 1 0 0 1 0
26Error Correcting codes d 1
a b c d P(abc) P(abd) P(bcd)
0 0 0 0 1 1 1
0 1 0 0 0 0 0
27Error Correcting codes d 1
a b c d P(abc) P(abd) P(bcd)
0 0 0 0 1 1 1
1 0 0 0 0 0 1
28Error Correcting codes d 2
a b c d P(abc) P(abd) P(bcd)
0 0 0 0 1 1 1
1 1 0 0 1 1 0
29Error Correcting codes d 2
a b c d P(abc) P(abd) P(bcd)
0 0 0 0 1 1 1
1 0 1 0 1 0 0
30Error Correcting codes d 2
a b c d P(abc) P(abd) P(bcd)
0 0 0 0 1 1 1
1 0 0 1 0 1 0
31Error Correcting codes d 2
a b c d P(abc) P(abd) P(bcd)
0 0 0 0 1 1 1
0 1 1 0 0 0 1
32Error Correcting codes d 2
a b c d P(abc) P(abd) P(bcd)
0 0 0 0 1 1 1
0 1 0 1 0 1 1
33Error Correcting codes d 2
a b c d P(abc) P(abd) P(bcd)
0 0 0 0 1 1 1
0 0 1 1 0 0 1
34So, whats on the exam? (180 min)
- Linked Lists (code)
- Stacks (algs)
- Queues (algs)
- Proof by induction (section)
- Recurrence Relations (math)
- Big-Oh (section)
- Run time of code segments
- Combinatorics (section)
- Probability
- Recursion (QS,MS, etc)
35Homework Solutions
- http//www.cs.rochester.edu/pawlicki/lectures/CSC
172
36When and where is the exam
- Friday March 8th
- 8AM-11AM, 632 CSB 4 students
- 2PM-5PM, 115 Harkness