discrete mathematics Archives - https://www.theoryofcomputation.co/tag/discrete-mathematics/ Science of Computer Sun, 28 Oct 2018 06:35:52 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 https://i0.wp.com/www.theoryofcomputation.co/wp-content/uploads/2018/08/cropped-favicon-512x512-2.png?fit=32%2C32&ssl=1 discrete mathematics Archives - https://www.theoryofcomputation.co/tag/discrete-mathematics/ 32 32 149926143 Proof by Induction – Mathematical Preliminaries Part 4 https://www.theoryofcomputation.co/proof-by-induction/ Sun, 28 Oct 2018 06:35:45 +0000 https://www.theoryofcomputation.in/?p=281 A proof by induction is the powerful and important technique for proving theorems, in which every step must be justified. For each positive integer n, let P(n) be a mathematical statement that depends on n. Assume we wish to prove that P(n) is true for all positive integers n.A proof by induction of such a statement is carried out as follows: Basis:...

The post Proof by Induction – Mathematical Preliminaries Part 4 appeared first on .

]]>
A proof by induction is the powerful and important technique for proving theorems, in which every step must be justified.

proof by induction

For each positive integer n, let P(n) be a mathematical statement that depends on n. Assume we wish to prove that P(n) is true for all positive integers n.A proof by induction of such a statement is carried out as follows:

Basis: Prove that P(1) is true.

Induction Step: Prove that for all n ≥ 1, the following holds: If P(n) is true, then P(n+1) is also true.

In the induction step, we choose an arbitrary integer n ≥ 1 and assume that P(n) is true; this is called the induction hypothesis. Then we prove that P(n+1) is also true.

Theorem 1: For all positive integers n, we have 1 + 2 + 3 + ….+ n = n(n+1)/2.

Proof: We start with the basis of the induction. If n = 1, then the left-hand side is equal to 1, and so is the right-hand side. So the theorem is true for n = 1.

For induction step, let n ≥ 1 and assume that the theorem is true for n, i.e., assume that 1 + 2 + 3 + …. +n =  n (n + 1) / 2

So what induction is saying , it should be true for n + 1 which means:

1 + 2 + 3 + …. + (n + 1)  = (n + 1)((n+1) + 1) / 2 , where n replaced with (n  + 1), by the induction hypothesis

this implies to

1 + 2 + 3 + …. + n + 1 = (n + 1) (n + 2) /2 , so we will prove this and it will proved the theorem.

Now takes L. H .S

=> 1 + 2 + 3 + ….. +  (n + 1) = 1 + 2 + 3 + ….. + n + n + 1 , (n + 1 comes after n)

we know 1 + 2 + 3 + …. + n = n(n+1)/2

=> n(n+1)/2 + (n + 1)

=> (n2 + n + 2n + 2)  / 2

=> (n(n + 1) + 2(n+1)) / 2  , by distribution of division over addition (or factorization)

=> (n + 1) (n + 2) / 2 = R.H.S

Also Read: Pigeon Hole Principle Mathematical Preliminaries Part 3


The post Proof by Induction – Mathematical Preliminaries Part 4 appeared first on .

]]>
281
Mathematical Statement https://www.theoryofcomputation.co/mathematical-statement/ Tue, 16 Oct 2018 18:37:47 +0000 https://www.theoryofcomputation.in/?p=276 Mathematical Statement For understanding any mathematical statement we first need to recollect what maths is basically. When we solve any problem in maths our solution is either right or wrong. There is no midway to the problems! Similar is the situation with any mathematical statement. A mathematical statement is either true or false. Mathematical Statement...

The post Mathematical Statement appeared first on .

]]>
Mathematical Statement

For understanding any mathematical statement we first need to recollect what maths is basically. When we solve any problem in maths our solution is either right or wrong. There is no midway to the problems! Similar is the situation with any mathematical statement. A mathematical statement is either true or false.

Mathematical Statement Definition:

A statement (or proposition) is a sentence that is either true or false (both not both).

So ‘3 is an odd integer’ is a statement. But ‘π is a cool number’ is not a (mathematical) statement. Note that ‘4 is an odd integer’ is also a statement, but it is a false statement.

Any statement which is predicted to be both cannot be a mathematical statement. For understanding this we take three sentences:

  • The first prime minister of United States was a woman.
  • Blue Whale is the largest animal on Earth.
  • Girls are intelligent than boys.

The first statement is false while the second is true, but when we consider the third statement for some it is true while for others it is false. All girls are not intelligent than boys. So a statement which is either true or false is called a mathematical statement.

Every statement that is either true or false is said to be a mathematically accepted one, hence is called a mathematical statement.

Mathematical Statement In Discrete Mathematics

A meaningful composition of words which can be considered either true or false is called a mathematical statement or simply a statement.

A single letter shall be used to denote a statement. For example, the letter ‘p’ may be used to stand for the statement “ABC is an equilateral triangle.” Thus, p = ABC is an equilateral triangle.

Production of New Statement

New statements from given statements can be produced by:

  1. Negation: ∼
    If p is a statement then its negation ‘∼p’ is statement ‘not p’. ‘∼p’ has truth value F or T according to the truth value of  ‘p’ is T or F.
  2. Implication: ⇒
    If from a statement p another statement q follows, we say ‘p implies q’ and write ‘p⇒ q’. Such a result is called an implication. The truth value of ‘p ⇒ q’ is F only when p has truth value T and q has the truth value F.
    The statements involving ‘if p holds then q’ are of the kind p ⇒ q. For example, x= 2 ⇒ x2 = 4.
  3. Conjunction: ∧
    The sentence ‘p and q’ which may be denoted by ‘p ∧ q’ is the conjunction of p and q. The truth value of p ∧ q is T only when both p and q are true.
  4. Disjunction:  ∨
    The sentence ‘p or q (or both)’ which may be denoted by ‘p ∨ q’ is called the disjunction of the statements p and q. The truth value of p ∨ q is F only when both p and q are false.

