Department of Computer Science
CS 3357a - Networking I
Course Outline - Fall Term 2012
Course Description
This course provides introduction to computer network concepts. We will focus on the concepts
and fundamental design principles that have contributed
Analysis of Algorithms
Input
Algorithm
Output
Outline and Reading
Running time (1.1) Pseudo-code (1.1) Counting primitive operations (1.1) Asymptotic notation (1.2) Asymptotic analysis (1.2) Case study (1.3.1, 1.4)
Analysis of Algorithms
2
Running Time
Th
Data Structures and ADTs
Abstract Data Types (ADTs) are user dened data types. An
ADT has 2 parts:
1. A name or type, specifying a set of data (e.g. Dictionary).
2. Descriptions of all the operations (or methods) that do things
with that type (e.g. find,
4
.
5
R
o
u
t
i
n
g
a
l
g
o
r
i
t
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 Whats inside a router
4.4 IP: Internet Protocol
Datagram format
IPv4 addressing
ICMP
IPv6
Network Layer
4-1
Interplay between routin
NAT: Network Address
Translation
NAT: Network Address Translation
rest of
Internet
local network
(e.g., home network)
10.0.0/24
10.0.0.1
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
All datagrams leaving local
network have same single source
NAT IP address: 138
Chapter4:NetworkLayer
Chaptergoals:
understandprinciplesbehindnetworklayerservices:
r networklayerservicemodels
r forwardingversusrouting
r howarouterworks
r routing(pathselection)
r dealingwithscale
r advancedtopics:IPv6,mobility
instantiation,implemen
r
e
t
r
a
n
s
m
i
s
s
i
o
n
s
a
r
e
TCP reliable data transfer
TCP creates rdt service on top of IPs unreliable service
pipelined segments
cumulative ACKs
TCP uses single retransmission timer
Transport Layer
3-1
TCP sender events:
data rcvd from app:
crea
Transport layer
Application
Presentation
FTP
ASCII/Binary
Session
TCP
Network
Physical
Transport
IP
Transport
Link
Application
Network
Ethernet
The 7-layer OSI Model
Link
The4layerInternetmodel
Chapter 3: Transport Layer
Our goals:
understand principles
b
DNS: Domain Name System
People: many identifiers:
SSN, name, passport #
Internet hosts, routers:
Domain Name System:
distributed database
implemented in hierarchy of
many name servers
IP address (32 bit) - used for addressing datagrams
application-layer p
Application layer and its
protocols
Chapter 2: Application layer
2.1 Principles of network applications applications
2.6 P2P
2.2 Web and HTTP
2.3 FTP
2.4 Electronic Mail
2.7 Socket programming
with UDP
2.8 Socket programming
with TCP
SMTP, POP3, IMAP
2.5
Introduction on
Protocol Layers, Service
Models
and
Socket Programming
Organization of air travel
ticket(purchase)
ticket(complain)
baggage(check)
baggage(claim)
gates(load)
gates(unload)
runwaytakeoff
runwaylanding
airplanerouting
airplanerouting
airplan
Analysis of Algorithms
CS 1037a Topic 13
Overview
Time complexity
- exact count of operations T(n) as a function of input size n
- complexity analysis using O(.) bounds
- constant time, linear, logarithmic, exponential, complexities
Complexity analysis
The Linked List ADT
CS 1037a -Topic 11
Related materials
from Main and Savitch
Data Structures & other objects using C+
Sec. 5.1, 5.2: Nodes and the Linked-List toolkit
(our approach is somewhat different)
Sec. 5.5: Dynamic Arrays vs. Linked-List
Sec.
Ordered Lists
CS 1037a Topic 10
Ordered List ADT
A list that is maintained in sorted order relies
upon the relational operators <=, =, etc.,
being properly defined for the items in the list;
this may require operator overloading in the
item class
Most o
Binary Search Trees
6
<
2
1
2004 Goodrich, Tamassia
9
>
4=
Binary Search Trees
8
1
Ordered Dictionaries
Keys are assumed to come from a total
order.
New operations:
first(): first entry in the dictionary ordering
last(): last entry in the dictionary orde
AVL Trees
v
6 3 4 8
z
2004 Goodrich, Tamassia
AVL Trees
1
AVL Tree Definition ( 9.2)
AVL trees are balanced. An AVL Tree is a
44
4 3 1
2
17
binary search tree
such that for every internal node v of T, the heights of the
78
1
32
2
50
88
1
48
62
1
children
1 Time Complexity of Binary Search in the Worst Case
As linear search, the worst case for binary search is when the value is not in the set
as then the algorithm has to perform the maximum possible number of recursive calls, and
hence the maximum possible
Algorithms II
CS 1025 Computer Science Fundamentals I Stephen M. Watt University of Western Ontario
Algorithms for Sorting
How long should it take to sort n values? Some different ways to do it:
Insertion Sort [Good for small n. Bad for big n. ] Quick S
Intro to Java I:
Variables, Arrays, Loops
CS 1025 Computer Science Fundamentals I
Stephen M. Watt
University of Western Ontario
A First Java Example
/ This is a first example in Java for those who have
/ written programs in other languages.
class Hello cf
Different Points of View
CS 1025 Computer Science Fundamentals I
Stephen M. Watt
University of Western Ontario
Many points of view
Before we dive into object-oriented programming,
lets look at a couple of other points of view.
We will take a quick look
Course Overview
CS 1025 Computer Science Fundamentals I
Stephen M. Watt
University of Western Ontario
Administrative Matters
Course Outline
Pre-requisites and anti-requisites
Who is this course for
Self-placement of advanced students with
significant p
1 Linear Search
To solve the problem of deciding whether x 2 S , we must determine rst how we are going
to organize the elements of set S m so they can be stored in the memory of the computer.
The simplest approach might be to store the elements of S in a
Time covnptexity Sor fdnd, 'opcrotiun
in avcvog casc
grobing
Tirrs
dooblc hosht*g
f,p-.ntc
' chatnrng
l.o
a5
Lood
Separotc charittg
L incor Pcobtrg
D oo
blc
ha s hiag
faotot d=fr
lpsragc # of kcY comfarrions
,+4
*#
-tt-d
]A,
Number Theory and
Cryptography
Chapter 4
Chapter Motivation
Number theory is the part of mathematics devoted to the
study of the integers and their properties.
Key ideas in number theory include divisibility and the
primality of integers.
Representations
Algorithms
Chapter 3
Chapter Summary
Algorithms
Example Algorithms
Growth of Functions
Big-O and other Notation
Complexity of Algorithms
Algorithms
Section 3.1
Section Summary
Properties of Algorithms
Algorithms for Sorting
Halting Problem
Problems and Al
Basic Structures: Sets,
Functions, Sequences,
Sums, and Matrices
Chapter 2
Chapter Summary
Sets
The Language of Sets
Set Operations
Set Identities
Functions
Types of Functions
Operations on Functions
Sequences and Summations
Sets
Section 2.1
Section Summa
The Foundations: Logic
and Proofs
Chapter 1, Part III: Proofs
Summary
Proof Methods
Proof Strategies
Introduction to Proofs
Section 1.7
Section Summary
Mathematical Proofs
Forms of Theorems
Direct Proofs
Indirect Proofs
Proof of the Contrapositive
Proof b