Skip to document
This is a Premium Document. Some documents on Studocu are Premium. Upgrade to Premium to unlock it.

Toc 2 marks - 2 mark question answer

2 mark question answer
Course

Theory of computation (Cs8501)

137 Documents
Students shared 137 documents in this course
University

Anna University

Academic year: 2019/2020
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
Anna University

Comments

Please sign in or register to post comments.
  • Student
    This is really helpful for me Thanks for uploading.

Preview text

Department of Computer Science and Engineering

UNIT – I PART-A

1. Define hypothesis. The formal proof can be using deductive proof and inductive proof. The deductive proof consists of sequence of statements given with logical reasoning in order to prove the first or initial statement. The initial statement is called hypothesis. 2. What is inductive proof. It is a recursive kind of proof which consists of sequence of parameterized statements that use the statement itself with lower values of its parameter. 3. List any 4 ways of proving the theorem. Proof about sets, Proofs by Contradiction, Proofs by Counter example and Inductive Proofs. 4. Define Set, Infinite and Finite Set.

Set is Collection of various objects. These objects are called the elements of the set. Eg : A = { a, e, i, o, u } Infinite Set is a collection of all elements which are infinite in number. Eg: A = { a | a is always even number } Finite Set is a collection of finite number of elements. Eg : A = { a, e, i, o, u } 5. Give some examples for additional forms of proof. 1 about sets 2 by contradiction 3 by counter examples 6. Prove 1+2+3+..................+n= n(n+1)/2 using induction method. Consider the two step approach for a proof by method of induction

  1. Basis of induction : Let n = 1 then LHS = 1 and RHS = 1 + 1 / 2 = 1 Hence LHS = RHS.
  2. Induction hypothesis : To prove 1 + 2 + 3 ...... + n = n ( n + 1 ) / 2 + ( n + 1 ) Consider n = n + 1 then 1 + 2 + 3 ......+ n + ( n + 1 ) = n ( n + 1 ) / 2 + ( n + 1 ) = n 2 + 3n + 2 / 2 = ( n + 1 ) ( n + 2 ) / 2 Thus it is proved that 1 + 2 + 3 ...... + n= n ( n+ 1 ) / 2

7. Write down the operations on set. i ) A U B is Union Operation If A = { 1, 2, 3 } B = { 1, 2, 4 } then A U B = { 1, 2, 3, 4 } i. combination of both the sets.

Department of Computer Science and Engineering ii) A ∩ B is Intersection operation If A = { 1, 2, 3 } B = { 1, 2, 4 } then A U B = { 2, 3 } i. Collection of common elements from both the sets. iii) A – B is the difference operation If A = { 1, 2, 3 } B = { 1, 2, 4 } then A U B = { 1 } i. elements which are there in set A but not in B. 8. Write applications of Automata Theory. 1. It is base for the formal languages and these formal languages are useful of the programming languages. 2. It plays an important role in complier design. 3. To prove the correctness of the program automata theory is used. 4. In switching theory and design and analysis of digital circuits automata theory is applied. 5. It deals with the design finite state machines. 9. Define Finite Automation A finite automata is a mathematical model of a system with discrete input and output and a finite number of memory configuration called states and a set of transitions from one state o another state that occurs on input symbols from alphabet Σ. FA is represented as a collection of 5 tuples (Q, Σ, δ, q 0 , F )

Where Q is finite set of states, which is not empty Σ is input alphabet δ is transition function q 0 is start state F is final state Two Types: Deterministic Finite Automata, Non Deterministic Finite Automata 10. Define Deterministic Finite Automation. The finite automata is called DFA if there is only one path for a specific input from current state to next state. A Deterministic finite automata is a collection of 5 tuples (Q, Σ. δ, q 0 , F ).

where Q is a finite set of states, which is non empty. Σ is a input alphabet, indicates input set. δ is a transition function, a function defined for going to next state. QX ΣQ q 0 is an initial state (q 0 in Q)

Department of Computer Science and Engineering ε ε

