CBSE Board Class 10 Previous Year Maths Paper 2007 Solution
Bc0052 – theory of computer science
1. Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )
WINTER 2013, ASSIGNMENT
DRIVE WINTER 2014
PROGRAM BACHELOR OF COMPUTER APPLICATION
SUBJECT CODE & NAME BC0052 – THEORY OF COMPUTER SCIENCE
SEMESTER 5TH SEM
CREDITS 4
MAX. MARKS 60
BK ID B0972
Answer all questions
Q.1. Define g.c.d. (m,n) Solve recursively: (i) f(x, y) = x + y, (ii) g(x, 0) = 0, g(x, y + 1) = g(x, y) + x.
[3+3.5+3.5] =10
ANS:
Definition: If m and n are two non-negative integers then the (greatest common divisor) g.c.d. (m, n)
is defined as the largest positive integer d such that d divides both m and n. Euclidean algorithm
computes the greatest common divisor (g.c.d.) of two non negative integers.
Q.2. Obtain a DFA to accept strings of a’s and b’s starting with the string ab. [10] =10
ANS:
A DFA to accept strings of a’s and b’s starting with the string ab.:
Solution: It is clear that the string should start with ab and so, the minimum string that can be
accepted by the machine is ab. To accept the string ab, we need three states and the
Q.3. Prove by mathematical induction. [10] =10
2. ANS:
Solution:
Therefore the result is true for n=m+1. Hence by mathematical induction the given result is true for
all positive integers n.
Q.4. Briefly describe Moore and Mealy machines. [10] =10
ANS:
Moore and Mealy Machines: The automaton systems we have discussed so far are limited to
binaryoutput. That is, the systems can either accept or do not accept a string. In those systems, this
acceptability is decided based on the reachability from the initial state to the final state. This
property
Q.5. If G= ({ S}, { S->0S1, S->^}, S) t then find L(G), the language generated by G. [10] =10
ANS:
Solution:
Since S®^ is a production, S=>^. This implies that ^ € L(G)
Now, for all n≥1, we can write the following:
S=>0S1=>00S11...=>0n
S1n
=> 0n
1n
Therefore, 0n
1n
€ L(G).
Q.6. Prove that “A tree G with n vertices has (n–1) edges” [10] =10
ANS:
Proof : We prove this theorem by induction on the number vertices n.
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )