Saturday, February 7

GATE 2015 COMPUTER SCIENCE (CSE) QUESTIONS AND ANSWER KEY

Hello reader,

Here I am posting the questions asked in GATE 2015  COMPUTER SCIENCE (CSE)  Exam and the answer key. I am thankful to all my friends who have shared these questions. If you also want to share any question other than posted here feel free to comment that here.



Do you know any question other than posted here? Feel free to comment  here.   :)

  All Answers were collected from various forums. Check it and suggest  corrections  if  required.

Here we go.!!

 

 

 

1. Which of the following is not correct about HTTP cookies ?

a.A cookie is a piece of code that has a potential to compromise the security of an Internet user.

b. A cookie gains entry to the user's work area through an HTTP Header.

c. It has expiry date and time.

d. It can be used to track the browsing pattern of a user at a particular site.

a. Any personal information that you give to a Web site, including credit card information, will most likely be stored in a cookie unless you have turned off the cookie feature in your browser. 

b.  

c. The Expires directive in cookie  tells the browser the exact/absolute date and time  to delete the cookie

If the user requests a page of the site for first time the server creates a random string and sends it as a cookie back to the browser together with the requested page;this cookie will automatically be sent by the browser to the server every time a new page from the site is requested;the server stores the URL of the requested page, the date/time of the request, and the cookie in a log file. By analyzing the log file collected in the process it is possible to plot browsing pattern. 

Ans: a



2.If a binary tree has 20 leaves, then how many nodes will have two children nodes?

If there are n leaves, there will be (n-1) nodes having two child nodes. 

Answer is 20-1=19

 

3. In a typical server in which order the operations-  accept, bind, listen and recv - will be executing?
a)listen,bind,accept,recv
b)bind,listen,accept,recv
c)listen,accept,bind,recv
d)accept,listen,bind,recv

bind( )  :to associate the socket with a port on server machine

listen( ) :wait for incoming connections

accept( ):accept the connection request and returns new socket file descriptor

recv( ) : accepts the data from the client.

The order is as in (b):

 


4. Assume that for a certain processor, a read request takes 50 nanoseconds on a cache miss and 5 nanoseconds in a cache hit. Suppose while running a program, it was observed that 80% of the processor's read requests result in a cache hit. The average read access time in nanoseconds is :

Ans:  effective memory access time = (hit rate * cache access time) + (miss rate * access time for cache miss),

(50x20+5x80)/100=14 ns

 
5. Find the number of divisors for 2100?

To find the number of positive integral divisors, write the number as a product of prime numbers. Add one to exponent value of each prime number and multiply them together .

Read the method in detail here.

Given number 2100 can be represented as 2100=2*3*5*7*2*5=2^2 * 3 * 5^2* 7

Total number of divisors= (2+1)*(1+1)*(2+1)*(1+1)= 3*2*3*2= 36


 
6. Let R be the relation on the set of positive integers such that aRb if and only if a and b are distinct and have a common divisor other than 1. Which one of the following statements about R is true?

a) Reflexive and symmetric but not transitive
b) Neither Reflexive nor symmetric but transitive
c) Symmetric but not reflexive, not transitive
d) Reflexive but not symmetric, not transitive

Ans c

#Given relation is symmetric for all integers. eg: 7R21  means 21R7

#Given relation cannot be reflexive as a and b should be distinct numbers.

#Given relation may not be transitive Eg: 7R21 and 21 R 3 are true but 7R3 is false.

7. What will the following code print if input is given as ABCD EFGH
void foo(char *a)
{
    if(*a && *a != ' ')
       foo(a+1);
putchar(*a);
}

a. ABCD EFGH
b. ABCD
c. EFGH
d. DCBA 

 Ans d

8. Match the following


A. Lexical analysis                                       i. Graph coloring
B. Parsing                                                    ii. DFA minimization
C. Register allocation                               iii. Post order traversal
D. Expression evaluation                           iv. production tree

Solution:

A -ii   B- iv    C-i    D-iii

9. In a bank transaction scenario, read(x); x:=x-50; write(x); ready(y); y:=y+50; write(y);. The restriction such that the sum of x and y should always be a constant will come under which property?
a. Atomicity
b. Consistency
c. Isolation
d. Durability

Ans: b


10. In an unordered list of numbers find the complexity of an algorithm to search for an element which is neither maximum nor minimum.
a.
Θ(n logn) 

b. Θ( n)
c.
Θ(log n)
d.
Θ(1)

Ans: d 

We only need to consider any 3 elements and compare them. So the number of comparisons is constants, that makes time complexity as Θ(1)

Let us take an array {10, 20, 15, 7, 90}. Output can be 10 or 15 or 20
Pick any three elements from given liar. Let the three elements be 10, 20 and 7.
Using 3 comparisons, we can find that the middle element is 10



11. Consider the statements:
S1: If a candidate is corrupted, he will not be elected.
S2: If a candidate is kind, he will be elected.
Which of the conclusions is TRUE?


a. If a candidate is corrupted he will be kind.
b. If a candidate is not corrupted he is not kind.
c. If a candidate is kind, he is not corrupted.
d. If a candidate is not kind he is not corrupted.

Ans : c

12. Find the largest Eigen value for the matrix
 [4 5
 2 1]

Ans: (4-x)(1-x)-5*2=0

x^2-5x-6=0

Possible value of x are 3,-2,6, and -1.

Thus  Maximum value is 6

13. Which among the following should not be discussed in SRS?
a. User Interface issues.
b. Non functional requirements.
c. Design specifications.
d. Interface with third party software.

Ans : c
14. A system has 6 resources and N processes . Each process can demand for 2 resources n maximum. For what value of n deadlock will definitely occur?
a. 1
b. 2
c. 3
d. 4

Ans: Wrong question

15. Which of the following statements are true about Abstract Syntax Tree(AST) and Control Flow graph(CFG)?
a. If N2 is a successor of N1 in AST and CFG the code implementing N2 will always be after the code implementing N1.
b. Neither AST nor CFG will carry a cycle.
c. The maximum number of successors in AST and CFG depends on input program.
d. In AST and CFG each node represents one  statement in code.

Ans: c

16. If left and right subtrees of a tree are max heaps, then find the time complexity to convert the tree into heap?
a.
Ω(logn)
b.
Ω(n)
c.
Ω(nlogn)
d.
Ω(n^2)

Ans: a

17.  A link has a transmission speed of 10^6 bits/sec. It uses data packets of size 1000 bytes each. Assume that the acknowledgment has negligible transmission delay, and that its propagation delay is the same as the data propagation delay. Also assume that the processing delays at nodes are negligible. The efficiency of the stop-and-wait protocol in this setup is exactly 25%. The value of the one-way propagation delay (in milliseconds) is :

