Midterm Review - PowerPoint PPT Presentation

About This Presentation
Title:

Midterm Review

Description:

Midterm Review CSC 172 SPRING 2002 LECTURE 15 Diversity The Faculty of the College affirms that diversity, pluralism, and respect for difference are fundamental ... – PowerPoint PPT presentation

Number of Views:108
Avg rating:3.0/5.0
Slides: 37
Provided by: Thadd2
Category:

less

Transcript and Presenter's Notes

Title: Midterm Review


1
Midterm Review
  • CSC 172
  • SPRING 2002
  • LECTURE 15

2
Diversity
  • 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

3
Freedom of thought
  • Do people have the right to hold wrong opinions?
  • Do we tolerate intolerance?
  • Treating people decently does not imply approval.

4
Professionalism
  • 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

5
Scholarship
  • 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

6
General Recurrence Relations
  • The solution to
  • T(n) aT(n/b) O(nk)

7
Proof
  • 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

8
Divide by am
9

10
Telescoping
11
agtbk
  • 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

12
abk
  • Each term of the sum is 1
  • The sum contains 1logbn terms
  • abk implies logba k

13
altbk
  • The sum is a geometric series with ratio gt 1

14
(Aside)
  • Prove by induction on n

15
(No Transcript)
16
Chuck-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.

17
Chuck-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.

18
Chuck-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

19
Chuck-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,

20
Chuck-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

21
Error 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.

22
Error 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

23
Error Correcting Codes
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
24
Error 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
25
Error 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
26
Error 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
27
Error 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
28
Error 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
29
Error 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
30
Error 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
31
Error 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
32
Error 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
33
Error 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
34
So, 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)

35
Homework Solutions
  • http//www.cs.rochester.edu/pawlicki/lectures/CSC
    172

36
When and where is the exam
  • Friday March 8th
  • 8AM-11AM, 632 CSB 4 students
  • 2PM-5PM, 115 Harkness
Write a Comment
User Comments (0)
About PowerShow.com