Solution:

ε - CLOSURE {q0} = {q0, q1,q2}

ε - CLOSURE {q1} = {q1,q2}

ε - CLOSURE {q2} = { q2} 18. Explain a transition diagram.

It is a 5-tuple graph used state and edges represent the transitions from one state to another state. Example: 0/ 0 2

19. Differentiate DFA and NFA S DFA NFA

  1. deterministic Finite Automata Non deterministic Finite Automata
  2. DFA is subset of NFA Need to convert NFA to DFA
  3. For given state, on a given input we reach to deterministic and unique state

For given state, on a given input we reach to more than one state

  1. Transition function leads to only one next state. QX ΣQ

Transition function leads to multiple next states. QX Σ 2 Q 5. Constructing DFA for a language is tougher than constructing an NFA

It is easier to design NFA than DFA. 6. Takes more space It is compact in space 7. DFA accepts a string if it reaches an one of the final states after reading all input symbols.

NFA accepts a string only when atleast one of the computational branches ends in an accept state. 8. There can be more than one DFA recognizing the same language differs in no states.

Every NFA has its equivalent DFA recognizing the same language.

0 0,

1 0

1

1 0

20. What is Alphabet? An alphabet is a finite, nonempty set of symbols. The alphabet of a language is normally denoted by. When more than one alphabets are considered for discussion, then subscripts may be used (e. etc) or sometimes other

q 0

q 1

q 2

q 0

q 1

q 3

q q q

Department of Computer Science and Engineering symbol like G may also be introduced. Example:

21. Construct a Finite Automata for the language {0n | n mod 3 = 2, n ≥ 0}

q0 remainder 0 state q1 remainder 1 state q2 remainder 2 state 22. What is - transitions? In an -transition, the tape head doesn't do anything- it doesnot read and it doesnot move. However, the state of the automata can be changed - that is can go to zero, one or more states. This is written formally as implying that the next state could by any one of w/o consuming the next input symbol. 23. What is meant by Automata? An automata is an abstract computing device (or machine). There are different varities of such abstract machines (also called models of computation) which can be defined mathematically. Some of them are as powerful in principle as today's real computers, while the simpler ones are less powerful. ( Some models are considered even more powerful than any real computers as they have infinite memory and are not subject to physical constraints on memory unlike in real computers). Studying simpler machines are still worth as it is easier to introduce some formalisms used in theory. 24. What is String and length of string? Strings or Words over Alphabet :A string or word over an alphabet is a finite sequence of concatenated symbols of. Example : 0110, 11, 001 are three strings over the binary alphabet { 0, 1 } Length of a string : The number of symbols in a string w is called its length, denoted by | w |. Example : | 011 | = 4, |11| = 2, | _ b _ | = 1 25. Find the transition function for this NFA

Department of Computer Science and Engineering induction. Let S(x) be a statement about the structures ‘x’ hat are defined by some particular recursive definition.

  1. Basis: Prove S(x) for the basis structures x.

  2. Induction: Take a structure ‘x’, the recursive definition says that it is formed from y 1 , y 2 ... Assume the statements S(y 1 ), S(y 2 ), ..(yn) and using these prove S(x).

