VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : I / II Subject Code : CP7201 Subject Name : THEORETICAL FOUNDATIONS OF COMPUTER SECIENCE Degree & Branch : M.E – C.S.E. Staff in charge : Dr.A.ELUMALAI UNIT-I: Foundations PART-A 1. Define Set and give an example 2. Define Composite function and give an example. 3. Show that f ( x, y ) = x y is a primitive function 4. Use Mathematical induction to prove that 1 + 2 + 2 2 + ....2 n = 2 n+1 − 1, n ≥ 0 . 5. How many five different letter words can be formed out of the word LOGRITHMS? 6. State Pigeonhole principle 7. Solve the recurrence relation S(k)-10S(k-1)+9S(k-2)=0 , k ≥ 0 ,S(0)=5 and S(1)=1. 8. Define Elements. 9. Show that every finite set is primitive recursive. 10. What is mean by Mathematical Induction? 11. Give an example for structural induction 12. What are the features of the recurrence relation 13. Define partial recursive. 14. Define partially ordered set. 15. Define an equivalence relation 16. How many permutations are there on the set A={1, 2,3,4,5}. k 17. Prove by induction on n that ∑ 2k − 1 = n 2 1 18. What is composition of function 19. Explain recursive algorithms 20. Define recursively the fractional function. PART-B 1. (i)Let A,B, C be any three sets, then show that A ∩ ( B − C ) = ( A ∩ B ) − ( A ∩ C ) (ii) Let S = {1,2,3,4,5} and A = SxS define the following relation R on A such that (a, b) R(a ′, b ′) if and only if ab′ = a ′b .Show that R is an equivalence relation. 2. (i) Draw the Hasse diagram for the Poset ( A, ⊆ ) where A denote the power set of set {a,b,c} 3 3 3 (ii) State and prove the principle of M.I and use it to prove that n + (n + 1) + (n + 2) is divisible by 9 for all n ≥ 0 3. Let f ( x) = x + 2, g ( x) = x − 2 , h( x) = 3 x for x ∈ R , the set of all real numbers. Find f o g , g o f , f o f , g o g , f o h , h o g , h o f and f o h o g 4. (i) Define Poset and consider a set A= {1,3,5,7,15,21,35,105} and let ≤ be a relation division on A, prove that A is a Poset (ii) Show that the function f ( x, y ) = x − y is partial recursive function n(n + 1)(n + 2) 2 2 2 2 5. (i) Use Mathematical induction to prove that 1 + 2 + 3 + ...... + n = 6 (ii)Write the recurrence relation for Fibonacci sequence and hence solve it. 6. (i) State and prove the Pigeonhole principle and if any eleven numbers from 1 to 20 are Chosen, the two of them will have up to 21. (ii) Solve S(k)-4S(k-1)+4S(k-2)= 3k+ 2 k with k ≥ 2 and S(0)=1,S(1)=1 7. (i) State and explain the operations on sets with examples (ii) State the properties of binary relations with examples. 8. (i)Explain the set operations in details (ii)Briefly explain the Recursively defined functions with example. 9. (i) Define Induction. Explain the principles of induction. (ii) Write a Merge Sort Algorithm and explain with example. 10. After explaining the basics of pigeonhole principle, prove it. There are 50 baskets of apple. Each basket contains no more than 24 apples. Show that using the pigeonhole principle, there are at least 3 baskets containing the same number of apples. UNIT-II : Logic and Logic Programming Foundations PART-A 1. Write the syntax of the Propositional Logic. 2. What is the significance of deduction theorem? 3. What is the difference between Disjunctive and Conjunctive Normal forms? 4. Define SAT solvers. 5. Define Binary decision diagrams. 6. Explain semantics of predicate logic 7 .What are inference rules 8. Explain undecidability of predicate logic 9. Define conditional and Bi conditional statements 10. Construct the truth table for P Q Q P 11. Define Conjunctive Normal form. 12. Show that P → Q and ¬P ∨ Q are logically equivalent 13. State the deduction theorem on the premises. 14. Define SAT solver and draw the parse tree of p ∧ ¬¬(¬q ∧ ¬¬p ) 15. Define Unification 16. Explain Unification Algorithm 17. What is Logic Programming? 18. Define SLD resolution. 19. State Skolem Theorem 20. Define SLDNF resolution. PART-B 1. (i) Show that (¬P ∧ (¬q ∧ r ) ∨ ( q ∧ r ) ∨ ( p ∧ r ) ⇔ r (ii) Using truth tables that show that (( P → Q ) → R ) → (( P → Q ) → ( P → R )) is a tautology. 2. (i) State the rules of Inference (ii) Show that the given premises P → Q, P → R, Q → ¬R, P are inconsistent. 3. (i) Find the PCNF if possible (¬p → r ) ∧ ( p ↔ q) (ii) Explain Min terms and max terms with examples. 4. (i) Compute CNF(NNF(IMPL-FREE( (¬p ∧ q → p ∧ (r → q )))) (ii) Show that the following premises is inconsistent(i) If Vijay misses many classes, then he fails in ME. (ii) If Vijay fails in ME, then he is unemployed (iii) If Vijay appears for lot of interviews, then he is not unemployed(iv) Vijay misses many classes and appears for lot of interviews. 5. (i) Show that R ∧ S can be derived from the premises P → Q, Q → ¬R, R, P ∨ ( R ∧ S ) (ii) Show that the following premises are inconsistent: (I) If Jack misses many classes through illness, then he fails high school. (II) If Jack fails high school, then he is uneducated (III) If Jack reads a lot of books then he is not uneducated (IV) Jack misses many classes through illness and reads a lot of book 6. (i) Explain the semantics of propositional logic (ii) Briefly explain the operations in first order logic with example. 7. (i) Explain in detail about Skolemization (ii) What is meant by Prolog? Explain the Model Elimination in detail. 8. Explain Binary decision diagrams with suitable example. 9. Write short notes on (i) Prolog (ii) Predicate logic. 10. Explain Inferences in the first order logic in details. UNIT-III- Lambda Calculus and Functional Programming PART-A 1. Define Lambda calculus 2. Evaluate the following Lambda expression (λx.λy.( yx) λp.λq. p) λ i.i ) 3. Define curried function 4. Define Lambda expressions 5. What is functional programming? 6. Write short notes on Lambda Calculus 7. What is meant by Recursion? 8. What do you mean by parametric polymorphism? 9. Define identity function of Lambda calculus 10. Define occurrence of free 11. Define occurrence of bound 12. What is meant by Subtraction? 13. Define alpha reduction 14. Define beta deduction 15. State Church-Rosser theorem 16. Explain pure Lambda calculus 17. State extensionality theorem 18. Explain normal form of Lambda calculus 19. Define conditionals of Lambda calculus 20. What is functional programming on lambda calculus PART-B 1. Explain functions from functions of Lambda calculus 2. Explain curried and un curried functions with example. 3.(i)Write a brief note on Free and Bound variables (ii) Remove any name clashes in the expressions λa.(λb.aλb.(λa.ab)) 4. Explain the Recursive Arithmetic Operations in detail with example 5. Explain functional programming in detail. 6. Define functions to test whether or not a number is less than, or less than or equal to another number def less xy=…: def less_or_equal xy =… Evaluate(i) less three two (ii) less two three (iii) less two two (iv) Less_or_equal three two(v) less_or_equal two three. 7.(i) Discuss about the static and Dynamic type checking with example (ii) Briefly explain the Beta reduction Scheme. 8. (i) Explain the syntax of the Lambda calculus (ii) Write a short note on curried function 9. Translate these “let” expressions into lambda expressions and reduce them. Also write the expressions using” where” instead of “let”. (i) Let x=5 in let y=(add x 3) in (mul x y) (ii) Let a=7 in let g= λ x .(mul a x) in let a= 2 in ( g 10) 10. Explain Constants in the pure Lambda calculus. UNIT-IV- Graph Structures PART-A 1. How many edges are there in a graph with 10 vertices each of degree 5? 2. Define regular graph, can a regular graph be a complete graph? 3. Define random graph. 4. Define clique and give an example 5. What do you mean by chromatic number? 6. Explain Networks of a graph. 7. Define strongly connected graph. 8. Define matching and give an example. 9. Define the term Pseudo Graphs 10. Write a Simple Algorithm to Insert a New Item into a Binary Search Tree 11. What is the chromatic number of K m and C n ? 12. Define isomorphism between two graphs. 13. Define Cycle in a graph 14. Find a Hamiltonian cycle in the graph formed by the vertices and edges of an ordinary cube 15. Define coloring of a graph 16. Define spanning tree 17. Define Independent sets of graphs 18. What is meant by Matching? 19. Explain network flows 20. Define rooted tree. PART-B 1. (i) Prove that a simple graph with n vertices and k components can have at most {(n-k)(n-k+1)}/2 edges. (ii) Define digraph and give an example 2. (i) Prove that a tree with n vertices has (n-1) edges. (ii) Give examples for a Hamiltonian graph and not a Hamiltonian graph. 3. (i) Prove that a simple graph with n vertices must be connected if it has more than (n-1)(n-2)/2 (ii) For any graph G, prove that k ≤ λ ≤ δ , where δ is the minimum degree of vertices in G 4. (i) Explain adjacency matrix and incidence matrix with suitable examples. (ii)Let G be a simple graph with minimum degree of at most two, prove that there exists a cycle in G 5. (i) Find the self complementary graph with five vertices. (ii).Define coloring of a graph 1 0 0 0 0 0 1 1 1 0 1 0 1 0 (iii)Draw the graph whose incidence matrix is given below [ 0 1 1 0 0 0 0] 0 0 1 1 1 0 0 0 0 0 0 1 1 1 6. (i) Define a complete graph K n , Draw a complete graph K 6 .What is the edges of each Vertex in K n ? .What is the total number of edges in K n ? (ii) Let G be an undirected graph, then G is bipartite if and only if it contain no odd cycle ⎛n⎞ 7. (i) If G is a simple graph with n vertices with minimum δ (G ) ≥ ⎜⎜ ⎟⎟ ,show that G is ⎝2⎠ Connected. (ii) What is a graph said to be self-complementary? Prove that if G is a self Complementary then it has 4n or 4n+1 vertices. 8. (i) Explain the various types of Grapg Models in detail (ii) Write a brief note on Isomorphism of graphs 9. (i) Explain the application of Tree in detail (ii) Briefly explain the Depth First Search Algorithm. 10. Explain the Kruskal’s algorithm with example UNIT-V- State Machines PART-A 1. What is meant by a finite-state machine? 2. Define ambiguous grammar 3. What are the four part of a grammar? 4. What are the types of FSM? 5. Find the grammar that generate the language L = 0 n 1 0 n / n ≥ 0 6. What are the main goals of complexity? 7. Define time complexity and space complexity. 8. Define regular grammar 9. Define Deterministic and Non -deterministic finite state machine. 10. Define computability 11. List out the types of Phrase-structure grammars { } 12. Write short notes on computability Function 13. What is a Turing machine? 14. Define next state function for a non-deterministic finite Automation 15. Define finite Automation 16. Construct a context free grammar to generate the Language L = a n b n / n ≥ 1 17. Define decidability 18. What are the types of grammars? 19. What is a context-sensitive grammar? Why is it called so?. 20. State the Church-Turing thesis. { } PART-B 1. (i) Draw the digraph of the machine whose state transition table is shown below. Label the edges with appropriate inputs a b c s0 s0 s1 s2 s1 s2 s1 s1 s2 s1 s1 s2 s3 s2 s0 s1 (ii) Define non-deterministic finite automata with an example and also define the language accepted by NFA.. 2. Explain in detail about Turing Machines { } n n n 3. Construct a grammar generating L = a b c ; n ≥ 1 4. (i) Explain the different types of grammars (ii) Define Transition Diagrams and Transition tables with examples. 5. (i)Find the language L(G) generated by the grammar G = {{S , A},{a, b}, P, S } where P{(s → a A a), ( A → b A b), ( A → a)} (ii) Prove that the set [0,1] is countable 6. (i) State and prove RICE’ s Theorem (ii)Describe the relationship between space complexity and time complexity. 7. (i) What is meant by Finite State Automata? Explain its function in detail (ii)Explain the various types of Turing machines 8. (i) Explain the Computational Complexity and Computability in detail (ii)Briefly explain the Church –Turing Thesis { } 9. Design a Turing machine that accepts L = a n b n | n ≤ 0 10. Write short notes on (i) Finite state machines (ii) Computational complexity in state machines.
© Copyright 2024