Computer Networks
Computer Networks
Computer Networks
sending and receiving data via the links which allow Computer
networks to communicate. )
connecting computers together to enable communication
and data exchange between them.
Computer Network is a collection of two or more
computers.
Basics building blocks of a Computer network are
Nodes(Data communication like a modem etc) and
Links(wired or wireless connection).
BASIC TERMINOLOGIES
o 1)network(collection of computers and devise)
o 2) nodes(devices that are connected to a network)
o 3) protocol( set of rules and standard
o 4) topology( physical and logical arrangement of nodes)
o 5) service provider networks( permission to take network capacity and functionality )
6) IP address( unique numerical identifiers )
o 7) DNS (Domian name system used to translate human readable domain names)
o 8) firewall(security devices that is used to monitor and control incoming and
outgoing network traffic)
TYPES OF ENTERPRISE COMPUTER NETWORKS
o LAN( local area network covers small area)-personal network and workstation
o WAN(wide area network covers large geographic area)
o MAN (covers more than Lan)-(metropolitan area network 5-50km)
o SAN( storage are network)
o VPN( virtual private network)
o EPN( Enterprise private network)
o PAN( personal are network)- interconnection of personal network
o CLOUD NETWORK( they can be hosted on public or private cloud service providers)
Ethernet
o Used for Lan technology.
Bit stuffing is the insertion of non information bits into
data. Note that stuffed bits should not be confused with
overhead bits.
FLOW CONTROL:
Set of procedures that tell sender how much data it can
transmit before waiting for acknowledgement from the
receiver.
Ex: stop and wait protocol
ERROR CONTROL:
Detect error in transmitted frames and retransmits all the
erroneous frames.
Ex: stop and wait ARQ
Sliding window ARQ
SWITCHING:
Process of transferring data packets from one device to
another in a network.
Takes places in the data link layer.
More efficient than network hub or repeater
Types of switching
o Message switching- entire data block is forwarded
across the entire network.
o Circuit switching – connection established between
the source and destination beforehand, message
only send to destination only.
o Packet switching- message are broken down into
smaller parts and shared into packets, data frames
or smaller components.
Datagram network- data frame are taken
separately and processed separately.
Virtual circuit network- virtual connection made
between the source and destination is made
before transmitting any data.
IP ADDRESS: unique address of the web page
Types of IP addresses:
o IPV4
Network address and host address
Version 4
32 bits
0-255
Binary digits separated by dot(.)
o IPV6(version 6)
Version 6
8 hexa decimal numbers
Separated by colon(:)
128 bit
B- tree
Heap(OlogN) time
Complete binary tree where the root of any
subtree has a higher value than all nodes in its
subtree
Two types of heap
Max heap
o The root node will be higher than the
sub tree
Min heap
o The root node or parent node will be
smaller than the remaining subtree
Graph
Non linear data structure
Vertices and edge
Breadth first search (BFS)
Depth first search (DFS)
Types of graphs
Null graph
Trivial graph
Undirected graph
Directed graph
Connected graph
Disconnected graph
Regular graph
Complete graph
Cycle graph
Cyclic graph
Directed acyclic graph
Bipartite graph
Weighted graph
Hashing
o Process of converting input data into fixed size
string of character which is typically a
hexadecimal number.
o Hash function:
Creates a aping between key and value,
this is done thought the use of
mathematical formulas.
Types of hash function
Division method
Mid square method
Folding method
Multiplication method
Handle collisions:
Separate chaining (open hashing) –
key%n
Open addressing (closed hashing)
o Linear probing – sequentially
arranged
o Quadratic probing
o Double hashing
Rehashing
Load factor increases to more than its
predefined value
O(log n)
ALGORITHM
Algorithm:
o Set of rules to be followed in calculations
or other problem solving operations.
o Simple
o Complex depending
o Asymptotic notation:
Method of describing the limited
behaviour of a function
Three analysis:
Best case(omega)
Average case (theta)
Worst(o)
o Types of algorithm
Brute force
Recursive
Backtracking
Searching
Sorting
Hashing
Divide and conquer
Solving the problem using the
divide, conquer, and combine
strategy.
Merge sort is the best example –
o(n logn)
Quick sort – using pivot and
partitions the given array
around the picked pivot by
placing the pivot in its correct
position in the sorted array
Greedy
Dynamic programming
Randomized
Recurrence relation:
o Backbone of algorithmic analysis,
providing a systematic way to express the
time complexity of recursive algorithm
o Recursive relation:
Substitution method
Recurrence tree method
Master method T(N) =At(N/B)+f(N)
Strassen’s matrix multiplication
o Efficient than the standard method
Split into sub matrixs
Recurisively computes seven product
Combine the product to form the
result
Greedy algorithm
o Builds solution piece by piece
o Best fit for greedy
o Optimal substructure property
Job sequencing problem
Single processor operating
system and a set of job that
have to be completed with given
deadline constraints
Fractional knapsack problem
Prim’s algorithm to find minimum
spanning tree
Activity selection problem
Find max no of activites a
person can perform if they can
only work on one activity at a
time
Dijkstra’s shortest path algorithm
Kruskal minimum spanning tree