SlideShare a Scribd company logo
1 of 2
Dear students get fully solved SMU BBA Spring 2014 assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
SPRING 2014, ASSIGNMENT
PRIGRAM BCA(REVISED 2007)
SEMESTER 5TH
SUBJECT CODE & NAME BC0052 – THEORY OF COMPUTER SCIENCE
CREDIT 4
BK ID B0972
MAX. MARKS 60
Note: Answer all questions. Kindly note that answers for 10 marks questions should be approximately of 400
words. Each question is followed by evaluation scheme.
Q.1Define 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.
Answer:Define g.c.d. (m,n)
The greatest common divisor (gcd), also known as the greatest common factor (gcf), or highest common factor
(hcf), of two or more integers (at least one of which is not zero), is the largest positive integer that divides the
numbers without a remainder. For example, the GCD of 8 and 12 is 4
Q.2 Obtain a DFA to accept strings of a’s and b’s starting with the string ab.
Answer: 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 machine can be written as
Q.3 Prove by mathematical induction.
12
+ 22
+ 32
+------+ n2 = (n(n+1)(2n+1))/6
Answer:- 12
+ 22
+ 32
+------+ n2 = (n(n+1)(2n+1))/6
First of all Identify the general term and nth partial sum before beginning the problem
The general term, an, is the last term on the left hand side. an = n2
The nth partial sum, Sn, is the right hand side. Sn = n (n + 1) (2n + 1) / 6
Q.4 briefly describes Moore and Mealy machines.
Answer: -Describe Moore
An automation system in which the output depends only on the present input is called a Moore machine.
Alternatively, an automaton system in which output depends both on the present input and the present state is
called Mealy machine.
A Moore machine can be defined as a 6-tuple ( S, S0, Σ, Λ, T, G ) consisting of the following:
· A finite set of states ( S )
· A start state (also called initial state) S0 which is an element of (S)
· A finite set called the input alphabet ( Σ )
Q.5 If G = ({ S }, { 0,1}, { S →0S1, S →Ʌ}, S ) then find L(G),
the language generated by G.
Answer:-
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”
Answer:-
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. So the number of edges in
G is n –1 = 1 – 1 = 0.
Induction hypothesis: The statement is true for all trees with less than ‘n’ vertices. Induction step: Now
let us consider a tree with ‘n’ vertices. Let ‘ek ’ be any edge in T whose end vertices are vi and v j.
Since T is a tree, by there is no other path between vI and v
Dear students get fully solved SMU BBA Spring 2014 assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601

More Related Content

What's hot

Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurMid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurVivekananda Samiti
 
Arithmetic progressions /Algebra
Arithmetic progressions /AlgebraArithmetic progressions /Algebra
Arithmetic progressions /Algebraindianeducation
 
CBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progressionCBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progressionPranav Ghildiyal
 
Imc2020 day1&2 problems&solutions
Imc2020 day1&2 problems&solutionsImc2020 day1&2 problems&solutions
Imc2020 day1&2 problems&solutionsChristos Loizos
 
Arithmetic progression
Arithmetic progressionArithmetic progression
Arithmetic progressionChhavi Bansal
 
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurEnd semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurVivekananda Samiti
 
Engr 213 midterm 1b sol 2009
Engr 213 midterm 1b sol 2009Engr 213 midterm 1b sol 2009
Engr 213 midterm 1b sol 2009akabaka12
 
Arithmetic progression
Arithmetic progressionArithmetic progression
Arithmetic progressionMayank Devnani
 
Engr 213 midterm 1b sol 2010
Engr 213 midterm 1b sol 2010Engr 213 midterm 1b sol 2010
Engr 213 midterm 1b sol 2010akabaka12
 
Solution3
Solution3Solution3
Solution3H K
 
3.1 methods of division t
3.1 methods of division t3.1 methods of division t
3.1 methods of division tmath260
 
Engr 213 midterm 1a sol 2010
Engr 213 midterm 1a sol 2010Engr 213 midterm 1a sol 2010
Engr 213 midterm 1a sol 2010akabaka12
 
Differential Equation Tutorial 1
Differential Equation Tutorial 1Differential Equation Tutorial 1
Differential Equation Tutorial 1Yong Sheng
 
Engr 213 final sol 2009
Engr 213 final sol 2009Engr 213 final sol 2009
Engr 213 final sol 2009akabaka12
 
Arithmetic Progression - $@mEe
Arithmetic Progression - $@mEeArithmetic Progression - $@mEe
Arithmetic Progression - $@mEeSamee Smd
 
Complex Numbers 1 - Math Academy - JC H2 maths A levels
Complex Numbers 1 - Math Academy - JC H2 maths A levelsComplex Numbers 1 - Math Academy - JC H2 maths A levels
Complex Numbers 1 - Math Academy - JC H2 maths A levelsMath Academy Singapore
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmeticsangeetha s
 
Longest Common Subsequence
Longest Common SubsequenceLongest Common Subsequence
Longest Common SubsequenceSwati Swati
 