Equivalence of Two Statements, p⇔q

Two statements p and q are said to be equivalent if one implies the other, and in such a case we use the double implication symbol ⇔ and write p ⇔ q.

The statements which involve the phrase ‘if and only if’ or ‘is equivalent to’ or ‘the necessary and sufficient conditions’ are of the kind p ⇔ q. For example, ABC is an equilateral triangle AB = BC = CA.

For brevity, the phrase ‘if and only if’ is shortened to “iff”. As described above, the symbols ∧ and ∨  stand for the words ‘and’ and ‘or’ respectively. The disjunction symbol ∨ is used in the logical sense ‘or’. The symbols ∧, ∨ are logical connectives and are frequently used.

The following is the table showing truth values of different compositions of statements. Such tables are called truth tables.

p
q
∼ p

∼ q

⇒ q

 q

∨ q

⇔ q

T
T
F
F
T
T
T
T
T
F
F
T
F
F
T
F
F
T
T
F
T
F
T
F
F
F
T
T
T
F
F
T

By forming truth tables, the equivalence of various statements can easily be ascertained. For example, we shall easily see that the implication ‘p ⇒ q’ is equivalent to ‘∼p ⇒ ∼q’. The implication ‘∼q ⇒ ∼p’ is called the contrapositive of p ⇒ q.

Read Also: Pigeon Hole Principle Mathematical Preliminaries Part 3

Example:

Question: Consider the statement, Given that people who are in need of refuge and consolation are apt to do odd things, it is clear that people who are apt to do odd things are in need of refuge and consolation. This statement, of the form (P ⇒ Q) ⇒ (Q ⇒ P) is logically equivalent to people

  1. who are in need of refuge and consolidation are not apt to do odd things
  2. that are apt to do odd things if and only if they are in need of refuge and consolidation
  3. who are apt to do odd things are in need of refuge and consolidation
  4. who are in need of refuge and consolidation are apt to do odd things

Solution: Option 3. People who are apt to do odd things are in need of refuge and consolidation. Given statement is “people who are in need of refuge and consolation are apt to do odd things”. It is in the form of p where p is “in need of refuge and consolation” and q is “apt to do odd things”.

So  q⇒p is equivalent to “people who are apt to do odd things are in need of refuge and consolation”. Therefore option 3 is correct.

The post Mathematical Statement appeared first on .

]]>
276
Pigeon Hole Principle Mathematical Preliminaries Part 3 https://www.theoryofcomputation.co/pigeon-hole-principle-mathematical-preliminaries-part-3/ Mon, 08 Oct 2018 19:16:49 +0000 https://www.theoryofcomputation.in/?p=266 Pigeon Hole Principle If n+1 or more objects are placed into n boxes, then there is at least one box containing two or more objects. In other words, if A and B  are two sets such that |A| > |B|, then there is no one-to-one function from A to B. Theorem 1: Let n be a positive integer. Every...

The post Pigeon Hole Principle Mathematical Preliminaries Part 3 appeared first on .

]]>
Pigeon Hole Principle

If n+1 or more objects are placed into n boxes, then there is at least one box containing two or more objects. In other words, if and  are two sets such that |A| > |B|, then there is no one-to-one function from A to B.

Theorem 1: Let n be a positive integer. Every sequence of n2 + 1 distinct real numbers contains a subsequence of length n+1 that is either increasing or decreasing.

Proof. For example consider the sequence (20, 10, 9, 7, 11, 2, 21, 1, 20, 31) of 10 = 32 + 1 numbers. This sequence contains an increasing subsequence of length 4 = 3 + 1, namely (10, 11, 21, 31).

The proof of this theorem is by contradiction, and uses the pigeon hole principle.

Let (a1, a2,…..,an2+1) be an arbitrary sequence of n2 + 1 distinct real numbers. For each i with 1 ≤ i ≤ n2 + 1, let inci denote the length of the longest increasing subsequence that starts at ai, and let deci denote the length of the longest decreasing subsequence that starts at ai
Using this notation, the claim in the theorem can be formulated as follows:

There is an index i such that inci ≥ n + 1 or deci ≥ n + 1.

We will prove the claim by contradiction. So we assume that inci ≤ n and deci ≤ n for all i with 1 ≤ i ≤ n2 + 1.
Consider a set

B = {(b,c): 1 ≤ b ≤ n, 1 ≤ c ≤n },

and think of the elements of B as being boxes. For each i with 1 ≤ i ≤ n2 + 1, the pair (inci, deci) is an element of B. So we have n2 + 1 elements (inci, deci), which are placed in the n2 boxes of B. By the pigeon hole principle, there must be a box that contains two (or more) elements. In other words, there exist two integers i and j and

(inci,deci) = (incj,decj)
.
Recall that the elements in the sequence are distinct. Hence, ai ≠ aj. We consider two cases.
First assume that ai < aj . Then the length of the longest increasing subsequence starting at ai must be at least 1 + incj, because we can append ai to the longest increasing subsequence starting at aj. Therefore, inci ≠ incj which is a contradiction.
The second case is when ai > aj. Then the length of the longest decreasing subsequence starting at ai must be at least 1 + decj, because we can append ai to the longest decreasing subsequence starting with aj. Therefore, deci ≠ decj, which is again a contradiction.

The post Pigeon Hole Principle Mathematical Preliminaries Part 3 appeared first on .

]]>
266