Sunday 25 December 2016

DBMS

DBMS



In DBMS, there could be a question on different steps in normalization and what is achieved at the end of every step in it.You need to be knowing the following things very clearly and without any ambiguity.The question would be based on these terms.

A table is in 1NF if there and no duplicate rows in the table. Each cell is single-valued.

A table is in 2NF if it is in 1NF and if all non-key attributes are dependent on all of the key. A table is in 2NF if it is in 1NF and if it has no partial dependencies

A table is in 3NF if it is in 2NF and if it has no transitive dependencies

A table is in BCNF if it is in 3NF and if every determinant is a candiate key.

A table is in 4NF if it is in BCNF and it it has no multi-valued dependencies.

A table is in 5NF if it is in 4NF and it has no join dependency.

Superkey,Candidate key,Primary key

A superkey is any set of attributes such that the values of the attributes(taken together)uniquely identify one entity in the entity set.

A candidate key is a minimal superkey.

A primary key is one of the candidate keys, designated by the Database designer.

INFIX EXPRESSION TO POSTFIX EXPRESSION

CONVERSION OF INFIX EXPRESSION TO POSTFIX EXPRESSION

The conventional method of representing an arithmetic expression is known as infix because the operand is placed in between the operands. If the operator is placed before the operands then this notation is called prefix or Polish notation. If the operator is placed after the operand then this notation is called postfix or reverse polish notation. So now we have three ways to represent an arithmetic expression.
Infix:   A+B

Prefix:   +AB

Postfix:   AB+


Now, let us see how to convert an infix expression to postfix expression. The rules of parenthesis and precedence would be followed in the following way. If there are parenthesis in the expression, then the portion inside the parenthesis will be converted first. After this the operations are converted according to their precedence. (* and / first, followed by + and -). If there are operators of equal precedence then the operator which is on the left is converted first. In order to understand this with an example, let us solve an example from June 2014, Paper III, Question No. 41.
JUNE 2014 - PAPER III - Q.No 41
41. The reverse polish notation equivalent to the infix expression

((A + B) * C + D) / (E + F + G)

(A) A B + C * D + E F + G + /

(B) A B + C D * + E F + G + /

(C) A B + C * D + E F G + +/

(D) A B + C * D + E + F G + /


Ans:-A
Explanation:-

First, always the expression given within parenthesis is converted first. Since there are 2 expressions with the parenthesis, I am going with the expression (E + F + G) first, although the order does not matter.

In the expression (E + F + G), there are 3 operands E,F and G and two operators, both being +. Since both the operators are the same, the expression is going to be evaluated from left to right. So E + F is considered first and converted into postfix form which is EF+. So, the expression becomes,

( ( A + B ) * C + D) / ([E F +] + G)

Any expression converted into postfix form is going to be written in square brackets.

( ( A + B ) * C + D) / [ E F + G + ]
. Here EF+ is one operand, G is another operand and + is the operator.

The next expression to be converted into postfix is ( A + B).

( [ A B + ] * C + D) / [ E F + G + ]

Now, the expression which is enclosed in parenthesis is evaluated and so, we get

( [ [ A B + ] C * ] + D) / [ E F + G + ]

[ A B + C * D + ] / [ E F + G + ]

[ A B + C * D + ] [ E F + G + ] /

So, the final postfix expression is A B + C * D + E F + G + /. This answer is available in option A. So option A is the correct answer.

PROPERTIES OF BINARY TREES

PROPERTIES OF BINARY TREES

There are some basic properties of binary trees. It is better to know all of them and how to apply.For easier understanding I am giving it in a tabular form.
1. Maximum number of nodes on any level i is 2i
2. Maximum number of nodes possible in a binary tree of height h is 2h-1
3. Minimum number of nodes possible in a binary tree of height h is equal to h
4. If a binary tree contains n nodes, then its maximum height possible is n
5. If a binary tree contains n nodes, then its minimum height possible is log2(n+1)
6. In a non empty binary tree, if n is the total number of nodes and e is the total number of edges, then e=n-1
7. In a full binary tree of height k, there are 2k-1 internal nodes
8. A strictly binary tree with n leaf nodes always has 2n - 1 nodes

JUNE 2007 - PAPER II Q.No 3


The maximum number of nodes in a binary tree of depth 10 is :
(A). 1024
(B). 210-1
(C). 1000
(D). None of the above
Ans:- B
Explanation:-
According to property 2, the maximum number of nodes in a binary tree of height or depth h is 2h-1

DECEMBER 2007 - PAPER II Q.No 23


The height of a binary tree with 'n' nodes in the worst case is