Ans: 12

18. Consider two decision problems Q1, Q2 such that Q1 reduces in polynomial time to 3-SAT and 3-SAT reduces in polynomial time to Q2. Then which one of the following is consistent with the above statement?
(A) Q1 is in NP, Q2 is NP hard.

 (B) Q2 is in NP, Q1 is NP hard.

 (C) Both Q1 and Q2 are in NP

 (D) Both Q1 and Q2 are NP hard. 

Ans: a

19. Consider the function:
int f(n)
{
int x=1,k;
           if(n==1)
         return x;
for(k=1;k<n;k++)
    x=x+f(k)*f(n-k);
return x;
}

What will be the return value for f(5)?

f(1) = 1

f(2)= 1+ 1*1 =2

f(3)=1+1*2=3 ;

       3+2*1=5

f(4)= 1+1*5=6

         6+2*2=10

         10+5*1=15

f(5)= 1+1*15=16

         16+2*5=26

         26+5*2=36

         36+15*1=51 

Ans: 51

 

20.Equation to find duration for software development using COCOMO Model where a,b,c,d
are usual constants:

a. E=a(KLOC)exp(b) D=c(E)exp(d)
b. E=a(KLOC)exp(b) D=c(KLOC)exp(d)
c. E=a exp(b) D=c exp(d)
d. E=c exp(d) D=a exp(b)

Ans:a


21. Find the cardinality of power set of {0 , 1 , 2 , ...., 10}

Ans: Cardinality= 2^(number of elements) =2^11=2048

22. A graph is self complementary if it is isomorphic to its complementary graph. For a self complementary graph of n vertices which of the following is correct?
a. n is a multiple of 4
b. n is odd
c. n is even
d. n is congruent to 0 mod 4 or 1 mod 4

Ans : d


23. Which of the following is correct?
a.  Code inspection is done after unit testing is completed.
b. Code walk through and Code inspection are synonymous.
c. Coding standards are evaluated during code inspection
d. Code walk through is done by an independent team.

Ans: a. 

Unit testing should be done before Code inspection. 

Code inspection and code walk through have many differences. For example,  Code inspection is formal, initiated by project team and planned one while walk through is informal, initiated by the author and unplanned.

Code Inspection is done to find and fix mistakes

Code walk throgh is done by the author only


24 Consider a simple check-pointing protocol and the following set of operations in the log. 


(start, T4); (write, T4, y, 2, 3); (start, T1); (commit, T4); (write, T1, z, 5, 7);

 (checkpoint);

 (start, T2); (write, T2, x, 1, 9); (commit, T2); (start, T3), (write, T3, z, 7, 2); 


If a crash happens now and the system tries to recover using both undo and redo operations, what are the contents of the undo list and the redo list?


(A) Undo: T3, T1; Redo: T2 

(B) Undo: T3, T1; Redo: T2, T4 

(C) Undo: none; Redo: T2, T4, T3, T1 

(D) Undo: T3, T1, T4; Redo: T2 


Ans: A

In recovery stage, we need not  take care of transactions committed before checkpoint. 

T2 is committed after checkpoint. Thus redo it.

T1 and T3 are not committed after checkpoint. Thus abort them by undoing


25. If there are ten buckets numbered from 0 to 9 and input values can be in between 0 and 2020, which of the following function can fairly distribute values among buckets?
a. h(i)= i^2 mod 10
b. h(i) = i^3 mod 10
c. h(i) = 11. i^2 mod 10
d. h(i)= 12. i^2 mod 10

Ans: B


26. A grammar is given as :
X0=1X1
X1:= 0X1+ 1X1
X2 := 0X1+
λ

Which of the following regular expressions can correctly represent the grammar?
a. 10(0*+ (10)*)1
b. 10(0*1(10)*)*1
c. 1 (0+10)*1
d. 10(0+10)*1 + 110(0+10)*1

Ans: C

27. Host A sends a UDP datagram containing 8880 bytes of user data to host B over an Ethernet LAN. Ethernet frames may carry data up to 1500 bytes (i.e. MTU1500 bytes). Size of UDP header is 8 bytes and size of IP header is 20 bytes. There is no option field in 111 header. How many total number of IP fragments will be transmitted and what will be the contents of offset field in the last fragment?

 (A) 6 and 925

 (B) 6 and 7400

 (C) 7 and 1110
(D) 7 and 8880

Ans: C


28. If a connection has speed of 104560 bits per second and works in TCP connection. If '
α' is the RTT before TCP scaling and 'β'  is the window size after TCP scaling then value of α and β will be:
a. 63 ms ,  65535 x 2^14
b. 63 ms ,  65535 x 2^16
c. 500 ms ,  65535 x 2^14
d. 500 ms ,  65535 x 2^16

Ans: C

29. The edge which causes graph disconnected on deleting it is called bridge. Which of the following is true about bridge?
a. There will be no bridge in a tree.
b. Bridge can never be a part of a simple cycle.
c. Every edge in  a clique having more than 3 nodes is a bridge.
d. If a graph has bridge there will be no cycle in it.

Ans: B

30. A system has memory segments of size 200, 400, 600, 500, 300 and 250
respectively. If the processes of size 357, 210, 468, and 491 are allocated in segments using best fit algorithm, what segments will be left unused?
a. 200 & 300
b. 250 & 300
c. 200 & 400
d. 200 & 250

Ans : A

 
31. Two operations are performed on given matrix

3    4    45
7    9    105
13    2    195

I . Add third row to second row
II . Subtract third column from first column
then Determinant is:

(I) 

3         4       45

20       11     300
 

13        2       195


(II)

3       4    42

20    11    280

13    2     182

 

Do the row transform as C3--> C3/14

3    4    3

20  11  20

13  2   13

As C1=C3  Determinant =0


32. Consider a processor with byte-addressable memory. Assume that all registers, including Program Counter (PC) and Program Status Word (PSW), are of size 2 bytes. A stack in the main memory is implemented from memory location (0100)16 and it grows upward. The stack pointer (SP) points to the top element of the stack. The current value of SP is (016E) 16. The CALL instruction is of two words, the first word is the op-code and the second word is the starting address of the subroutine (one word = 2 bytes). The CALL instruction is implemented as follows:
• Store the current value of PC in the stack 

• Store the value of PSW register in the stack

 • Load the starting address of the subroutine m PC 


The content of PC just before the fetch of a CALL instruction is (5FAO) 16. After execution of the CALL instruction, the value of the stack pointer is

 (A) (016A) 16 (B) (016C)16 (C) (0170)16 (D) (0172)16 