What's hot (20)

Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurMid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 
Arithmetic progressions /Algebra
Arithmetic progressions /AlgebraArithmetic progressions /Algebra
Arithmetic progressions /Algebra
 
CBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progressionCBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progression
 
Imc2020 day1&2 problems&solutions
Imc2020 day1&2 problems&solutionsImc2020 day1&2 problems&solutions
Imc2020 day1&2 problems&solutions
 
Arithmetic progression
Arithmetic progressionArithmetic progression
Arithmetic progression
 
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurEnd semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 
Engr 213 midterm 1b sol 2009
Engr 213 midterm 1b sol 2009Engr 213 midterm 1b sol 2009
Engr 213 midterm 1b sol 2009
 
Arithmetic progression
Arithmetic progressionArithmetic progression
Arithmetic progression
 
Engr 213 midterm 1b sol 2010
Engr 213 midterm 1b sol 2010Engr 213 midterm 1b sol 2010
Engr 213 midterm 1b sol 2010
 
Solution3
Solution3Solution3
Solution3
 
3.1 methods of division t
3.1 methods of division t3.1 methods of division t
3.1 methods of division t
 
Engr 213 midterm 1a sol 2010
Engr 213 midterm 1a sol 2010Engr 213 midterm 1a sol 2010
Engr 213 midterm 1a sol 2010
 
1
11
1
 
Differential Equation Tutorial 1
Differential Equation Tutorial 1Differential Equation Tutorial 1
Differential Equation Tutorial 1
 
Engr 213 final sol 2009
Engr 213 final sol 2009Engr 213 final sol 2009
Engr 213 final sol 2009
 
Arithmetic Progression - $@mEe
Arithmetic Progression - $@mEeArithmetic Progression - $@mEe
Arithmetic Progression - $@mEe
 
Complex Numbers 1 - Math Academy - JC H2 maths A levels
Complex Numbers 1 - Math Academy - JC H2 maths A levelsComplex Numbers 1 - Math Academy - JC H2 maths A levels
Complex Numbers 1 - Math Academy - JC H2 maths A levels
 
Maths 301 key_sem_1_2009_2010
Maths 301 key_sem_1_2009_2010Maths 301 key_sem_1_2009_2010
Maths 301 key_sem_1_2009_2010
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmetic
 
Longest Common Subsequence
Longest Common SubsequenceLongest Common Subsequence
Longest Common Subsequence
 

Similar to Bc0052 theory of computer science

555_Spring12_topic06.ppt
555_Spring12_topic06.ppt555_Spring12_topic06.ppt
555_Spring12_topic06.pptSnehSinha6
 
Bca1030 basic mathematics
Bca1030  basic mathematicsBca1030  basic mathematics
Bca1030 basic mathematicssmumbahelp
 
Stochastic Processes Homework Help
Stochastic Processes Homework HelpStochastic Processes Homework Help
Stochastic Processes Homework HelpExcel Homework Help
 
5.3 dynamic programming 03
5.3 dynamic programming 035.3 dynamic programming 03
5.3 dynamic programming 03Krish_ver2
 
Bca3010 computer oriented numerical methods
Bca3010   computer oriented numerical methodsBca3010   computer oriented numerical methods
Bca3010 computer oriented numerical methodssmumbahelp
 
2018 mtap for g10 with answers
2018 mtap for g10 with answers2018 mtap for g10 with answers
2018 mtap for g10 with answersJashey Dee
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfShiwani Gupta
 
Arithmetic progressions - Poblem based Arithmetic progressions
Arithmetic progressions - Poblem based Arithmetic progressionsArithmetic progressions - Poblem based Arithmetic progressions
Arithmetic progressions - Poblem based Arithmetic progressionsLet's Tute
 
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1AraceliLynPalomillo
 
Bt0069 discrete mathematics
Bt0069   discrete mathematicsBt0069   discrete mathematics
Bt0069 discrete mathematicssmumbahelp
 
Chapter1.integer s.y.b.c.s
Chapter1.integer s.y.b.c.sChapter1.integer s.y.b.c.s
Chapter1.integer s.y.b.c.svidyabhoge1
 
Question bank -xi (hots)
Question bank -xi (hots)Question bank -xi (hots)
Question bank -xi (hots)indu psthakur
 
Bca3010 computer oriented numerical methods
Bca3010  computer oriented numerical methodsBca3010  computer oriented numerical methods
Bca3010 computer oriented numerical methodssmumbahelp
 
Assessments for class xi
Assessments  for class  xi Assessments  for class  xi
Assessments for class xi indu psthakur
 
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...Aladdinew
 
Bca3010 computer oriented numerical methods
Bca3010 computer oriented numerical methodsBca3010 computer oriented numerical methods
Bca3010 computer oriented numerical methodssmumbahelp
 

Similar to Bc0052 theory of computer science (20)

555_Spring12_topic06.ppt
555_Spring12_topic06.ppt555_Spring12_topic06.ppt
555_Spring12_topic06.ppt
 