3. Conclusion: Prove the statement S(x) is true for all x. 34. Define Mutual inductions When there ar several independent statements to prove, then we keep the statements separate and prove them all in their own parts of the basis and inductive step. This form of proof is called Mutual inductions. Eg. Automata with on/off switch and pushing the button switch the state between on and off and the switch starts in off state. 35. State regular expression. Let Σ be an alphabet. The regular expressions over Σ and the sets that they denote are defined recursively as follows a. Ø is a regular expression and denotes the empty set. b. ε is a regular expression and denotes the set {ε} c. For each ‘a’ε Σ, ‘a’ is a regular expression and denotes the set {a}. d. If ‘r’ and ‘s’ are regular expressions denoting the languages L 1 and L 2 respectively then r + s is equivalent to L 1 U L 2 i. union rs is equivalent to L 1 L 2 concatenation 36. How the kleen’s closure or closure of L can be denoted? L* = ¿ i = 0 ¿ ∞Li Example: a*={ε,a,aa,aaa,....} 37. How the positive closure or closure of L can be denoted? L+ = ¿ i = 1 ¿ ∞Li Example: a+={a,aa,aaa,....} 38. Write the regular expression for the language accepting all combinations of a’s. over the set ∑= {a} L = {ε,a,aa,aaa,......................}
R = a* 39. Write regular expression for the language accepting the strings which are starting with 1 and ending with 0, over the set ∑ = {0,1}. L = { 10,1100,1010,100010......................} R= 1(0+1)* 0 40. Show that (01*) = (0+1)*** LHS : (01)* = { ε, 0,1,00,11,0011,011,0011110...................} RHS : (0+1)* = { ε, 0,1,00,11,0011,011,0011110...................} Hence LHS = RHS is proved 41. Show that (r+s) ≠ r + s*** LHS : (r+s)*={ ε, r,s,rs,rr,ss,rrrsssr,...................}

Department of Computer Science and Engineering RHS : r* + s*= { ε, r,rr,rrr.............}U { ε, s,ss,sss,.............} = { ε, r,rr,rrr,s,ss,ssss.................} Hence LHS ≠ RHS is proved 42. What do you mean by homomorphism? A string homomorphism is a function on strings that works by substring a particular sting for each symbol. Eg. h(0) = ab h(1) =  is a homomorphism, where replace all 0’s by ab and replace all 1’s by . Let w = 0011 h(w) = abab 43. State Pumping lemma and its advantages. Let L be a regular set. Then there exists a constant n such that if z is any word in L such that |z| ≥ n then we can write z = uvw such that |uv| ≤ n and |v| ≥ 1 for all i≥0 and uvi w is in L. The n indicates number of states in FA and should not be greater than the number of states. The advantage is used to check whether the given language is regular or not. 44. Describe the following by regular expression. L1 = the set of all strings of 0’s and 1’s ending in 00 L2 = the set of all strings of 0’s and 1’s beginning with 0 and ending with 1 r1 = (0+1)* r2 = 0(0+1)* 45. Show that (r) = r* for a regular expression r** LHS = r* = { ε, r,rr,rrr, ................} (r*)* = { ε, r,rr,rrr, ................}* (r*)={ ε, r,rr,rrr, ................} = r LHS = RHS 46. Write down the closure properties of regular language

The regular languages are closed under

  1. Union

  2. Intersection

  3. Complement

  4. Difference

  5. Reversal

.

  1. Closure

  2. Concatenation

  3. Homomorphism

  4. Inverse Homomorphism

Department of Computer Science and Engineering described by REs) given already. But these two represents two different languages lending to ambiguity. To remove this ambiguity we can either

  1. Use fully parenthesized expression- (cumbersome) or
  2. Use a set of precedence rules to evaluate the options of REs in some order. Like other algebras mod in mathematics. For REs, the order of precedence for the operators is as follows: i) The star operator precedes concatenation and concatenation precedes union (+) operator. ii) It is also important to note that concatenation & union (+) operators are associative and union operation is commutative. 55. Limitations of Finite Automata and Non regular Languages. The class of languages recognized by FA s is strictly the regular set. There are certain languages which are non regular i. cannot be recognized by any

FA Consider the language In order to accept is language, we find that, an automaton seems to need to remember when passing the center point between a 's and b 's how many a 's it has seen so far. Because it would have to compare that with the number of b 's to either accept (when the two numbers are same) or reject (when they are not same) the input string. But the number of a 's is not limited and may be much larger than the number of states since the string may be arbitrarily long. So, the amount of information the automaton need to remember is unbounded. A finite automaton cannot remember this with only finite memory (i. finite number of states). The fact that _FA _ shave finite memory imposes some limitations on the structure of the languages recognized. Inductively, we can say that a language is regular only if in processing any string in this language, the information that has to be remembered at any point is strictly limited. The argument given above to show that is non regular is informal. We now present a formal method for showing that certain languages such as are non regular.

