CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.
-
date post
20-Dec-2015 -
Category
Documents
-
view
214 -
download
0
Transcript of CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.
![Page 1: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/1.jpg)
CS2420: Lecture 1
Vladimir KulyukinComputer Science Department
Utah State University
![Page 2: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/2.jpg)
Outline
• What is CS 2420?
• Mathematical Preliminaries
![Page 3: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/3.jpg)
Part 1
What is CS2420 is about?
![Page 4: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/4.jpg)
Four Basic Questions for the Computer Scientist
• I have implemented an algorithm. How do I know how fast it runs?
• How can I prioritize tasks?
• How can I store/organize data efficiently?
• How can I retrieve/search data efficiently?
![Page 5: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/5.jpg)
Textbook
Author: Mark Weiss
Title: Data Structures and Algorithm Analysis in C++, Third Edition
Publisher: Addison Wesley
ISBN: 0-321-44146-X
![Page 6: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/6.jpg)
Workload
• There will be regular assignments.
• Assignments will require reading, coding and/or analysis.
• Times allocated for assignments will vary (1 – 3 weeks).
![Page 7: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/7.jpg)
Homework Submission
• All coding problems should be submitted at http://eagle.cs.usu.edu.
• You must register for this class on the Eagle server.
• All analytical problems will be pencil and paper.
![Page 8: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/8.jpg)
Final Grade
• Homework – 20 %
• Midterm Exam (March 5th, in class, 1:30 – 2:20) – 30 %
• Final Exam (April 28th, in class, 11:30 – 1:20) – 50 %
![Page 9: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/9.jpg)
Class Attendance
• Attendance of regular classes is optional.
• Attendance of exams is mandatory (unless you want to get an F).
![Page 10: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/10.jpg)
Part 2
Mathematical Prelims
(Chapter 1: Section 1.2)
![Page 11: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/11.jpg)
Floors and Ceilings
.integer smallest :Ceiling
.integer greatest :Floor
xx
xx
![Page 12: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/12.jpg)
Floors and Ceilings
nnn
xxxxx
22 2.
11 1.
![Page 13: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/13.jpg)
Exponents
122222
NNNN
ABBA
BAB
A
BABA
XX
XX
X
XXX
![Page 14: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/14.jpg)
Logarithms
.log ifonly and if ABBX XA
![Page 15: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/15.jpg)
Logarithms
AB
ABA
BAAB
A
BB
BA
CB
C
CCC
C
CA
log
1log
loglog
logloglog
log
loglog :Base of Change
![Page 16: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/16.jpg)
Logarithms
AN
CCC
BB
BB NA
BAB
A
AA
loglog
logloglog
log1
log
![Page 17: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/17.jpg)
Arithmetic Series
.1,|1|
6
121
.2
1...321
1
1
1
2
1
kk
ni
nnnk
nnnk
n
i
kk
n
k
n
k
![Page 18: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/18.jpg)
Geometric Series
.10 if ,1
1
.1
1...
0
0
1210
xx
x
x
xxxxxx
n
k
k
n
k
nnk
![Page 19: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/19.jpg)
Polynomials
• Let d be a positive integer, then a polynomial in n of degree d is a function p(n) defined as
d
i
iinanp
0
)(
![Page 20: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/20.jpg)
Factorials
0,)!1(
0,1!
nnn
nn
nk
e
nnn
n1
12!
![Page 21: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/21.jpg)
Proofs
• A mathematical proof system consists of axioms, definitions, and terms
• Axioms are statements that are assumed to be true.
• Terms are elementary units that are not defined (dots, numbers).
• Definitions define new concepts through terms or existing definitions (lines, even numbers, odd numbers).
![Page 22: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/22.jpg)
Useful Proof Techniques
• Direct proof
• Proof by contradiction
• Proof by counterexample
• Proof by induction
![Page 23: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/23.jpg)
Direct Proof
• Need to Show: If P, then Q. (P Q).
• Assume that P is true and use the axioms, definitions, and previous theorems to show that Q is true.
![Page 24: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/24.jpg)
Direct Proof: Example
. and
then, and ,min if that Show
21
21
dxdx
dxddd
![Page 25: CS2420: Lecture 1 Vladimir Kulyukin Computer Science Department Utah State University.](https://reader035.fdocuments.net/reader035/viewer/2022062714/56649d425503460f94a1d216/html5/thumbnails/25.jpg)
Proof By Contradiction
• Need to Show: If P, then Q.
• Assume that P is true and Q is false and find a contradiction, i.e., a statement that contradicts another true statement.