Current value of SP: 016E

PC (2 bytes) will be stored in: 016F and 0170

PSW(2bytes) will be stored in: 0171 and 0172

So after execution of CALL instruction the value of stack pointer is 0172

33.Given two relations: R1(A,B)= {(1,5), (3,7)} and R2(A, C) = {(1 , 7),(4,9)}. R is a relation obtained the doing FULL NATURAL OUTER JOIN between R1 and R2. Find the tuples that cannot be a member of R

 a = (1,5,NULL) b = (1,5,9) c = (1,3,7) d = (4,3,9) e = (1,5,7) f= (3,7,NULL) g = (4,NULL,9)

a. a,b,c,d,e not f,g

b. a,b,c,d,e,f,g
c. e,f,g not a,b
d. e

Full natiral outer join of R1 and R2::(1,5,7), (3,7,NULL), (4,NULL,9)

Ans: c

34. Find the minimal number of gates required to implement the function
[D' +AB' +A'C + AC'D +A'C'D]'

Ans: 1

35. Find the minimum number of states in DFA required to represent the regular expression (0+1)*10

Minimal no of states=3 

36 )A  computer system implements 8 kilobyte pages and a 32-bit physical address space. Each page table entry contains a valid bit, a dirty bit, three permission bits, and the translation. If the maximum size of the page table of a process is 24 megabytes, the length of the virtual address supported by the system is bits. 

 Ans: 36

37. The number of onto functions (surjective functions) from set X = {1, 2, 3, 4} to set
Y = {a, b, c} is

A function f from X to Y is surjective if every element y in Y has a corresponding element x in X such that f(x) = y. 


.In given problem  n = 4 and m = 3.

Count the number of partitions of A into m blocks.

The no of partitions of elements 1, 2,3 and 4 of X into 3 blocks is Stirling value S{4,3}=6

 Each partition the first block can map to any of the m elements of Y, Total number of mappings will be m!=3!=6

Total number of onto functions= S{n,m}*m!=S{4,3}*3!=6*6=36

38. All possible functions are made between set having 2 and 20 distinct elements respectively. Find the probability of selecting an one to one function:

 

39. Four branches of a company are located at M,N,O and P.  M is north of N at a distance of 4 Km, N is 1 km south east to O, and P is 2 km south to O. what is distance between M to P ? 

a. 5.34

b. 6.74

c. 28.5

d. 45.49 

Ans: a

  40. Which of following statements can be used to find the total weight of 10 poles using following statements. 

S1: 1/4th weight of one pole is 5
S2: The total weight of these poles is 160 kg more than the total weight of two poles

 a. S1 alone

b. S2 alone

c. either S1 or S2

d. Neither S1 nor S2

Ans C

S1: Total weight= 5/0.25 *10 =200

S2: Total weight=160/8*10 =200

41.Consider a function f(x) = 1 – |x| on –1 ≤ x ≤1. The value of x at which the function
attains a maximum and the maximum value of the function are:
(a) 0, –1 

(b) –1, 0

(c) 0, 1

(d) –1, 2 

Ans c

42. Let f(x) = x^–(1/3) and A denote the area of the region bounded by f(x) and the X-axis,
when x varies from –1 to 1. Which of the following statements is/are True?


1. f is continuous in [–1, 1]

 2. f is not bounded in [–1, 1]

3. A is nonzero and finite


(a) 2 only

 (b) 3 only
(c) 2 and 3 only 

(d) 1, 2 and 3

 

The graph for given function is plotted as above.

f is not defined for x<0. Hence it is not continuous in [-1,1]

f is not bounded in [-1,1]

A is nonzero and finite

hence c is answer

43. Consider the three languages given:

L1 :  {wxwR| where w R is reversal of w}

L2: {a^m b^n | m≠n where m,n >0}

L3: {a^p  b^q  c^r | where p,q,r >0}

Which of these is/are regular?

a. L1
b. L3
c. L1 & L3
d. L1 , L2 & L3

44. Which one of the following underline word is correct with reference to sentence
a) Industrialist owns a personnel jet.
b) I daily write my personnel diary.
c) All personnel are given day off.
d) Being religious is a personnel aspect.

Ans c: personnel means "people employed in an organization"

  45. Which one of the following word is related to clothes like pair of jeans,shirt,etc

a) fabric
b) textile
c) fiber
d) apparel

a: fabric: cloth produced by weaving

b. textile: a type of cloth

c. Fiber: a thread from which cloth is formed.   

d  Apparel: clothing

46. Consider the sequence of machine instructions given below::


MUL       R5, R0, R1
DIV        R6, R2, R3
ADD      R7, R5, R6
SUB       R8, R7, R4


In the above sequence, R0 to R8 are general purpose registers. In the instructions
shown, the first register stores the result of the operation performed on the second
and the third registers. This sequence of instructions is to be executed in a pipelined
instruction processor with the following 4 stages: 

(1) Instruction Fetch and Decode(IF),

 (2) Operand Fetch (OF), 

(3) Perform Operation (PO) 

(4) Write back theResult (WB). 

The IF, OF and WB stages take 1 clock cycle each for any instruction.The PO stage takes 1 clock cycle for ADD or SUB instruction, 3 clock cycles for MUL instruction and 5 clock cycles for DIV instruction. The pipelined processor uses operand forwarding from the PO stage to the OF stage. The number of clock cycles taken for the execution of the above sequence of instructions is ___________

Cycle no          Operations

========||================

1                  IF1      --         --         --

2                  IF2      OF1     --           --

3,4,5            IF3      OF2     PO1     --

6,7,8,9,10   IF4       OF3    PO2     WB1

11                --          OF4     PO3     WB2

12               --          ---         PO4      WB3

13              --           --            --          WB4

Ans: 13

47. Fill the blanks
we _________ our friend's birthday and we ________ how to make up
a) completely forgot, don't just know
b) forgot completely, don't just know
c) completely forgot, just don't know
d) forgot completely, just don't know

Ans c

48. Calculate distance between S and P
M is 4km north of N
P is 2 km south of O
N is 1km south East of O
a) 5.34
b) 4
c) 28.5
d)6.something

47. If p,q,r,s,t is the arithmetic sequence then which of the following is also an arithmetic sequence
I 2p,2q,2r,2s,2t
II p^2,q^2,r^2,s^2,t^2
III p-3,q-3,r-3,s-3,t-3
a) I & II
b) I & III
c) I only
d) III only

Ans b)

48. In a function integer i,j,k,l
f(i,j,k,l)=max(i,j,k,l)
g(i,j,k,l)=Min(i,j,k,l)
h(i,j,k,l)= remainder of (i*j/k*l) if i*j>k*l or  (k*l/i*j) if k*l>i*j