(A). 0(log n)
(B). O(n)
(C). Ω(n log n)
(D). Ω(n2)
Ans:- B
Explanation:-
Big omega notation is used for representing the best case. Big oh notation is used for representing the worst case. It is a measure of the longest amount of time it could possibly take for any algorithm to complete. Since we are representing the height of a binary tree, it would be the maximum height possible in a tree with 'n' nodes and it is O(n). So, the correct answer is B.

JUNE 2009 - PAPER II Q.No. 27


In a full binary tree of height k, there are ____________internal nodes.

(A). 2k-1
(B). 2k-1
(C). 2k
(D). 2k+1

Ans:-A
Explanation:-
Refer to the following diagram to understand the explanation. A full binary tree is one which has all the levels have maximum number of nodes in a tree.


DECEMBER 2009 - PAPER II Q.No 21

If the number of leaves in a strictly binary tree is an odd number, then what can you say with full conviction about total number of nodes in the tree?.
(A). It is an odd number.
(B). It is an even number.
(C). It cannot be equal to the number of leaves
(D). It is always greater than twice the number of leaves

Ans:-A
Explanation:-
A binary tree is a strictly binary tree if each node in the tree is either a leaf node or has exactly two children. There is no node with one child. According to its property, a strictly binary tree with n leaf nodes always has 2n-1 nodes. Let us consider n to be an odd number and give it a value of 3. So, the number of nodes in the tree would be 2n - 1 which is 2 X 3 -1 = 5. So that is also an odd number. So, the answer is A.

JUNE 2010 - PAPER II Q.No 23

In a complete binary tree of n nodes, how far are the two most distant nodes?.Assume each edge in the path count as 1.
(A). About log2n
(B). About 2log2n
(C). About nlog2n
(D). About 2n

Ans:-A
Explanation:-
The height h of a complete binary tree with n nodes is at the most O(log2n).

DECEMBER 2011 - PAPER II Q.No. 50

The number of nodes in a complete binary tree of height h (with roots at level 0) is equal to

(A) 20+21+......+2h
(B) 20+21+......+2h-1
(C) 20+21+......+2h+1
(D) 21+......+2h+1

Ans:-A
Explanation:-
Count the number of nodes in each level, starting with the root, assuming that each level has the maximum number of nodes.
n=1+2+4+....2h-1+2h

Data Structures

This particular question is not clear for few readers. So, I am taking it up once again.
25. Which of the following can be the sequence of nodes examined in binary search tree while searching for key 88 ?

(A) 90, 40, 65, 50, 88
(B) 90, 110, 80, 85, 88
(C) 190, 60, 90, 85, 88
(D) 65, 140, 80, 70, 88


Ans:- B
Explanation:-
I am taking the liberty of retaining an explanation given for a similar question from yahoo answers.

Best Answer: For a binary search tree, the entire tree is sorted such that for any node, every node to the left is less than the current node value and every node to the right is more than the current node value.
When walking a BST tree, you "zero in" on the value by following the correct nodes down the tree. Ideally you work closer and closer to your answer, kind of like the "guess the number" game where you give "nope, more!" and "nope, less!" hints.
a) 2, 399, 387, 219, 266, 382, 381, 278, 363
This sequence is possible.
b) 935, 278, 347, 621, 299, 392, 358, 363
This sequence is not possible. Since 621 is to the right of 347, every other node under 621 must ALSO be to the right of 347. 299 is not -- so this is an impossible walk. Basically, once you pass 347, 299 is swinging too far in the opposite direction.
c) 924, 220, 911, 244, 898, 258, 362, 363
This sequence is possible.
d) 925, 202, 911, 240, 912, 245, 363
Not possible -- 240 is to the left of 911, so every other node must also be less than 911 (but still may be to the right of 240). 912 is not to the left of 911.
e) 2, 252, 401, 398, 330, 344, 397, 363 This sequence is possible. Just barely though -- 397 is to the left of 398 but just barely!
I am taking the example b which explains why a particular sequence is not possible. Since 621 is to the right of 347, every other node under 621 must ALSO be to the right of 347.
Let us apply the same rule to all the sequences given above for us in the question.
The first sequence is 90,40,65,50,88. Do not consider any particular element as the root. But start analysing the numbers from first. 90 is the first number. 40 is the second one. So, 40 will be to the left of 90, since it is less than 90. Since 40 is to the left of 90, all numbers following 40 also should be to the left of 90, which is true in this sequence. 65,50, and 88 will be to the left of 90. So this sequence is possible.
Let us consider the second sequence which is 90,110,80,85,88. Again 90 is the first number. 110 will be to its right since it is greater than 90. So all the numbers following 110 also should be to the right of 90,but 80,85 and 88 fall to its left. So, this sequence is not possible.
Let us consider the third sequence which is 190,60,90,85,88. So, 190 is the first number. 60 is to its left. So all the other numbers following 60 should be to the left of 190, which is holding good here. 90,85 and 88 will be to the left of 190. So, this sequence is possible.
Let us consider the fourth sequence which is 65,140,80,70,88. 65 is the first number. 140 will be to its right. All the numbers following 140 should be to the right of 65 which is true. 80,70 and 88 will be to the right of 65 as well.
So, the correct answer is option B and not C.
Thank you all, for bringing this question for discussion as we have zeroed in on the right answer.