56. What is Moore machine and Mealy machine? A special case of FA is Moore machine in which the output depends on the state of the machine automaton in which the output depends on the transition and current input is called Mealy machine 57. What is Arden’s Theorem? Arden’s theorem helps in checking the equivalence of two regular expressions. Let P and Q be the two regular expressions over the input alphabet _. The regular expression R is given as:R=Q+RP which has a unique solution as R=QP*.

PART-B

1. Draw transition diagram for recognizing the set of all operators in C language. 2. Explain the extended transition function for NFA, DFA and ε-NFA.

Department of Computer Science and Engineering 3. Prove the following by induction 12 + 22 + .. 2 =

n ( n + 1 )( 2 n + 1 ) 6 4. Construct NFA that accepts the set of all stings {a,b} ending with “aba” as substring and construct DFA. 5. A regular language L is accepted by some DFA if and only if L is

accepted by some NFA. 6. Equivalence of NFA ε with and without ε. 7. Construct NFA accepting all strings in {a,b}+ with either two consecutive a’s or two consecutive b’s. 8. For the Finite State Machine M given in the following table, test whether the strings 101101, 11111 are accepted by M.

9. Construct DFA that accepts all stings on {0,1} except those containing 101 as substring. 10. Consider the following ε–NFA compute the ε–closure of each state and find its equivalent DFA. ε a b c  *p {q,r} Ф {q} {r} q Ф {p} {r} {p,q} r Ф Ф Ф {r}

11 the following NFA with ε to DFA 0 1 2 ε  **q 0 q 0 Ф Ф q 1 q 1 Ф q 1 Ф q 2

  • q 2 Ф Ф q 2 Ф**

12. Consider the following NFA and check whether the input “abaab” is accepted or not. a b  **q 0 {q 0 , q 1 } {q 0 , q 3 } q 1 { q 2 } Ф q 2 { q 2 } { q 2 } q 3 Ф { q 4 } q 4 { q 4 } { q 4 } 13. Verify whether the finite automata M1 and M2 given below are equivalent over{a,b}.

14. Costruct DFA for the NFA given below.

Department of Computer Science and Engineering anban b

L (G) = { a n ba n ; n >0} 2. Consider G whose productions are SaAS/ a , ASbA / SS / ba, show that aabbaa and construct a derivation tree.

Solution: SaAs aSbAS aBaS aabAS aabbaS aabbaa A SbA ba 3. Define a derivation tree for CFG A derivation tree for a CFG G=(V,T,P,S) is a tree satisfying the following  Every vertex has a label, which is a symbol of V U T U ε  The label of the root is S.  If a vertex is interior and has a label A, then A must be in V.  If n has a label A and vertices n1, n2,..... are sons of the vertex n, in x1,x2,..... must be a production in P.  If vertex n has label ε, then n is a leaf and is the only son of its father.

4. Construct CFG L= { anbn ; n≥1}. The Production are S aSb / ε, where G= ({S}, {a,b,ε}, P, S) 5. Find a LM derivation for aaabbabbba with the productions. P : SaB / bA, Aa /S / bAA, Bb / bS / aBB Solution: S => aB => aaBB=>aaaBBB=>aaabBB=>aaaabbB=>aaabbaBB=>aaabbabB => aaabbabbS=> aaabbabbbAS=> aaabbabbba 6. Show that id id can be generated by two distinct leftmost derivation in* the grammar EE+E / E*E / (E) / id Solution: EE +Eid+Eid+E*Eid+id*Eid+id*id We showed that id+id*id can be generated by two distinct LMD EE E*  E+E*E  *E +E idE +id id*  id+id*id