Also a function fgh(i,j,k,l)=f(i,j,k,l) x g(i,j,k,l) x h(i,j,k,l)
compute the value of fg(h(2,5,3,7),4,6,8)

Ans:

fg(h(2,5,3,7),4,6,8)=fg(1,4,6,8)= f(1,4,6,8) * (g(1,4,6,8) =8x1=8

49.The secant method is used to find the root of an equation f(x) = 0. It is started from
two distinct estimates xa and xb for the root. It is an iterative procedure involving
linear interpolation to a root. The iteration stops if f(xb) is very small and then xb
is the solution. The procedure is given below. Observe that there is an expression
which is missing and is marked by? Which is the suitable expression that is to be
put in place of? So that it follows all steps of the secant method?


Secant
Initialize: xa, xb, ε, N // ε = convergence indicator
fb= f(xb)
i = 0
while (i < N and | fb | > ε) do
i = i + 1 // update counter
xt= ? // missing expression for
// intermediate value
xa= xb// reset xa
xb= xt// reset xb
fb= f(xb) // function value at new xb
end while
if |fb| > εthen // loop is terminated with i = N
write “Non-convergence”
else
write “return xb”
end if


(a) xb– (fb– f(xa)) fb/ (xb– xa)

 (b) xa– (fa– f(xa)) fa/ (xb– xa)
(c) xb– (fb– xa) fb / (xb – fb(xa)

 (d) xa– (xb– xa) fa/ (fb– f (xa))

50.For a given B+ tree of order 1 ,minimum number of nodes to be fetched for a given query
"X greater than or equal to 5 and less than 15"

51. Consider a typical disk that rotates at 15000 rotations per minute (RPM) and has a transfer rate of 50x 10^6 bytes/sec. If the average seek time of the disk is twice the average rotational delay and the controller's transfer time is 10 times the disk transfer time, the average time (in milliseconds) to read or write a 512-byte sector of the disk is  :

Ans : 6.1

52. The minimum number of JK flipflops required to construct a synchronous  counter with the counting sequence (0,0,1,1,2,2,3,3,0,0,......) is:

Ans : 2

53. Out of the following four sentences, select the most suitable sentence with respect to grammar and usage:

a. Since the report lacked needed information, it was of no use to them.

b. The report was useless to them because there were no needed information in it.

c.Since the report did not contain the needed information , it was not real useful to them.

d. Since the report lacked needed information, it would not have been useful to them.

Ans : a

54 

 

 

 

 

 

 

Ans b

55)  . A computer system implements a 40-bit virtual address, page size of 8 kilobytes, and a 128-entry translation look-aside buffer (TLB) organized into 32 sets each having four ways. Assume that the TLB tag does not store any process id. The minimum length of the TLB tag in bits is_________:

 

 Size of a page = 8KB = 2^13
Total number of bits needed to address a page frame = 40 – 13 =  27


If there are ‘n’ cache lines in a set, the cache placement is called n-way set associative. Since T.L.B is 4 way set associative and can hold total 128  page table entries, number of sets in cache = 2^7/4 = 2^5. 

So 5 bits are consumed to address a set.

Hence number of bits needed for tag= 27 -5 =22

56) Consider the following statements. 


I. The complement of every Turing decidable language is Turing decidable 

II.There exists some language which is in NP but is not Turing decidable 

III. If L is a language in NP, L is Turing decidable 


Which of the above statements is/are true? 


(A) Only II

(B) Only I

(C) Only I and II 

(D) Only I and III

  Ans: D

57 With reference to the B+ tree index of order 1 shown below the minimum number of nodes , including root node, that must be fetched in order to satisfy the following query : "Get all records with search key greater than or equal to 7 and less than 15" is______

Ans : 5

58   Consider the following routing table at an IP router: 


Network No.                     Net Mask                      Next Hop 

128.96.170.0                    255255.254.0             Interface 0 

128.96.168 0                    255.255.254.0            Interface 1 

128.96.166.0                    255.255.254.0            R2

128.96.164.0                   255.255.252_0            R3

 0.0.0.0                                   Default                      R4 


For each IP address in Group I identify the correct choice of the next hop from Group II using the entries from the routing table above.
Group I

  A) 128.96.171.92 

  B)128.96.167.151 

C) 128.96.163.151

  D) 128.96.165.121 

Group II

  1) Interface 0

  2) Interface 1 

3)R2

  4) R3

  5) R4

A-1   B-3  C-5   D-4


59.Which of the following well formed formulae is a tautology?

  Ans C 

60.  Given below are some algorithms, and some algorithm design paradigms.
1. Dijkstra's Shortest Path 

2. Floyd-Warshall algorithm to compute pairs shortest path

 3. Binary search on a sorted array 

4. Backtracking search on a graph 

i. Divide and Conquer all

 ii. Dynamic Programming


iii. Greedy design

 iv. Depth-first search

 v. Breadth-first search

Match the above algorithms 

(A) 1-i,2-iii, 3-i, 4-v. 

(B)1-iii, 2-iii, 3-i, 4-v. 

(C) 1-iii,2-ii, 3-i, 4-iv.

 (D)1-iii, 2-ii, 3-i, 4-v. 

Ans: C

61)   A Young tableau is a 2D array of integers increasing from left to right and from top to bottom. Any unfilled entries are marked with , and hence there cannot be any entry to the right of, or below a. The following Young tableau consists of unique entries. 


1        2    5     14 

3       4     6      23 

10    12   18   25 

31   ∞    ∞   


When an element is removed from a Young tableau. other elements should be moved into its place so that the resulting table is still a Young tableau (unfilled entries may be filled in with a
). The minimum number of entries (other than 1) to be shifted, to remove 1 from the given Young tableau is :

 

After removing 1,

a. Move 2 to position (0,0) 

b. Move 3 to position (0,1)

c. Shift 4, 6 and 23 to one cell left

Minimum 5 numbers have to be shifted.

62)   A half adder is implemented with XOR and AND gates. A full adder is implemented with two half adders and one OR gate. The propagation delay of an XOR gate is twice that of an AND/OR gate. The propagation delay of an AND/OR gate is 1.2 microseconds. A 4-bit ripple-carry binary adder is implemented by using four full adders. The total propagation time of this 4-bit binary adder in microseconds is :

Ans: 12

 

