Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601
WINTER 2013, ASSIGNMENT
DRIVE  WINTER 2014 
PROGRAM  MCA(REVISED FALL 2007) 
SUBJECT CODE & NAME  MC0082 THEORY OF COMPUTER SCIENCE 
SEMESTER  5TH SEM 
CREDITS  4 
MAX. MARKS  60 
BK ID

B0970

Answer all questions
1 Differentiate between Recursive Functions and growth functions.
Answer : What’s a Recursive Function?
Technically, a recursive function is a function that makes a call to itself. To prevent infinite recursion, you need an ifelse statement (of some sort) where one branch makes a recursive call, and the other branch does not. The branch without a recursive call is usually the base case (base cases do not make recursive calls to the function).
Functions can also be mutually recursive. For example, function f() can call function g() and function g() can call function f(). This is still considered recursion because a function can eventually call itself. In this case, f() indirectly calls itself.
2. Describe direct and indirect proof techniques.
Ans : Direct proof :
In mathematics and logic, a direct proof is a way of showing the truth or falsehood of a given statement by a straightforward combination of established facts, usually existing lemmas and theorems, without making any further assumptions. In order to directly prove a conditional statement of the form “If p, then q”, it suffices to consider the situations in which the statement p is true. Logical deduction is employed to reason from assumptions to conclusion. The type of logic employed is almost invariably firstorder logic, employing the quantifiers for all and there exists. Common proof rules used are modus ponens and universal instantiation.
3. Discuss about Walks and Paths in Trees
Ans : Walks and Paths in Trees :
In the mathematical field of graph theory, a path graph or linear graph is a particularly simple example of a tree, namely a tree with two or more vertices that is not branched at all, that is, contains only vertices of degree 2 and 1. In particular, it has two terminal vertices (vertices that have degree 1), while all others (if any) have degree 2.
A path in a graph is a sequence of vertices such that from each of its vertices there is an edge to the next vertex in the sequence. A path may be
4. What is DFA? Discuss about Transition System.
Ans : DFA :
In automata theory, a branch of theoretical computer science, a deterministic finite automaton (DFA)—also known as deterministic finite state machine—is a finite state machine that accepts/rejects finite strings of symbols and only produces a unique computation (or run) of the automaton for each input string.’Deterministic’ refers to the uniqueness of the computation. In search of simplest models to capture the
5. Differentiate between Moore machine and Mealy machine.
Ans : Moore machine :
In the theory of computation, a Moore machine is a finitestate machine whose output values are determined solely by its current state. This is in contrast to a Mealy machine, whose output values are determined both by its current state and by the values of its inputs. The Moore machine is named after Edward F. Moore, who presented the concept in a 1956 paper, “Gedankenexperiments on Sequential Machines.
6. Define contextfree grammar. What is an ambiguous grammar? Explain with an example.
Ans : Ambiguous grammer :
In computer science, an ambiguous grammar is a formal grammar for which there exists a string that can have more than one leftmost derivation, while an unambiguous grammar is a formal grammar for which every valid string has a unique leftmost derivation. Many languages admit both ambiguous and unambiguous grammars, while some languages admit only ambiguous grammars. Any nonempty language admits an ambiguous grammar by
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601