Bca1030 basic mathematics
Bca1030  basic mathematicsBca1030  basic mathematics
Bca1030 basic mathematics
 
sdfsdf
sdfsdfsdfsdf
sdfsdf
 
Stochastic Processes Homework Help
Stochastic Processes Homework HelpStochastic Processes Homework Help
Stochastic Processes Homework Help
 
5.3 dynamic programming 03
5.3 dynamic programming 035.3 dynamic programming 03
5.3 dynamic programming 03
 
factoring
factoringfactoring
factoring
 
Bca3010 computer oriented numerical methods
Bca3010   computer oriented numerical methodsBca3010   computer oriented numerical methods
Bca3010 computer oriented numerical methods
 
2018 mtap for g10 with answers
2018 mtap for g10 with answers2018 mtap for g10 with answers
2018 mtap for g10 with answers
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdf
 
Advance algebra
Advance algebraAdvance algebra
Advance algebra
 
Arithmetic progressions - Poblem based Arithmetic progressions
Arithmetic progressions - Poblem based Arithmetic progressionsArithmetic progressions - Poblem based Arithmetic progressions
Arithmetic progressions - Poblem based Arithmetic progressions
 
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
 
Imc2017 day1-solutions
Imc2017 day1-solutionsImc2017 day1-solutions
Imc2017 day1-solutions
 
Bt0069 discrete mathematics
Bt0069   discrete mathematicsBt0069   discrete mathematics
Bt0069 discrete mathematics
 
Chapter1.integer s.y.b.c.s
Chapter1.integer s.y.b.c.sChapter1.integer s.y.b.c.s
Chapter1.integer s.y.b.c.s
 
Question bank -xi (hots)
Question bank -xi (hots)Question bank -xi (hots)
Question bank -xi (hots)
 
Bca3010 computer oriented numerical methods
Bca3010  computer oriented numerical methodsBca3010  computer oriented numerical methods
Bca3010 computer oriented numerical methods
 
Assessments for class xi
Assessments  for class  xi Assessments  for class  xi
Assessments for class xi
 
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
Solutions Manual for An Introduction To Abstract Algebra With Notes To The Fu...
 
Bca3010 computer oriented numerical methods
Bca3010 computer oriented numerical methodsBca3010 computer oriented numerical methods
Bca3010 computer oriented numerical methods
 

Bc0052 theory of computer science

  • 1. Dear students get fully solved SMU BBA Spring 2014 assignments Send your semester & Specialization name to our mail id : “ help.mbaassignments@gmail.com ” or Call us at : 08263069601 SPRING 2014, ASSIGNMENT PRIGRAM BCA(REVISED 2007) SEMESTER 5TH SUBJECT CODE & NAME BC0052 – THEORY OF COMPUTER SCIENCE CREDIT 4 BK ID B0972 MAX. MARKS 60 Note: Answer all questions. Kindly note that answers for 10 marks questions should be approximately of 400 words. Each question is followed by evaluation scheme. Q.1Define 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. Answer:Define g.c.d. (m,n) The greatest common divisor (gcd), also known as the greatest common factor (gcf), or highest common factor (hcf), of two or more integers (at least one of which is not zero), is the largest positive integer that divides the numbers without a remainder. For example, the GCD of 8 and 12 is 4 Q.2 Obtain a DFA to accept strings of a’s and b’s starting with the string ab. Answer: 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 machine can be written as
  • 2. Q.3 Prove by mathematical induction. 12 + 22 + 32 +------+ n2 = (n(n+1)(2n+1))/6 Answer:- 12 + 22 + 32 +------+ n2 = (n(n+1)(2n+1))/6 First of all Identify the general term and nth partial sum before beginning the problem The general term, an, is the last term on the left hand side. an = n2 The nth partial sum, Sn, is the right hand side. Sn = n (n + 1) (2n + 1) / 6 Q.4 briefly describes Moore and Mealy machines. Answer: -Describe Moore An automation system in which the output depends only on the present input is called a Moore machine. Alternatively, an automaton system in which output depends both on the present input and the present state is called Mealy machine. A Moore machine can be defined as a 6-tuple ( S, S0, Σ, Λ, T, G ) consisting of the following: · A finite set of states ( S ) · A start state (also called initial state) S0 which is an element of (S) · A finite set called the input alphabet ( Σ ) Q.5 If G = ({ S }, { 0,1}, { S →0S1, S →Ʌ}, S ) then find L(G), the language generated by G. Answer:- 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” Answer:- 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. So the number of edges in G is n –1 = 1 – 1 = 0. Induction hypothesis: The statement is true for all trees with less than ‘n’ vertices. Induction step: Now let us consider a tree with ‘n’ vertices. Let ‘ek ’ be any edge in T whose end vertices are vi and v j. Since T is a tree, by there is no other path between vI and v Dear students get fully solved SMU BBA Spring 2014 assignments Send your semester & Specialization name to our mail id : “ help.mbaassignments@gmail.com ” or Call us at : 08263069601