Wireless Sensor
Networks
Introduction
Wireless Sensor Networks are networks that consists of
sensors which are distributed in an ad hoc manner.
It uses MEMS(Micro-electro Mechanical System)
These sensors work with each other to sense some physical
phen
Chapter 9: Transport Layer and Security
Protocols for Ad Hoc Wireless Networks
Introduction
Issues
Design Goals
Classifications
TCP Over Ad Hoc Wireless
Networks
Other Transport Layer
Protocols
Security in Ad Hoc Wireless
Networks
Network Security
Wireless Application
Protocol
WAP
Wireless Application Protocol
The Wireless Application Protocol (WAP) is a
concerted attempt to develop and implement
a standard for communicating information
between wireless devices and the Internet.
WAP is promulgated
Wireless Local Area
Network
WLAN
Wireless Local Area Network
A wireless local area network (WLAN) is a
flexible
data
communications
system
implemented as an extension to, or as an
alternative for, a wired LAN.
To say that WLANs are completely without
wi
Transport Protocols for
MANETs
Wireless
Wireless
Sensor
Ad Networks
Hoc and Sensor
& Internet
Networks
of Things
Introduction
Transmission control protocol (TCP) provides reliable
connection oriented services between any two end systems
on the Internet.
Internet Security
CSCE 813
Transport Layer Security
TCP/IP Protocol Stack
Application Layer
Transport Layer
Internetwork Layer
Network Access Layer
CSCE 813 - Farkas
2
Communication Between
Layers
Application Data
Application layer
Transport payload
Trans
Types of Algorithms
Basic Steps of the
complete development of
an algorithm
1- Statement of the problem
2-Development of a model
3-Design of an algorithm
4-Correctness of the algorithm
5-Implementation
6-Analysis and complexity of the algorithm
7-Program
Types of Algorithms
Basic Steps of the
complete development of
an algorithm
1- Statement of the problem
2-Development of a model
3-Design of an algorithm
4-Correctness of the algorithm
5-Implementation
6-Analysis and complexity of the algorithm
7-Program
Greedy Method
1
A greedy algorithm always makes the choice
that looks best at the moment.
It makes a locally optimal choice in the hope
that this choice will lead to a globally optimal
solution.
Greedy algorithms do not always yield
optimal solutions,
Running Time
Running time of an algorithm is the number of
primitive steps that are executed
Analysis of Insertion Sort
Best Case : T (n) = an+b where a and b
depends on ci
Worst Case: T (n) = an2+ bn+c where a,b and
c depends on ci
Asymptotic Performan
Greedy Method
1
A greedy algorithm always makes the choice
that looks best at the moment.
It makes a locally optimal choice in the hope
that this choice will lead to a globally optimal
solution.
Greedy algorithms do not always yield
optimal solutions,
Algorithm Analysis
Analysis vs. Design
Analysis: predict the cost of an algorithm in
terms of resources and performance
Design: design algorithms which minimize
the cost
Time Complexity
Real Time:
To analyze the real time complexity of a program
we need
Outline
String Matching
Introduction
Nave Algorithm
Rabin-Karp Algorithm
String Matching using Finite Automata
Knuth-Morris-Pratt (KMP) Algorithm
Introduction
What is string matching?
Finding all occurrences of a pattern in a given text (or
body of text)
Greedy Method
1
A greedy algorithm always makes the choice
that looks best at the moment.
It makes a locally optimal choice in the hope
that this choice will lead to a globally optimal
solution.
Greedy algorithms do not always yield
optimal solutions,
CS 332 - Algorithms
Dynamic programming
0-1 Knapsack problem
09/07/11
1
Review: Dynamic programming
DP is a method for solving certain kind of
problems
DP can be applied when the solution of a
problem includes solutions to subproblems
We need to find a re
Outline
String Matching
Introduction
Nave Algorithm
Rabin-Karp Algorithm
String Matching using Finite Automata
Knuth-Morris-Pratt (KMP) Algorithm
Introduction
What is string matching?
Finding all occurrences of a pattern in a given text (or
body of text)
Outline
String Matching
Introduction
Nave Algorithm
Rabin-Karp Algorithm
String Matching using Finite Automata
Knuth-Morris-Pratt (KMP) Algorithm
Introduction
What is string matching?
Finding all occurrences of a pattern in a given text (or
body of text)
Branch and bound
1
Branch and Bound Method
The design technique known as branch
and bound is similar to backtracking, in
that it searches a tree model of the
solution space and is applicable to a wide
variety of discrete combinatorial problems.
Backtrac
NP Hard
and
NP Complete Problems
1
An algorithm solves the problem in
polynomial time if its worst case time
efficiency belongs to O(p(n) where p(n)
is a polynomial of the problems input
size n.
2
An algorithm solves the problem in polynomial time if its
NP Hard
and
NP Complete Problems
1
Definition of P:
Set of all decision problems solvable in polynomial
time by a deterministic algorithm (Turing machine)
Examples:
MULTIPLE: Is the integer y a multiple of x?
YES: (x, y) = (17, 51).
RELPRIME: Are th
NP Hard
and
NP Complete Problems
1
An algorithm solves the problem in polynomial time if its worst case time
efficiency belons to O(p(n) where p(n) is a polynomial of the
problems input size n.
Tractable problems: problems that can be solved in polynomial
Back Tracking
1
Back tracking can be described as an
organized exhaustive search which often
avoids searching all possibilities.
This technique is generally suitable for
solving problems where a potentially large,
but finite number of solutions have to be
Lower Bound for sorting
Linear-Time Sorting Algorithms
Sorting So Far
Insertion sort:
Easy to code
Fast on small inputs (less than ~50 elements)
Fast on nearly-sorted inputs
O(n2) worst case
O(n2) average (equally-likely inputs) case
O(n2) reverse-sorted
NP Hard
and
NP Complete Problems
1
Definition of P:
Set of all decision problems solvable in polynomial
time by a deterministic algorithm (Turing machine)
Examples:
MULTIPLE: Is the integer y a multiple of x?
YES: (x, y) = (17, 51).
RELPRIME: Are th
Approximate Algorithms
There are many important NP-Complete
problems
There is no fast solution !
But we want the answer
If the input is small use backtrack.
Isolate the problem into P-problems !
Find the Near-Optimal solution in polynomial
time.
T
NP Hard
and
NP Complete Problems
Definition of P:
Set of all decision problems solvable in polynomial
time by a deterministic algorithm (Turing machine)
Examples:
MULTIPLE: Is the integer y a multiple of x?
YES: (x, y) = (17, 51).
RELPRIME: Are the
Convex Hull
Convex Hull
Applications. Among oldest and most wellstudied problems in computational geometry
problems.
1- Robot motion planning.
2- Shortest perimeter fence enclosing P.
3-Smallest area polygon enclosing P.
4-Unique convex polygon whose vert
Approximate Algorithms
An approximate algorithm is a way of dealing with NP-completeness for optimization problem.
This technique does not guarantee the best solution. The goal of an approximation algorithm is to
come as close as possible to the optimum v
Analysis and Design of
algorithms
1
Books
Fundamentals of Computer algorithms
Horowitz , Sahani and Rajasekaran
Introduction to Algorithms
Coremen , Leiserson
The Design and Analysis of Computer
Algorithms
Aho, Hopcroft and Ullman
2
ALGORITHM
A finite set
Amortized
Analysis
1
Worst
case analysis is sometimes
overly pessimistic.
Consider a process P that has side
effects which means that P modifies
the value of global variables.
So two successive identical calls on P
could take substantially different
am