Internet Protocol V4

IP ADDRESS AND ITS DIFFERENT CLASSES

IP address is the short form for Internet Address. These help to uniquely identify the hosts on the internet. The data which is sent over the network is delivered to the correct host with the help of the IP address.There are two versions of IP addresses available. IPv4 and IPv6. Let us talk about IPv4 now.

IPv4


IPVersion 4 addresses consist of 32 bits(0 through 31) partitioned into four groups of eight bits each. Each of this group is called an octet. It will be very difficult to understand and decipher the IP addresses if they were represented in the binary form and so they are reprsented in decimal form. Four decimal numbers separated by a dot, each standing for one octet. So, for example an IP address would look like this, 206.172.180.100.
  • IP address consist of 32 bits.
  • Each grouped into 4 groups of eight bits each.
  • Each of the eight bits are referred to as octets.
IP addresses are grouped into five classes class A, class B, class C, class D and class E. In order to differentiate between all these classes, we have to observe the first four bits of the first octet of the IP address.
CLASS A:
If the first bit is 0, then the IP address belongs to Class A. Class A addresses begins with a decimal number ranging from 0 to 127.Both 0 and 127 are reserved. So the first octet’s bit representation.

X X X X X X X X X - First octet's bit position
0 X X X X X X X X - Class A address representation
Each X stands for a bit which can be 0 or 1. For class A addresses the first bit would be a zero only.

CLASS B:
If the first two bits are 10, then the IP address belongs to class B. Class B addresses begins with a decimal number ranging from 128 to 191.
X X X X X X X X - First octet's bit position
1 0 X X X X X X - Class B address representation

The lowest class B address would be 1 0 0 0 0 0 0 0. The decimal equivalent of the same is 128. The highest class B address would be 1 0 1 1 1 1 1 1. The decimal equivalent of the same would be 191. That is why the decimal number range is between 128 to 191.
CLASS C:
If the first three bits are 110, then the IP address belongs to class C. Class C addresses begin with a decimal number ranging from 192 to 223.
X X X X X X X X – The first octet’s eight bits
1 1 0 X X X X X - Class C address representation

The lowest class C address would be 1 1 0 0 0 0 0 0. The decimal equivalent of the same is 27+26 = 192. The highest class C address would be 1 1 0 1 1 1 1 1. The decimal equivalent of the same is = 223.
CLASS D:
If the first four bits are 1110, then the address is class D address. Range of values from 224 to 229.

X X X X X X X X – The first octet’s eight bits
1 1 1 0 X X X X – Class D address
The lowest address would be 1 1 1 0 0 0 0 0. Decimal equivalent of the same is 128 + 64 + 32 = 224. Highest class D address would be 1 1 1 0 1 1 1 1. Again decimal equivalent of the same would be 128 + 64 + 32 + 8 + 4 + 2 +1 = 239. Class D addresses are used for multicasting.

CLASS E:
If the first four bits are 1111, then the address is a class E address. Range of decimal numbers ranging from 240 to 255.

X X X X X X X X – The first octet’s eight bits
1 1 1 1 1 1 1 1 – Class E address.
Lowest address = 1 1 1 1 0 0 0 0 = 128 + 64 + 32 + 16 = 240
Highest address = 1 1 1 1 1 1 1 1 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

STEPS TO FIND OUT THE CLASS OF IP ADDRESS


Given a IP address consider only the first octet. The rest of the octets can be of any value. That should not be of a concern in identifying the class of IP address. When we consider the first octet, there are two ways of identifying the class of IP address. One is to remember the decimal range of values for each class.
  1. Class A - 0 to 127
  2. Class B - 128 to 191
  3. Class C - 192 to 223
  4. Class D - 224 to 239
  5. Class E - 240 to 255
So if in the first octet the decimal number is given as 200.200.192.55 then the IP address belongs to class C because it falls in that range. But we might forget this sequence of numbers and that will be trouble for us. So, another way of working this out is to remember only the bit values for each of the class addresses.
  1. Class A - First bit is 0
  2. Class B - First two bits 1 0
  3. Class C - First three bits 1 1 0
  4. Class D - First four bits 1 1 1 0
  5. Class E - First four bits 1 1 1 1
