POKHARA UNIVERSITY Level: Bachelor Semester – Fall Programme: BE Course: Mathematical Foundation of Computer Science Year : 2005 Full Marks: 100 Time : 3hrs. Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks. Attempt all the questions. 1. a) The sequence an is defined by a0 = 2, a1=1, an+2 = an+1 + 2an. Prove by double induction that an = 2n + (-1) n. 5 b) Show that ( p q) ( P q) is a tautology. 5 c) Show that existentially quantified statement for some positive integer number x, if x is a prime number, then x + 1, x +2, x+ 3 and x + 4 can not be prime numbers. 5 2. a) Give a direct proof of the theorem ''If n is odd, then n2 is odd.'' 7 b) Give an argument using rules of inference to show that the conclusion follows from the hypothesis. Hypothesis: If Hari takes photograph, then Ramesh will be happy and Shyam will call Suman. Ramesh in unhappy. Conslusion: Hari did not take any photographs and Ramesh is happy. 8 3. a) Solve the recurrence relations an – 6an-1 + 8an-2 = 3 where a0 = 10 and a1 = 25 8 b) Solve the recurrence relation an = (an-1. an-2)½ with initial conditions a0 = 1 and a1 = 2. 7 4. a) Find the shortest path from a to z in the following weighted graph based on DIJKSTRA's algorithm. 7 b) If G is a connected planner graph with edges e, vertices v and faces of f then show that f = e –v + 2 8 5. a) A salesman has to deliver supplies to five cities and return to his starting point. The distance from A to B, C and D are 100, 50 and 110 miles respectively and from E to B and C are 80 and 100 miles respectively. C is 90 miles away from both B and D and these last two are just 20 miles apart. There are no direct routes from E to A or D. What is the salesman's shortest route? 8 b) If G is a connected Planner simple graph with e edges, v vertices where v 3, then show that e 3v – 6. 6. a) Find the language L (G) over, {a, b, c} generated by the grammar G with productions. S → aSb, aS → Aa and Aab → c b) Draw the transition diagram of finite state machine with 7 7 8 I = {a, b}, O = {0, 1}, S = { 0 , 1 } F I G a b a b 0 0 1 0 1 1 1 1 1 0 S 7. Write short notes on the following: a) Define context sensitive grammar b) Rules of inference for propositions c) Linear recurrence relation d) A complete bi-partite graph e) Principle of Mathematical Induction 2×5