63  )  Suppose you are provided with the following function declaration in the C programming language.
int partition(int a[]), int n);
The function treats the first element of a [ ] as a pivot, and rearranges the array so that all elements less than or equal to the pivot is in the left part of the array, and all elements greater than the pivot is in the right part. In addition, it moves the pivot so that the pivot is the last element of the left part. The return value is the number of elements in the left part. The following partially given function in the C programming language is used to find the kth smallest element in an array a [ ] of size n using the partition function. We assume k <=5 .

 int kth_smallest(int a[], int n, int k)

 {

int left_end = partition(a,n);

 if ( left_end+1 == k)

{

return a[left_end]; 

}
if ( left_end+1 > k )

( return kth_smallest(  ____________ ); 

else ( return kth_smallest(___________   ); 

}


The missing argument lists are respectively
(A) (a, left_end, k) and (a+left_end+1, n-left_end-1, k-left_end-1)

 (B) (a, left_end, k) and (a, n-left_end-1, k-left_end-1) 

(C) (a+left_end+1, n-left_end-1, k-left_end-1) and (a, left_end, k) 

(D) (a, n-left end-1, k-left end-1) and (a, left end, k) 

Ans :A

64) Consider the C program below. 

#include <stdio.h>

int *A, stkTop;
int stkFunc(int opcode, int val) 

{
static int size=0, stkTop=0;

 switch (opcode)

 {

 case -1: size = val; break;

 case 0: if (stkTop < size) A[stkTop++] = val; break;

 default: if (stkTop) return A[--stkTop]; 

}
return -1;

int main()

 {
int B[20]; 

A = B;

stkTop = -1;
stkFunc (-1, 10); 

stkFunc ( 0, 5); 

stkFunc ( 0, 10);

 printf ("%d\n", stkFunc(1, 0) + stkFunc(1, 0));
}

The value printed by the above program is_______

stkFunc (-1, 10)     initialize stack size as 10. 

stkFunc ( 0, 5)and stkFunc ( 0, 10) push 5 and 10 in sequence.

stkFunc(1, 0)and stkFunc(1, 0)pop 10 and 5 in sequnce.

The sum 10+5 = 15 will be printed.

 

65) Consider the intermediate code given below.


(1) i = 1

 (2) j = 1

 (3) t1 = 5 * i 

(4) t2 = t1 + j 

(5) t3 = 4 * t2

 (6) t4 = t3

 (7) a [t4] = -1

 (8) j = j + 1

 (9) if j<=5 goto (3) 

(10) i=i+1

 (11) if 1<5 goto (2) 


The number of nodes and edges in the control-flow-graph constructed for the above code, respectively, are 


(A) 5 and 7 

(B) 6 and 7


(C) 5 and 5

 (D) 7 and 8

 

Ans: B

Do you know any question other than posted here? Feel free to comment  here.  :)



 

Monday, February 2

KERALA PSC LECTURER IN INFORMATION TECHNOLOGY (POLYTECHNICS) Questions and Solution

Hello reader,

In this post we will discuss various questions and its solution from  LECTURER IN INFORMATION TECHNOLOGY (POLYTECHNICS). 388/2013 exam held in  2015 conducted by Kerala PSC.

Hope this will be useful for you.

Here we go.!!

Question Code:  A

Maximum marks :100

Time : 1 hour 15 minutes


1. which state of India has its secretariat in WRITERS BUILDING?
a. West Bengal
b. Tamil nadu
c. Punjab
d. Bihar

2. "NOT JUST AN ACCOUNTANCY" is a service story written by:

a. Dr. Manmohan Singh
b. Dr. Thomas Issac
c. Vinod rai
d. Dr. John Mathai

3. The well known "Kuttankulam satyagraha" was held in:
a. Irinjalakuda
b. Punjab
c.Vaikom
d.Punalur


4. "Guruvinte dukham" written by:
a. MK sanu
b. Sukumar Azhikkode
c. Dr. Babu Paul
d. Ayyappa Paniker

5. The magazine Yuktivadi founded by:
a. EMS
b. Sahodaran Ayyappan
c. K Kelappan
d. AK Gopalan

6. The founder of PratyakshaRaksha Daiva Sabha was:
a. Vaikunda swamikal
b. Ayyankali
c. poykayil Appachan
d. mannathu Padmanabhan

7. BKS Ayyangar recently passed away was a great expert of:
a. Modern medicine
b. Bharatnatyam
c.Kathak
d. Yoga

8. KPAC is a drama troupe of:
a. Kannur
b. Kozhicode
c. Thrissur
d. Alappuzha

9. "kanaleriyum kaalam" is the autobiography of:
a. Kuthattukulam Mary
b. Rosamma Punnose
c. Acama Cheriyan
d. KR Gouri

10. The brand ambassador of " Clean campus, Safe Campus" programme:
a. Mammootty
b. Mohan Lal
c. Fahad Fazil
d. Manju Warrier

11. When 0< x < π/2 the sum of series
1 -cos x +cos2x -cos3x+........
a. 1+sinx
b.  √2 tan x
c. 1/2 sec2 x/2
d. sec x /√2

12. The angle between the lines x - y= 2 and x+y=1 is
a. π/2
b. 0
c. π/4
d. π

13. Let A , B two n x n orthogonal matrices then which of the following is true:
a. AB is orthogonal
b. AB is symmetric
c. AB is triangular
d. AB is singular

14. The greatest rectangular area that can be enclosed by a 20 meter fencing is:
a. 100
b. 50
c. 200
d. 25

15. The area bounded by straight lines x=0, y=0 and x+y=a is
a. a2
b. a/2
c. a2/2
d. a

16. The solution of the system of linear equation x+y=0, 2x+y+z=1 , y+z=-1 is
a. 1,-2,2
b. 1,-1,0
c. 1,2,-2
d. 1,-1,1

17. The value of (cos 15 - sin 15)2 is:
a. 1/2
b. root3/2
c. 1/root2
d. -1/2

18. The solution of differential equation (x+2y3)dy/dx =y is:
a. x2+y2/2  =c
b. x=y3+cy
c. x2/2y+2y3/3=x+c
d. x=y2(c-e-y)

19. ∫x e-x2 dx




20. If A is 2 x 2 matrix with |A|=3 then |A adjA| is:
a. 6
b. 9
c. 4
d. 12

21. the ingredient of brick earth that gives red color to bricks is:
a. Alumina
b. iron oxide
c. Magnesia
d. Silica

22. The steel which is used in RCC is:
a. Cast steel
b. Stainless steel
c. Mild steel
d. Nickel steel

23. The most economical foundation used when heavy structural loads from columns are required to be transferred to a soil of

low bearing capacity is:
a. Raft foundation
b. Stepped Foundation
c. Grillage foundation
d. pile foundation

24. the basic principle of surveying is:
a. Working from whole to the part
b. working from art to the whole
c. Both A and B
d. Reconnaissance