Department of Computer Science and Engineering 7. Write a CFG for the set of strings which does not produce any palindromes. Here the grammar should be designed in such a way that w ≠ wR S-> aSa / bSb / C C aAb / bAa A aA / bA / ε 8. Find the language for the CFG SaSa / aAb , AbAa / b a S => aSb => aaSbb => ..... => anSbn => anaAbbn =>anabAabbn => anabnaabbn=> anbmambn L = { anbmambn ; m,n ≥ 1} 9. Define parse tree. A data structure to represent the source program in a complier is called parse tree. Parse tree can have nodes and edges.

10. What are the applications of Context free languages? Context free languages are used in : (i) Defining programming languages. (ii) Formalizing the notion of parsing. (iii) Translation of programming languages. (iv) String processing applications 11. What are the uses of Context free grammars? Construction of compilers. Simplified the definition of programming languages. Describes the arithmetic expressions with arbitrary nesting of balanced parenthesis { (, ) }. Describes block structure in programming languages. Model neural nets. 12. Define a context free grammar A context free grammar (CFG) is denoted as G=(V,T,P,S) where V and T are finite set of variables and terminals respectively. V and T are disjoint. P is a finite set of productions each is of the form A->Σ where A is a variable and Σ is a string of symbols from (V U T). 13. What are the normal forms of Context free grammars? The normal forms are CHOMSKY NORMAL FORM(CNF) GREIBACH NORMAL FORM(GNF) 14. What is meant by Derivation? This is method to define the language of grammar, in which we use the productions from head to body of the grammar. Here we start by expanding the start symbol using one of its productions of the grammar string by replacing one of the variables by body of one of its production until we derieve a string containg all the terminals. 15. What is :(a) derivation (b)derivation/parse tree (c) subtree ( a) Let G=(V,T,P,S) be the context free grammar. If A-> β is a production of P and α and γ are any strings in (VUT) then α A γ => αβγ (b) A tree is a parse \ derivation tree for G if: (i) Every vertex has a label which is a symbol of VUT U{ }. (ii) The label of the root is S. (iii) If a vertex is interior and has a label A, then A must be in V.

Department of Computer Science and Engineering By eliminating the empty productions. By eliminating the unit productions. 22. What is a useless symbol? A symbol x is useful if there is a derivation S=>* α x β =>* w for some α, β, w Σ T* or else , it is useful. 23. How do you simplify the context-free grammar? First eliminate useless symbols, where the variable or terminals that do not appear in any derivation of a terminal string from the start symbol. Next eliminate ε- productions which is of the form A ε for  some variable A. Eliminate unit productions, which are of the form A B for  variables A, B. Finally use any of the normal forms to get the simplified CFG. 24. Define Nullable Variable? Nullable variable in a CFG G =(V,T,P,S) can be defined as follows.  Any variable A for which P contains the production A-> A, is nullable.  If P contains the production A-> B1,B2, ....... Bn and B1, B2, ... are nullable variables, then A is nullable.  No other variables in V are nullable. 25. Define generating symbol? Let G = (V,T,P,S) is generating, if X * w for some terminal string w. e. A-> aAB / ε B-> b Then A is a generating symbol since A => ab 26. Let G = (V, T, P,S). with the productions given byS -> aSbS/ B / ε,B-> abB Eliminate the useless production Remove B is useless production because of Variable is not reachable. S-> aSbS / ε 27. What is substitution Rule? A production A->x 1 Bx 2 can be eliminated from a grammar if B is replaced by all strings derived by B in one step, provided A and B are variables. 28. What is a useful production? Let G = (V,T,P,S) be a CFG. A variable A ∑ V is said to be useful iff there is atleast one w∑L(G) such that S =>* xAy =>* w with x,y in (VUT). 29. Determine whether the grammar G has a useless production? S->A A->aA / ε B -> bA The variable B is useless, since it is used by the start variable or by the variable in the start production. B-> bA is a useless production. 30. Write a procedure to eliminate ε production. i) For all productions A->ε, put A into V

ii) Repeat the following steps until no new variable are added. a. For all productions B-> A 1 A 2 A 3 .............., where A 1 A 2 A 3 .............. are in V b. Put B into V 31. Write the procedure to eliminate the unit productions. i) Find all variables B, for each A such that A=>* B