So, given any IP address convert the first octet's decimal number to the binary equivalent. Look at the first few bits and decide the class of the IP address.
1. In IPv4, the IP address 200.200.200.200 belongs to
(A) Class A
(B) Class B
(C) Class C
(D) Class D
Ans :- C
Explanation:- Consider only the first octet's decimal value. Ignore the rest. The first octet value is 200. Convert the same to binary equivalent. It is 11001000. If the converted bit equivalent has less than 8 bits, then fill its left side with 0's and bring it to a count of 8 bits. The first 3 bits are 110 here and so this IP address belongs to class C address. So the answer is C. This question is from December 2013 - Paper III.
2. In classful addressing, the IP address 190.255.254.254 belongs to
(A) Class A
(B) Class B
(C) Class C
(D) Class D
Ans:- B
Explanation:- Again consider only the first octet. The value there is 190. Convert it into binary equivalent. It is 1011 1110. Look at the first two bits. It is 10. So it is class B address and so the correct answer is B. This question is from June 2013 - Paper II.
3. In classful addressing, the IP address 123.23.156.4 belongs to __________class format.
(a) A
(b) B
(c) C
(d) D
Ans:- A
Explanation:- Consider the first octet. The value is 123. The binary equivalent is 111 1011. There are only 7 bits. Add a zero in the high order bit. 0111 1011. The first bit is 0 and so the class address is A.This question is from December 2012 - Paper III.
4. IP address in class B is given by:
(A) 125.123.123.2
(B) 191.023.21.54
(C) 192.128.32.56
(D) 10.14.12.34
Ans:- B
Explanation:- You should be in a position to explain it on your own by now!!.

Networks

COMPUTER NETWORKS

An Ebook on COMPUTER NETWORKS is available for FREE download here. The book has the following salient features.

  1. Detailed explanation of theory on certain topics.
  2. Over 100+ solved questions in computer networks of previous year papers(starting from 2008) with detailed explanation.
  3. Important formulae.
  4. Important URLs where MCQ's in computer networks are available.
Overall a very useful book for your learning reference in Computer Networks. Click here on the following link, complete a small survey questionnaire and then download....

DOWNLOAD COMPUTER NETWORKS - EBOOK

Saturday 29 October 2016

IP Address and Call Records

  1. IP Address as an Evidence :
  2.  IP address alone I feel cannot be a conclusive evidence and I have proved in many cases in lower courts .
  3.  • Judge Gary Brown in the United States District Court of the Eastern District of New York adjudged below : 
  4. • "The assumption that the person who pays for Internet access at a given location is the same individual who allegedly downloaded a single sexually explicit film is tenuous, and one that has grown more so over time," he writes. "An IP address provides only the location at which one of any number of computer devices may be deployed, much like a telephone number can be used for any number of telephones."
  5.  • "Thus, it is no more likely that the subscriber to an IP address carried out a particular computer function – here the purported illegal downloading of a single pornographic film – than to say an individual who pays the telephone bill made a specific telephone call," . Adv Prashant Mali - Cyber Law Expert (prashant.mali@cyberlawconsulting.com)
  6. CDR(Call Data Records) as an Evidence :
  7. Today Investigation agencies gets paralyzed when a accused doesn’t use Mobile phone.as the investigation starts majorly around CDR. 
  8. • Call Data Records do aid in preliminary investigation but cannot be taken as conclusive evidence because of following problems 1. The mobile handset or SIM could be on someone else name, as written in receipt/invoice. 2. Call Data Records are not certified 3. SIM card was cloned or IMEI number Spoofed(changed) 4. Mobile Number snooping had taken place using S/W In Bombay Bomb Blast case Sanjay Dutt CDR were admitted and the same were in Parliament Attack case Adv Prashant Mali - Cyber Law Expert 

Expert

Expert Services

What if your in-house expertise is not enough to resolve a cyber incident? How can you ensure that your IT infrastructure or specific applications are fully secured against potential cyber-attack? Kaspersky Lab offers a portfolio of Expert Services designed to mitigate and resolve these risks:
Penetration Testing – identify the weakest points in your infrastructure; avoid financial, operational and reputational damage caused by cyber-attack; comply with government, industry and corporate standards (e.g. PCI DSS).
Application Security Assessment – uncover vulnerabilities in applications of any kind, from large cloud-based solutions, ERP systems, online banking and other specific business applications to embedded and mobile applications on different platforms (iOS, Android and others).
Digital Forensics and Malware Analysis – reconstruct a detailed picture of any incident using comprehensive reports, including incident remediation steps.

Salary for Computer Forensics Expert

Average Salary for Certification: Computer Hacking Forensic Investigator (CHFI)
Job TitleNational Salary Data
Security Manager, IT 3 salariesRs 1,236,060
Information Security Analyst 3 salariesRs 600,000
Security Analyst 3 salariesRs 1,000,000
Country: India | Currency: INR | Updated: 22 Oct 2016 | Individuals Reporting: 29