Skip to main content

Theory of Computaion

Give the answer of the following questions:
  1. What is principle of mathematical induction? Explain types of it. Also what is need of those PM’s'?
  2. What do you understand by strong principle of mathematical induction? How it is different from mathematical induction? Give an example of a statement where you require strong principle of mathematical induction.
Prove the following using weak pmi:
  1. Prove that integer bigger than 2 have prime factorization.
  2. Define: The principle of mathematical induction. Also prove for any string x and n>=0 REV (xy) =REV(y) REV(x).
Strong PMI: Suppose p(n) is a statement involving an integer n, then to prove that p(n) is true for every n>= n0 it is sufficient to show two thing.
  1. P(n0) is true
  2. For any k>=n0, if p (n) is true, for every n satisfying n0<=n<=k then p (k+1) is true.
Prove the following using strong pmi:
  1. For any n>=2, n is either prime or product of two (or more) prime.
  2. Every positive integer is the product of power of 2 and an odd integer.
  3. a0=-2, a1=-2 for any n>=2 an=5an-1-6an-2, prove that for every n>=0 an=2*3n-4*2n
Recursive Definitions:
  1. Factorial of a number
  2. Fibonacci Series Function
  3. Set N of all natural numbers
  4. Finite Subset of the natural Numbers
  5. Palindrome language
  6. Set S of all integer(positive and negative) divisible by 7
  7. Set S of all integer divisible by 2 or 7
  8. The set U of all strings in {0,1}* containing the substring 00
  9. The set V of all strings of the form 0i1j, where j<=i<=2j
  10. The set W of all strings of the form 0i1j, where i>=2j
  11. Fully Parenthesized Algebraic Expression


Comments

Popular posts from this blog

Data Preprocessing

Working with data This is a demo file for Data Preprocessing [Working with Data] ¶ How to read data from .csv file ¶ In [8]: import pandas as pd df = pd . read_csv ( "weather_data.csv" ) df Out[8]: day temperature windspeed event 0 1/1/2017 32 6 Rain 1 1/2/2017 35 7 Sunny 2 1/3/2017 28 2 Snow Reading .xlsx file ¶ In [12]: df = pd . read_excel ( "weather_data.xlsx" , "demo" ) df Out[12]: day temperature windspeed event 0 2017-01-01 32 6 Rain 1 2017-01-02 35 7 Sunny 2 2017-01-03 2...