Department of Computer Science and Engineering ii) The new grammar G is obtained by letting into P all non-unit productions of P. iii) For all A and B satisfying A =>* B, add to p A-> y 1 / y 2 / y 3 /........./ yn where B -> y 1 / y 2 / y 3 /........./ yn is the set of productions in P 32. Define CNF. A CFG without any ε–production is generated by a grammar in which the productions are of the form. A -> BC or A-> a, where A,B ∑ V and a ∑ T. 33. What is GNF? Every CFL L without ε can be generated by a grammar for which every production is of the form A-> aα, where A∑V, a∑T, is a string of variables.

PART – B

1. a) Let G be a CFG and let a=>w in G. Then show that there is a leftmost derivation of w. b) Let G=(V,T,P,S) be a Context free Grammar then prove that if S=> αthen there is a derivation tree in G with yield α. 2. Let G be a grammar s->OB/1A, A->O/OS/1AA, B->1/1S/OBB. For the string 00110101 find its leftmost derivation and derivation tree. 3. a) If G is the grammar S->Sbs/a, Show that G is ambiguous. b) Give a detailed description of ambiguity in Context free grammar

Department of Computer Science and Engineering Explain. 10. Convert the grammar S->AB, A->BS/b, B->SA/a into Greibach NormalForm. 11. Construct a equivalent grammar G in CNF for the grammar G1 where G =({S,A,B},{a,b},{S->bA/aB,A->bAA/aS/a, B->aBB/bS/b},S) 12. Obtain the Chomsky Normal Form equivalent to the grammarS->bA/aB, A->bAA/aS/a, B->aBB/bS/b. 13. Begin with the grammar S->0A0/1B1/BBA->CB->S/AC->S/ ε and simplify using the safe order Eliminate ε-Productions Eliminate unit production Eliminate useless symbols Put the (resultant) grammar in Chomsky Normal Form. 14. Let G=(V,T,P,S) be a CFG. Show that if S=α, then there is a derivation tree in a grammar G with yield α. 15. Let G be the grammar S->aS/aSbS/ ε. Prove that L(G)={x/each prefix of x has atleast as many a's as b's}

16. Explain the Construction of an equivalent grammar in CNF for the grammar G=({S,A,B}{a,b},P,S) where P={S->bA|aB, A->bAA|aS|a,B- >aBB|bS|b} 17. Find a Context free grammar with no useless symbol equivalent to S->AB/CA, B->BC/ABA->a, C->aB/b. 18. Show that any CFL without εcan be generated by an equivalent

grammar in Chomsky Normal Form. 19. Convert the following CFG to CNF S->ASA|aB A->B|S B->b| ε 20. Explain about Greibach Normal Form.

UNIT III

PART-A

1. Define pushdown automaton A Pushdown Automata is a finite automation with extra resource called stack.

Department of Computer Science and Engineering It consists of 7 tuples P = (Q, ∑, δ , ⌠, q 0 , Z 0 , F) Where Q – Finite set of states ∑ - Finite set of input symbols ⌠- Finite set of stack symbols δ - Transition function q 0 – Start State Z 0 – Start symbol of the stack F – Final State 2. What are the different ways of language acceptances by a PDA and define them. i) Acceptance by final state L (M) = { w | (q 0 , w, z 0 ) |--(p, ε, γ ) for some P in F and γ in |--} ii) Acceptance by empty stack N (M) = { w | (q 0 , w, z 0 ) |--*(p, ε, ε ) for some P in Q} 3. Is it true that the language accepted by a PDA by empty stack and final states are different languages. No, because the languages accepted by PDA‘s by final state are exactly the languages accepted by PDA’s by empty stack.