25. the backsight of a BM of RL 150.205 is 1.505m. calculate the HI of the instrument:
a. 150.755
b. 150.205
c. 148.700
d. 151.710

26. The turning moment of a two stroke cycle engine is more uniform than a four stroke engine because:
a. Valve operations are required in four stroke engine , instead parts are used in two stroke engine.
b. In two stroke engine, there is one power stroke in every revolution of crank shaft
c. Both sides of the piston are effective during the operation of a two stroke engine
d. Fuel supply is more uniform in two stroke engine compared to four stroke engine

27. Higher compression ratio is employed in diesel engine compared to petrol engine because:
a. self ignition temperature of diesel fuel is higher than petrol
b. specific gravity of diesel fuel is higher than  petrol
c. hot compressed air is required to ignite the fuel injected in diesel engine
d. residual gas can be reduced at higher compression ratio


28. the function of propeller shaft in an automobile is:
a. to transmit power from gear box to the differential
b. to transmit power from engine to gear box
c. to vary power from minimum to maximum
d. to actuate steering gear mechanism

29. The function of a surge tank in a hydro electric power plant is:
a. to control level of water in  reservoir
b. to increase the power output from turbine
c. to store excess water from reservoir
d. to control the pressure fluctuation in pen stock pipe.

30. Control rod is used in nuclear power plant in order to:
a. control the pressure of coolant
b. control flow rate of coolant
c. control nuclear chain reaction
d. slow down the fast moving neutrons in reactor

31. The condition with which the Ohm's law is valid when:
a. Voltage is directly proportional to current
b. Voltage is inversely proportional to current
c. Current is proportional o resistance
d. Temperature remains constant

32. lenz's law is used to determine the direction of:
a. Dynamically induced emf
b. statically induced emf
c. magnetic field
d. mutually induced emf

33. Two resistors of 10 ohm and 20 ohm are connected in parallel. if the current in 10 ohm resistor is 2A , what is the current in other resistor?
a. 1 A
b. 3 A
c. 2 A
d. 4 A

34. The main function of earth Leakage Circuit breaker (ELCB) is to protect the circuit against:
a. over current
b. under voltage
c. lightning
d. earth leakage current

35. The voltage across an RLC series ac circuit is 10V. What will be the voltage across the capacitor if the voltage across the

resistance is 8V and inductor is 12V?
a. 8V
b. 18V
c. 5V
d. 12V

36. the ripple factor of a full bridge rectifier without any filter connected to it is:
a. 1.11
b. 0.482
c. 1.00
d. 1.21

37. An LED, 1K ohm resistor and a 5V dc source is connected in series.assume the voltage measured across the LED is 2V. the current flow through the LED is:
a. 1mA
b. 10 mA
c. 2 mA
d. 3 mA

38. A microprocessor is classified into 8 bit microprocessor based on its:
a. Data bus width
b. Address bus width
c. ALU width
d. Control bus width

39. The output voltage of a voltage source pulse width modulated inverter depends on:
a. DC battery voltage
b. DC battery voltage and modulation index
c. Output frequency
d. modulation index

40. A Bipolar Junction Transistor is used to drive an SPDT relay. When the relay is energized, the transistor will be operating in

_____ region?
a. Saturation
b. cut off
c. Active
d. Cut off and saturation

41. Which of the following Access control method is probabilistic?
a. Polling
b. Contention
c. Token passing
d. Sliding window

42. one of the addresses in a block 167.199.82.27. What is the last address in this block?
a. 167.199.170.95
b. 167.199.170.96
c. 167.199.170.255
d. 167.199.170.224

43. A network layer firewall works as a :
a. Frame filter
b. packet filter
c. both A  and B
d. none

44. A logic circuit that provides a HIGH output for both inputs HIGH or both inputs LOW:
a. ExOR
b. ExNOR
c. OR
d. NOR

45. When referring to instruction words, a mnemonic is?
a. Shorthand for machine language
b. A short abbreviation for data word stored at operand address
c. A short abbreviation for opearnd address
d. A short abbreviation for operation to be performed

46. Dijkstra's Banking Algorithm in an operating system solves the problem of:
a. Deadlock avoidance
b.  deadlock recovery
c. Mutual Exclusion
d. Context switching

47. Gray code equivalent of (1000)2 is:
a. 1111
b. 1100
c. 1000
d. None

48. Which operator is used by java run time implementations to free the memory of an object when it is no longer needed?
a. Delete
b.  Free
c. New
d. None

49. In which ARQ when a NAK is received all frames sent since the last frame acknowledged are retransmitted?
a. Stop and wait
b. Go back N
c. Selective reject
d. Both A and B

50. A Noiseless 3kHz channel transmits bits with binary level signals. What is the maximum data rate?
a.  3 kbps
b. 6 kbps
c. 12 kbps
d. 24 kbps

51. When an instruction is read from memory it is called?
a. Memory read cycle
b. Fetch cycle
c.Instruction cycle
d. memory write cycle

52. An HTML form is to be designed to enable purchases of office stationery. required  items are to be selected . credit card

details are to be entered and then the submit button is to be pressed. Which of the following options would be appropriate for

sending the data to the server?
a. GET
b .POST
c. Either GET or POST
d. Neither GET nor POST

53. Consider different activities related to email:
m1: send an email from a  mail client to a mail server
m2: Download an email from mailbox to a mail client
m3: Checking email from a web browser
which is the application level protocol used in each activity?

a.  m1: HTTP     m2: SMTP        m3:POP
b .m1:SMTP    m2:FTP        m3:HTTP
c. m1:SMTP    m2:POP        m3:HTTP
d. m1:POP        m2:SMTP        m3:IMAP

54. In an IP packet, the value of HLEN is 15 and the value of total length field is 0028. how many bytes of data are being

carried by this packet?
a. 8
b .40
c. 64
d. 20

55. In asymmetric key cryptography the private key is kept by:
a. sender
b .receiver
c. sender and receiver
d. all connected devices to the network

56. DES encrypts data in block size of______ bits each
a. 64
b .128
c. 32
d. 56

57. Which is true for a typical RISC architecture?
a.  Microprogrammed control unit
b . Instruction takes multiple clock cycles
c. Have few registers in CPU
d. Emphasis on optimizing instruction pipelines

58. A top to bottom relationship among the items in a database is established by:
a.  Hierarchical schema
b .Network schema
c. Relational schema
d. All of above

59. In a GSM system BTS and BSC together form:
a.  Network substation
b .Base station subsystem
c. maintenance subsystem
d. Operational subsystem

60. Mobile phone in roaming is registered in:
a.  Visitors Location Registry of another MSC
b.  Visitors Location registry of same MSC
c.  Home location registry of another MSC
d.  Home Location registry of same MSC


