Friday, 26 September 2014

bc0052 smu bca summer 2014 V sem assignment

Get fully solved assignment, plz drop a mail with your sub code
computeroperator4@gmail.com
Charges rs 125/subject and rs 700/semester only.
our website is www.smuassignment.in
if urgent then call us on 08791490301, 08273413412

PROGRAM-BACHELOR OF COMPUTER APPLICATION
SEMESTER-5TH SEM
SUBJECT CODE & NAME
BC0052 – THEORY OF COMPUTER SCIENCE
CREDIT-4
BK ID-B0972
MAX. MARKS-60

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
 
ANS: 

Solution:


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 binary output. 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 of the system produces restrictions in choosing outputs from some other alphabet, then output. You

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...=>0nS1n => 0n1n

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.

Basic step:

 If n = 1, then G contains only one vertex and no edge.
Get fully solved assignment, plz drop a mail with your sub code
computeroperator4@gmail.com
Charges rs 125/subject and rs 700/semester only.
our website is www.smuassignment.in
if urgent then call us on 08791490301, 08273413412


No comments:

Post a Comment