mathematical induction Archives - https://www.theoryofcomputation.co/tag/mathematical-induction/ Science of Computer Sat, 27 Jul 2019 08:51:42 +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 mathematical induction Archives - https://www.theoryofcomputation.co/tag/mathematical-induction/ 32 32 149926143 Every regular expression describes regular language https://www.theoryofcomputation.co/regular-expression-describes-regular-language/ Sat, 27 Jul 2019 08:51:39 +0000 https://www.theoryofcomputation.co/?p=390 Every regular expression describes regular language, let R be an arbitrary regular expression over the alphabet Σ. We will prove that the language described by R is a regular language. The proof is by induction on the structure of R. The first base case of induction: Assume that R = ε.  The  R describes the language of {ε}. In order to prove that this...

The post Every regular expression describes regular language appeared first on .

]]>
Every regular expression describes regular language, let R be an arbitrary regular expression over the alphabet Σ. We will prove that the language described by R is a regular language. The proof is by induction on the structure of R.

The first base case of induction: Assume that R = ε.  The describes the language of {ε}. In order to prove that this language is regular, it suffices, by the theorem which says,

Theorem 1:  Let A be a language. Then A is regular if and only if there exists a nondeterministic finite automaton that accepts A.

thus, let construct the NFA M = (Q, Σ, δ, q, F) that accepts this language. This NFA is obtained by defining Q={q}, q is the start state, F = {q}, and δ(q,a) = ε,  for all a ∈ Σε . The figure below gives the state diagram of M:

Show the start and final state of NFA

The second base case:Assume that R= ε. The describes the language of {ε}. In order to prove that this language is regular, we know , by theorem 1, which state that if language is regular then it should be accepted by NFA.

So, let construct the NFA M = (Q, Σ, δ, q, F) that accepts this language. This NFA is obtained by defining Q={q}, q is the start state, F = θ, means final state not exist, and δ(q,a) = θ,  for all a ∈ Σε . The figure below gives the state diagram of M:

Start state of Non Deterministic Finite Automata

The third base case: Let a ∈ Σ and assume that R = a. The describes the language of {a}. In order to prove that this language is regular, we know , by theorem 1, which state that if language is regular then it should be accepted by NFA.

So, let construct the NFA M = (Q, Σ, δ, q1, F) that accepts this language. This NFA is obtained by defining Q={q1, q2}, q1 is the start state, F = {q2},  and

δ(q1,a) ={q2},

δ(q1,b) = θ for all b ∈ Σε \ {a}

δ(q1,b) = θ for all b ∈ Σε

The figure below gives the state diagram of M:

NFA state diagram with input

The first case of the induction step: Assume that R = R1 ∪ R2, where R1 and R2 are regular expressions. Let L1 and L2 be the languages described by R1 and R2, respectively, and assume that L1 and L2 are regular. Then R describes the language L1 ∪ L2, which, by,

Theorem 2: The set of regular languages is closed under the union operation, i.e., if A1 and A2 are regular languages over the same alphabet Σ, then A1 ∪ A2 is also a regular language.

The second case of the induction step: Assume that R = R1 ∪ R2, where R1 and R2 are regular expressions. Let L1 and L2 be the languages described by R1 and R2, respectively, and assume that L1 and L2 are regular. Then R
describes the language L1 ∪ L2, which, by Theorem 3, is regular.

Theorem 3: The set of regular languages is closed under the concatenation operation, i.e., if A1 and A2  are regular languages over the same alphabet Σ , then A1A2 is also a regular language.

The third case of the induction step: Assume that R = (R1)*, where R1 is a regular expression. Let L1 be the language described by R1 and assume that L1 is regular. Then R describes the language (L1)*, which, by Theorem 4, is regular.

Theorem 4: The set of regular languages is closed under the star (Kleene) operation, i.e., if A is a regular language, then A* is  also a regular language.

This concludes the proof of the claim that every regular expression describes a regular language.

Read: Regular Language in Automata Thoery

The post Every regular expression describes regular language appeared first on .

]]>
390
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