+ All Categories
Home > Documents > CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 [email protected], tel: 858 534-6184...

CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 [email protected], tel: 858 534-6184...

Date post: 24-Dec-2015
Category:
Upload: madeleine-payne
View: 218 times
Download: 0 times
Share this document with a friend
21
CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 [email protected], tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: [email protected] Office Hours: TBA Rossana Motta E-mail: [email protected] Office Hours: TBA Tutors TBA http://cseweb.ucsd.edu/classes/sp12/c se20-a/ 1
Transcript
Page 1: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

CSE 20Discrete Mathematics

Instructor CK Cheng, CSE2130

[email protected], tel: 858 534-6184 Teaching Assistants

Jingwei LuE-mail: [email protected]

Office Hours: TBARossana Motta

E-mail: [email protected] Hours: TBA

TutorsTBA

http://cseweb.ucsd.edu/classes/sp12/cse20-a/

1

Page 2: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

Textbooks• A Short Course in Discrete Mathematics – Edward A. Bender and S. Gill Williamson–http://cseweb.ucsd.edu/~gill/BWLectSite/–Hardcopy published by Dover, 2004

• Discrete Mathematics– Seymour Lipschutz and Marc Lipson– Schaum's Outline Series, Third Edition,

McGraw Hill, 2009

2

Page 3: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

Grading• iCliker (ramp function saturates at

80% clicks)• Discussion Session Attendance• CK Office Hrs Visits

• Midterm 1 Th 4/19/2012

• Midterm 2 Th 5/10/2012

• Final Exam – (comprehensive with emphasis on

the contents after Midterm 2) M 6/11/2012, 3-5:59PM

7%

25%

25%

40%

3

3% 2%

Page 4: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

Expectation

• Class participation and group discussion• Discussion session attendance• Office hour visits• Class notes• Exercises

4

Page 5: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

Administrative

• Schedule – Lectures: 3:30-4:50PM TTh, Center 214.– Discussion: • 2:00-2:50PM M, Center 109.• TBA F, TBA• First Discussion Section: 4/9

– CK Cheng Office Hours: CSE2130• 2:00-2:50PM T, • 11:00-11:50AM Th

5

Page 6: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

Course OutlinePart 1. Numbers: choice of number systems, binary, Gray code, one's complement, two's complement, residual number system, and coding. Part 2. Boolean Algebra: manipulation of logic and gates, laws and theorems, tautology, SAT, multiple elements, minimization. Part 3. Functions and Recursion: function definition and calculation, induction process, k'th order series, Factorial, Fibonacci, Ackerman, division, square root iterations.

6

Page 7: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

Overall View

Numbers, TextsImagesControl signals

7

Function

Input OutputHardware orProgram

Arithmetic: +,-,x,/Logic: AND, OR, NOTPermutation: Ordering

Goal: Cost, Performance, Power, Reliability

Page 8: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

Part I. Number Systems

1. Introduction (Why binary system?)2. Binary Number B.F. Section 2

3. Gray Code (Variations of binary system)4. Negative Numbers B.F. Section 2 (Hardware

implementation)5. Residual Numbers N.T. Section 1, Shaum Ch. 11

6. Cryptography N.T. Section 2

8

Page 9: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

I. Introduction (Why binary number?)

1. Numbers in general2. Radix number systems3. Efficiency of the systems4. Remarks

9

Page 10: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

1.1 iClicker

Usage of number systems for computers is:• A. to represent a set of numbers• B. to provide a unique index for every object • C. to reflect the algebraic and arithmetic

structure of the numbers• D. All of the above.

10

Page 11: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

1.1 Numbers in GeneralSymbols and Positions• Roman numeral – Symbols: I, V, X, L, C, D, M– Positions: I, II, III, IV, V, VI, …, IX, X, XI,

• Time– Symbols: 0-11 month, 0-29 day, 0-23 hour, 0-59 min, 0-

59 second– Positions: e.g. 3 hrs 45 minutes

• Arabic numeral– Symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9– Positions: 1, 2, …, 9, 10, 11, 12, …, 20, 21

11

Page 12: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

1.2 Radix Number Systems• Decimal number: 0123456789– E.g. (1026)10

• Binary number: 01– E.g. (10000000010)2

• Octal number: 01234567– E.g. (2002)8

• Hexadecimal: 0123456789ABCDEF– E.g. (402)16

• Hybrid radix number– Varies on weights of the positions and range of

symbols per position– Example: time

12

Page 13: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

1.2 Radix Number SystemsDefinition: A number system of radix r

and n digits uses the format:(bn-1, …,b1, b0)r

where 0<= bi <r for 0<=i< n.

Value: bn-1rn-1 + …+b1r1+b0r0

Range: rn [0, rn-1]# tokens: rxn

13

Page 14: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

1.2 Radix Number Systems• Decimal (radix r=10)

– Each digit belongs to the set {0,1,2,3,4,5,6,7,8,9}– Example: (250)10=2*102 + 5*10 – An n digit decimal number system covers 10n numbers from 0 to

10n-1 • Binary (radix r= 2)

– Each digit belongs to the set {0,1}– Example: (10111)2= 24 +22 + 21 + 20 = 23– An n digit binary number system covers 2n numbers from 0 to

2n-1 • Ternary (radix r=3)

– Each digit belongs to the set {0,1,2}– Example: (1202)3= 33+2x32+2x30 =27+18+2=47– An n digit ternary number system covers 3n numbers from 0 to

3n-1 14

Page 15: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

iClicker

The value of a binary number (1011)2 is

• A. 3• B. 7• C. 11• D. None of the above

15

Page 16: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

iClicker

The value of a ternary number (211)3 is

• A. 3• B. 4• C. 22• D. None of the above

16

Page 17: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

1.3 Efficiency of Number SystemsEfficiency: #tokens vs. range of the numbers• Binary (r=2): With n digits, we use 2n

tokens to represent 2n numbers• Ternary (r=3): With n digits, we use 3n

tokens to represent 3n numbers• Octal (r=8): With n digits, we use 8n

tokens to represent 8n numbers• Decimal (r=10): With n digits, we use 10n

tokens to represent 10n numbers17

Page 18: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

1.3 Efficiency of Number SystemsGiven 30 tokens, how many numbers can we represent?• Binary: The length of the number n=15 (2n=30).– 215 =~33,000

• Ternary: The length of the number is n=10 (3n=30).– 310 =~60,000

• Radix 5: The length of the number is n=6 (5n=30).– 56 =~16,000

• Decimal: The length of the number is n=3 (10n=30).– 103 =~1,000

18

Page 19: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

Which is The Most Expressive?Given radix r with n digits, #tokens t= r x n• range of the numbers: rn =rt/r

• We fix t to maximize the range maxr rt/r

• In real space, the solution is r=e (2.718…)• In VLSI technology, binary is a convenient

choice. –Switch (off, on) or Voltage (0, Vdd)

19

Page 20: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

1.4 Remarks

• We design number systems according to the usages and technologies.

• For VLSI designs, binary number system is consistent with the technology.

• Various number systems are possible for different goals and technologies, e.g. low power, reliability, security, bandwidth.

20

Page 21: CSE 20 Discrete Mathematics Instructor CK Cheng, CSE2130 ckcheng+20@ucsd.edu, tel: 858 534-6184 Teaching Assistants Jingwei Lu E-mail: jlu@cs.ucsd.edu.

iClicker

The range of a binary number system with 32 digits is around

• A. 4x106

• B. 109

• C. 4x109

• D. 4x1012

21


Recommended