Posts

Computer Network | Subnetting

Maintaining a big network and providing security to such giant networks is always a hectic task. Where the division of networks or subnetting makes things easier. When you have to reach to a process running in a computer of a different network, there are three things to be identified. Identify the network. Firs the main network ID then the subnet ID. As deeper the subnetting, the identification time will become even more complex. Identification of Host Identification of Process Let's subnet 172.27.172.0/24 1 (Network ID) in to two (where Directed Broadcast Address(DBA) : 172.27.172.255 2 ). This network has 256(2 32-24 ) IPs. Subnet-1 : 172.27.172.0/25 1 ( DBA-S1 : 172.27.172.127 ) Subnet-2 : 172.27.172.128/25 ( DBA-S2 : 172.27.172.255 2 ) The similarity of nework ID of first subnet and directed broadcast ID of second network to those of the main network is obviously indicates that network division. The top level router will...

Git in short - A Practical Guide

Image
Git is one of the popular software version control systems. It helps to track modifications of files in a project and provides mechanisms to interact with the changes. This article explains some set of practical GIT work flows in brief. Section 1: Creation and management of a local GIT repository. STEP 0 : Set path to project directory where version controller to be initialized. git init Syntax :   git init git init command initializes the current directory as a git repository. A hidden .git will be created in the current folder, to store all tracking related information. See the command line response on listing the files in the repository. Added a README.md file to the repository. git status Syntax :      git status git status command show the current status of the repository. The cmd line response indicates, the file README.md is not tracked by git. git add Syntax :   ...

Computer Networks | IP Address and Network Address Classification

Sending a data packet between to different entities can be classified into two major categories. Unicasting : A one to one data transmission between a single sender and receiver. Broadcasting : Where there is only a single sender but multiple number of receivers are participating in data transmission. IP(Internet Protocol) address is the unique identity allocated to each and every machine on internet. IP version 4 (IPv4) address is a 32bit number, which is combination of Network ID and Host ID . Usually represents using dotted decimal notation (example: 172.27.172.27). There IP address are grouped into five classes, based on the size of sub-networks possible under each network group. The first octet of a IP address means 8 bits starting from most significant bit. The value of fist octet decides the class of IP address as shown. Class Name Range of First Octet Reserved bits for Network ID Reserved bits for Host ID ...

Theory of Computation | NFA - Non-deterministic Finite Automata

Image
Prerequisites : Symbols, Alphabets, Strings and Language Types of Automata and Representation. DFA - Deterministic Finite Automata When there is a chance for multiple state changes on a given single input, the non-deterministic in autoama handles the scenario. The non determinism may even lead a in to null states. Non-deterministic Finite Automata(NFA) are pseudo machines, means cannot be implemented in reality, even though they are finite state machines. But of course NFA are very useful to resolve problem by exhaustive searching and backtracking. A null state is represented using Greek letter Φ The figure represents a NFA, which accepts all strings which starts with alphabet 'a' Here we have two states, A and B. so, set of all states Q = {A, B} and set of all symbols Σ = {a, b} Final state F = {B} and initial state q 0 = { A } When input 'a' is given to state A , the state changes to B But...

Theory of Computation | DFA - Deterministic Finite Automata

Image
Automata are decision making machines, which decides whether a string belongs to a language or not. An automaton is called deterministic , when it shows a unique path for change of state on every input. Automata with definite number of states are called finite automata. A Deterministic finite automaton(DFA) has both qualities,ie. it is deterministic and has finite number of states A binary number is even if its LSB(Least Significant Bit) is zero (eg: 110 = 6 is even). If LSB is one, it is odd (eg: 111 = 7 is odd). So if we are constructing an DFA which accepts all odd binary numbers, our deterministic finite machine will have two states odd and even. set of of all states Q = {O, E} O - Odd E - Even Our machine requires inputs, the elemental binary numbers, i.e 0 or 1 These are called input alphabets Σ = {0, 1} When you feed this a DFA with a inputs from MSB(Most Significant Bit) to LSB of a binary, when the zero comes as input the stat...

Theory Of Computation | Types of Automata and Representation

Image
The validation of a string for its membership in a language are handled by automata. An automaton acts as a acceptor of a string for a given language This is an example for an automaton which accepts all strings containing at least one 'a' . These circles are known as states. So X and Y are states. Circle with dual boundary (here Y ) is final state and one with unmarked arrow is initial state(here X ). Consider the string "baba", Initially we are at X , on seeing first alphabet 'b' the automaton loop back to X itself ( Edge with alphabet 'b' point to X itself). On seeing next alphabet 'a' , the state transition happens and reaches at new state Y . Once we reaches at state Y , both 'a' and 'b' loop back to the same state. So the string "baba" finally reaches as state Y Since the Y is the final state of this automaton, we can conclude that the sting "baba" belongs t...

Theory of Computation | Symbols, Alphabets, Strings and Language

Theory of computation or Automata theory mainly deals with abstract modeling of machines and computation. These models embody some of the important complex logical features we encounter, on dealing software as hardware. The following are the basic terminologies, which are frequently used in Theory of Computation Symbol The smallest building entity of Automata Theory( or Theory of Computation) is known as symbol. example: a, 2, i, B... Alphabet A set of symbols forms an alphabet. An alphabet is usually represented by Greek letter sigma( Σ ) example: Σ= { x, y} String A string is a sequence of symbols in a alphabet. example: 'xy' is a string derived from the alphabet Σ= { x, y} Language Collection of strings are called as a language. example: Let an alphabet Σ= { p, q, r} Then if a language L of set of a strings of length 2 over Σ can be represented as L = { pp, pq, pr, qp, qq, qr, rp, rq, rr } ...