cs2420: lecture 1 vladimir kulyukin computer science department utah state university
Post on 20-Dec-2015
213 views
TRANSCRIPT
CS2420: Lecture 1
Vladimir KulyukinComputer Science Department
Utah State University
Outline
• What is CS 2420?
• Mathematical Preliminaries
Part 1
What is CS2420 is about?
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?
Textbook
Author: Mark Weiss
Title: Data Structures and Algorithm Analysis in C++, Third Edition
Publisher: Addison Wesley
ISBN: 0-321-44146-X
Workload
• There will be regular assignments.
• Assignments will require reading, coding and/or analysis.
• Times allocated for assignments will vary (1 – 3 weeks).
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.
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 %
Class Attendance
• Attendance of regular classes is optional.
• Attendance of exams is mandatory (unless you want to get an F).
Part 2
Mathematical Prelims
(Chapter 1: Section 1.2)
Floors and Ceilings
.integer smallest :Ceiling
.integer greatest :Floor
xx
xx
Floors and Ceilings
nnn
xxxxx
22 2.
11 1.
Exponents
122222
NNNN
ABBA
BAB
A
BABA
XX
XX
X
XXX
Logarithms
.log ifonly and if ABBX XA
Logarithms
AB
ABA
BAAB
A
BB
BA
CB
C
CCC
C
CA
log
1log
loglog
logloglog
log
loglog :Base of Change
Logarithms
AN
CCC
BB
BB NA
BAB
A
AA
loglog
logloglog
log1
log
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
Geometric Series
.10 if ,1
1
.1
1...
0
0
1210
xx
x
x
xxxxxx
n
k
k
n
k
nnk
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
)(
Factorials
0,)!1(
0,1!
nnn
nn
nk
e
nnn
n1
12!
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).
Useful Proof Techniques
• Direct proof
• Proof by contradiction
• Proof by counterexample
• Proof by induction
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.
Direct Proof: Example
. and
then, and ,min if that Show
21
21
dxdx
dxddd
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.