61. In a Piconet , there can be upto ----------- parked nodes in the net
a.  63
b.  127
c.  255
d.  511

62. Minimum number of NAND gates required to implement a ExOR function is:
a.  2
b.  3
c.  4
d.  5

63. A circuit in which connections to both AND and OR arrays can be programmed is called?
a.  RAM
b.  ROM
c.  PAL
d. PLA

64. Consider the schema R=(S  T  U  V) and the dependencies :
S --> T
T --> U
U -->V
V-->S
If R=(R1 and R2) be a decomposition such that R1 ^ R2= null then decomposition is :
a.  Not in 2NF
b.  In 2NF but not in 3NF
c.  in 3NF but not in 2NF
d. in both 2NF and 3NF

65. A flipflop is a:
a.  Combinational circuit
b.  Memory element
c.  Arithmetic element
d.  Memory or arithmetic

66. Which of the following true:
a.  Every relation in 3NF is also in BCNF
b.   relation R is in 3NF ife very non prime attribute of R is fully functionally dependent of every key of R
c.  Every relation in BCNF is also in 3NF
d.  No relation can be both in BCNF and 3NF

67. Offset value of code segment :
a.  Base pointer
b.  Stack pointer
c.  instruction pointer
d.  None

68. A JK flip flop can be implemented using D flip flop connected such that
a.  D= JQ'+ K'Q
b. D=J'Q+ KQ'
c.  D=J'Q'+KQ
d.  D=JQ'+KQ'


69. In a software project, COCOMO is used to estimate:
a.  Effort and duration based on the size of software
b.  Size and duration based on effort of software
c.  Effort and cost based on duration of software
d.  Size , Effort and duration based on cost of software

70. Arithmetic shift left operation:
a.  Produces the same result as obtained with logical shift left operation
b.  Causes sign bit to remain always unchanged
c.  Needs additional hardware to preserve sign bit
d.  is not applicable for signed 2's complement representation


71. Segment number defines:
a.  Distance from the beginning to a particular location in a segment
b.  The ending of segment within the memory space
c.  The starting of segment within the memory space
d.  None of above


72. How can you create a node for comment in javascript?
a.  comment()
b.  createcomment()
c.  comm()
d.  none

73. Which microprocessor pins are used to request and acknowledge a DMA transfer?
a.  reset and ready
b.  ready and wait
c.  HOLD and HLDA
d.  None of the above