4. Is NPDA (Nondeterministic PDA) and DPDA (Deterministic PDA) equivalent? The languages accepted by NPDA and DPDA are not equivalent**. 5. When is a string accepted by a PDA?** The input string is accepted by the PDA if:  The final state is reached.  The stack is empty. 6. Define Instantaneous description (ID) in PDA. ID describe the configuration of a PDA at a given instant is a triple such as (q, w, γ), where q is a state, w is a string of input symbols and γ is a string of stack symbols. If M =( Q, Σ ,Ґ ,δ ,q0 ,Z0 ,F ) is a PDA we say that (q,aw,Zα) |-----( p, , βα) if δ(q,a,Z) contains (p, β ). M ‘a’ may be Є or an input symbol. Example: (q1, BG) is in δ(q1, 0 , ) ells that (q1, 011, GGR )|---- ( q1, 11,BGGR). 7. Define Deterministic PDA. A PDA M =( Q, Σ ,Ґ ,δ ,q0 ,Z0 ,F ) is deterministic if: For each q in Q and Z in Ґ , whenever δ(q,Є,Z) is nonempty then δ(q,a,Z) is empty for all a in Σ. For no q in Q , Z in Ґ , and a in Σ U { Є} does δ(q,a,Z) contains more than one element. (Eg): The PDA accepting {wcw R | w in ( 0+1 ) * }. 8. Is it true that NDPDA is more powerful than that of DPDA? Yes. Because the class of languages accepted by NPDA is larger than DPDA. 9. State the equivalence of acceptance by final state and empty stack.  If L = L (M2) for some PDA M2, then L = N (M1) for some PDA M1.

Was this document helpful?
This is a Premium Document. Some documents on Studocu are Premium. Upgrade to Premium to unlock it.

Toc 2 marks - 2 mark question answer

Course: Theory of computation (Cs8501)

137 Documents
Students shared 137 documents in this course

University: Anna University

Was this document helpful?

This is a preview

Do you want full access? Go Premium and unlock all 31 pages
  • Access to all documents

  • Get Unlimited Downloads

  • Improve your grades

Upload

Share your documents to unlock

Already Premium?
PA College of Engineering and Technology
Department of Computer Science and Engineering
UNIT – I
PART-A
1. Define hypothesis.
The formal proof can be using deductive proof and inductive proof.
The deductive proof consists of sequence of statements given with logical
reasoning in order to prove the first or initial statement. The initial statement
is called hypothesis.
2. What is inductive proof.
It is a recursive kind of proof which consists of sequence of
parameterized statements that use the statement itself with lower values of
its parameter.
3. List any 4 ways of proving the theorem.
Proof about sets, Proofs by Contradiction, Proofs by Counter example and
Inductive Proofs.
4. Define Set, Infinite and Finite Set.
Set is Collection of various objects. These objects are called the elements of
the set. Eg : A = { a, e, i, o, u }
Infinite Set is a collection of all elements which are infinite in number.
Eg: A = { a | a is always even number }
Finite Set is a collection of finite number of elements.
Eg : A = { a, e, i, o, u }
5. Give some examples for additional forms of proof.
1.Proofs about sets
2.Proofs by contradiction
3.Proofs by counter examples
6. Prove 1+2+3+………………+n= n(n+1)/2 using induction method.
Consider the two step approach for a proof by method of induction
1. Basis of induction :
Let n = 1 then LHS = 1 and RHS = 1 + 1 / 2 = 1 Hence LHS = RHS.
2. Induction hypothesis :
To prove 1 + 2 + 3 …… + n = n ( n + 1 ) / 2 + ( n + 1 )
Consider n = n + 1 then
1 + 2 + 3 ……+ n + ( n + 1 ) = n ( n + 1 ) / 2 + ( n + 1 )
= n2 + 3n + 2 / 2
= ( n + 1 ) ( n + 2 ) / 2
Thus it is proved that 1 + 2 + 3 …… + n= n ( n+ 1 ) / 2
7. Write down the operations on set.
i ) A U B is Union Operation
If A = { 1, 2, 3 }
B = { 1, 2, 4 }
then A U B = { 1, 2, 3, 4 }
i.e. combination of both the sets.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.