74. Consider the following java program segment:
try{
int x=0;
int y=5/x;
}
catch(Exception e)
{
system.out.println("Exception");
}
catch(ArithmetcException ae)
{
System.out.println("Arithmetic exception);
}
System.out.println("Finished");
What will be the output of code segment?
a.  Finished
b.  Exception
c.  Compilation fails
d.  Arithmetic exception


75. Which activity does not take place during execution cycle?
a.  ALU performs the arithmetic and logical operation
b.  Effective address is calculated
c.  Next instruction is fetched
d.  Branch address is calculated and branching conditions are checked

76. SD RAM refers to:
a.  Synchronous RAM
b.  Static RAM
c.  Semi RAM
d.  Second RAM

77. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then:
a.   Deadlock can never occur
b.  Deadlock may occur
c.  Deadlock has to occur
d.  None of the above

78. cache memory works on the principle of:
a.  Locality of data
b.  Locality of reference
c.  Locality of memory
d.  Locality of reference and memory

79. Consider a logical address space of 8 pages of 104 words mapped into memory of 32 frames. how many bits are there in

logical address?
a.  9
b.  11
c.  13
d.  15

80. in a virtual memory system, the addresses used by the programmer belongs to:
a.  memory space
b.  physical address
c.  address space
d.  main memory address

81. What will be the output of the following PHP code
<?php
$a=5;
$b=5;
echo($a===$b);
?>
a.  5===5
b.  error
c.  1
d.  false

82. Determine the number of page faults when references to pages occur in the following orddr: 1,2,4,5,2,1,2,4. Assume that

main memory can accommodate 3 pages and the main memory already has pages 1 and 2 with page 1 having brought earlier than page 2. (LRU algorithm is used).
a. 3
b. 5
c. 4
d. None of above

83. Which of the following is FALSE?
a. Segmentation suffers from external fragmentation
b. Paging suffers from internal fragmentation
c. Segmented memory can be paged
d. Virtual memory is used only in multi user systems

84. Ready pin of a microprocessor is used:
a. To indicate that microprocessor is ready to receive inputs
b. To indicate that microprocessor is ready to receive outputs.
c. To provide direct memory access
d. To introduce wait states

85. An operating system uses shortest remaining time first (SRT) process scheduling algorithm. Consider the arrival times and

execution times for the following processes:
Process        Execution time        Arrival Time
P1        20            0
P2        25            15
P3        10            30
P4        15            45
What is the total waiting time for P2?
a. 5
b. 15
c. 40
d. 55

86. Let R(a,b,c) and S(d,e,f) be two relations in wich d is the foreign key of S that refers to the primary key of R. Consider the

following four operations R and S:
I. Insert into R
II. Insert to S
III. Delete from R
IV. Delete from S

Which of the following can cause violation of referntial integrity constraint above?
a. Bith I and IV
b. Both II and III
c. All of above
d. None of above

87. Given a class named student , which of the following is a valid constructor declaration for the class?
a. Student(student s) {}
b. Student student(){}
c. Private final student(){}
d. void student(){}

88. A binary tree T has n leaf nodes. the number of nodes of degree 2 in T is:
a. logn
b. 2n
c. n
d. 2^n


89. Following sequence of operations is performed on a stack push(1), push(2), pop(),push(1),push(2),pop(),pop(),pop(),push

(2),pop(). The sequence of popped out values are:
a. 2,2,1,1,2
b. 2,2,1,2,2
c. 2,1,2,2,1
d. 2,1,2,2,2

90. What can be said about the array represenation of a circular queue when it contains only one element?
a. FRONT=REAR+1
b. FRONT=REAR-1
c. FRONT=REAR=null
d. None of above


91. In the spiral model of software development the primry determinant in selecting activities in each iteartion is:
a. Iteration size
b. Cost
c. Adopted process such as relational unified process or extreme programming
d. risk


92. A software organization as been assessed at SEICMM level 4. Which of the following does the organization need to practice

beside proces change management anf technology change management in order to acheieve level 5?
a. Defect detection
b. Defect prevention
c. Defect isolation
d. Defect propagation


93. The extent to which a software can control to operate correctly despite the introduction of invalid input is called as:
a. Reliability
b. Robustness
c. Fault tolerance
d. Probability

94. Consider the following code segment  in JAVA:
class X implements Runnable
{
public static void main(String args[])
{
/*Missing code*/
}
public void run()
{
}
}

Which of the following line of code is suitable to start a thread?
a. Thread t= nw Thread(X);
b. Thread t=new Thread(X); t.start();
c. X run=new X(); Thread t=new Thread(run); t.start();
d. Thread t=new Thread(); x.run();

95. Consider the following tree:


                   (1)
       
    (2)                           (3)
(4)        (5)            (6)        (7)



If the post order traversl gives ab-cd*+ then the label of nodes 1,2,...7 wll be?
a.                + , -, * , a, b , c , d
b.                 a , - , b , + ,c ,* , d
c.                a , b , c , d , - , * , +
d.                 - , a , b ,+ , * , c , d


96. The SQL expression
Select distinct T.branchName from branch T,branch S where T.assets>S.assets and S.branchCity = "COCHIN"
Finds the names of:
a. All branches that have greater assets than some branch located in cochin
b. All branches that have greater assets than all branches located in cochin
c. The branch that has greatest asset in COCHIN
d. Any branch that have greater assets than any branch located in cochin


97. Relationship produced from an ER model will always be in:
a. 1NF
b. 2NF
c. 3NF
d. BCNF

98. Which syntax is used to describe elemnts in CSS?
a. Protectors
b. Selectors
c. Both A and B
d. None of above

99. Which object is the main entry point to all client side javascript features and APIs?
a. Standard
b. Location
c. Window
d. Position

100. The let keyword in java script can be used in:
a. in a for or for/in loop as substitute for var
b. as a block statement to define new variables
c. to define variables that are scoped to single expression
d. All the mentioned



Solution:

Thursday, January 22

C code implementing a simple DFA



Hello freinds, 

Here I am posting my C implementation of DFA shown below. This DFA will accept any string containing 'a's and 'b' and last symbol should be 'a'.


#include <stdio.h>

#define TOTAL_STATES 2
#define FINAL_STATES 1
#define ALPHABET_CHARCTERS 2

#define UNKNOWN_SYMBOL_ERR 0
#define NOT_REACHED_FINAL_STATE 1
#define REACHED_FINAL_STATE 2


enum DFA_STATES{q0,q1};
enum input{a,b};
int Accepted_states[FINAL_STATES]={q1};
char alphabet[ALPHABET_CHARCTERS]={'a','b'};
int Transition_Table[TOTAL_STATES][ALPHABET_CHARCTERS];

int Current_state=q0;
void DefineDFA()
{

    Transition_Table[q0][a] = q1;
    Transition_Table[q0][b] = q0;
    Transition_Table[q1][a] = q1;
    Transition_Table[q1][b] = q0;
}

int DFA(char current_symbol)
{
int i,pos;
    for(pos=0;pos<ALPHABET_CHARCTERS; pos++)
        if(current_symbol==alphabet[pos])   
            break;//stops if any character other than a or b
    if(pos==ALPHABET_CHARCTERS)
         return UNKNOWN_SYMBOL_ERR;
    for(i=0;i<FINAL_STATES;i++)
 if((Current_state=Transition_Table[Current_state][pos])
==Accepted_states[i])
            return REACHED_FINAL_STATE;
    return NOT_REACHED_FINAL_STATE;

}


int main(void)
{

    char current_symbol;
    int result;
 
    DefineDFA();    //Fill transition table
 
    printf("Enter a string with 'a' s and 'b's:\n
                Press Enter Key to stop\n");
 
 
    while((current_symbol=getchar())!= '\n')
        if((result= DFA(current_symbol))==UNKNOWN_SYMBOL_ERR)
            break;
    switch (result) {
    case UNKNOWN_SYMBOL_ERR:printf("Unknown Symbol %c",
  current_symbol); 
 break;
    case NOT_REACHED_FINAL_STATE:printf("Not accepted"); break;
    case REACHED_FINAL_STATE:printf("Accepted");break;
    default: printf("Unknown Error");
    }

    printf("\n\n\n");

    return 0;
}


Sunday, January 11

INTERNET SECURITY : Networking Lecture Notes

TOPIC: INTERNET SECURITY



What is IPSec?
IPSecurity (IPSec) is a collection of protocols designed to provide security at the network layer.

Transport mode:  The IPSec header and trailer are added to the information  corning from the transport layer. The IP header is added later.

Tunnel mode: It takes an IP packet, including the header, applies IPSec security methods to the entire packet, and then adds a new IP header .


What are the protocols associated with IPSec?

Authentication Header (AH): provides source authentication and data integrity. The protocol uses a hash function and a symmetric key to create a message digest;


Encapsulating Security Payload (ESP) :source authentication ,data integrity and privacy


What are the reserved Addresses for private networks?
Prefix Range Total
10/8 10.0.0.0 to 10.255.255.255 2^24
172.16/12 172.16.0.0 to 172.31.255.255 2^20
192.168/16 192.168.0.0 to 192.168.255.255 2^16

What is Virtual private Network?

Virtual private network (VPN) is a technology that is  used by large organizations that use the global Internet for both intra- and inter organization communication, but require privacy in their internal communications.

VPN technology uses IPSec in the tunnel mode to provide authentication, integrity, and privacy.
All messages for internal communication will travel through Internet after encapsulated inside another packet using IPSec Tunneling.

The public network (Internet) is responsible for carrying the packet from Source side router  to destination side router. Outsiders cannot decipher the contents of the packet or the
source and destination addresses. Deciphering takes place at destination router, which finds the destination address of the packet and delivers it.

Explain Secure Socket layer (SSL)?

Secure Socket Layer (SSL) is designed to provide security and compression to data generated from the application layer.

1. SSL divides the data into blocks of 214 bytes or less.
2. Each fragment of data is compressed by using one of the lossless compression methods
3. To preserve the integrity of data, SSL uses a keyed-hash function to create a MAC.
4. To provide confidentiality, the original data is encrypted using symmetric key
5. A header is added to the encrypted payload. The payload is then passed to a reliable transport layer protocol.

Transport Layer Security (TLS) is the IETF standard version of SSL.

What is the use of Pretty Good Privacy (PGP)?
 PGP is designed to create authenticated and confidential e-mails.

What is Firewall?

A firewall is a device (usually a router) installed between the internal network of an organization and the rest of the Internet. It is designed to filter some packets.

Packet Filter: It can forward or block packets based on the IP addresses , Transport layer protocol or port addresses. It uses a filtering table to decide which packets must be discarded (not forwarded).

Proxy firewall: The server opens the packet at the application level and finds out if the request is legitimate.