Choose 1 answer A.(I) B.(IV) C.None of the other choices is correct D.(III) E. (II) Find the negation of proposition ∃π₯∀π¦(π(π₯, π¦) → π(π₯, π¦)). (i) ∀π₯∃π¦(¬π(π₯, π¦) ∧ π(π₯, π¦)). (ii) ∀π₯∃π¦(π(π₯, π¦) ∧ ¬π(π₯, π¦)). (iii) ∃π₯∀π¦(¬π(π₯, π¦) ∧ π(π₯, π¦)). A.(iii) B.(ii) C.(I) Find a proposition with the given truth table A.1024 B.516 C.625 D.1250 p q ? T T F T F F F T T F F T (I) (¬π ∧ π) ∨ (¬π ∧ ¬π) (II) ¬π ∧ π (III) π ∨ (¬π ∧ ¬π) Give the algorithm Procedure LT(n, x : integer) n=(ππ ππ−1 … π0 )2 { the binary expansion of n} p:=1; for i:=0 to k do if ππ = 1 then p:=p*x; x:=x*x; Print(p) If n = 5, x = 4, what is the output of the algorithm A.8 B.None of the other choices is correct C.11 D.10 E.7 F.9 What is the position of the letter f when using the inorder traversal A B C H E D F G L J K I M A.(IV) B.(II) C.(I) D.(III) Let a = 137 mod 31 and b = -137 mod 31. Find b – a N O P Which graph has Hamilton circuits but no Euler circuits? (πΌ) πΎ4 (πΌπΌ)π4 (πΌπΌπΌ)πΆ4 (πΌπ)πΎ3 A. B. C. D. E. A. B. C. D. A. B. C. D. E. 5 -7 23 -13 17 1 and 1 0 and 0 1 and 0 0 and 1 g h g and h f and g None of the other choices is correct Let π1 , π2 … ππ π‘βπ π πππ’ππππ 0,1,1,0,0,0,1,1,1,1,… Find π99 πππ π100 . Let N = {0,1,2,3,…} Which of the following functions are onto from N to N How many strings of three decimal digits have exactly two digits that are 4s a. 27 b. 28 c. 29 d. 30 How many cut vertices and cut edges in this graph? a. 5 and 5 b. 5 and 6 c. 6 and 6 d. 7 and 6 Decode the message 110111010 encode by the scheme f: 10, p: 110, t: 1110 a. ptf b. fpt c. tpf d. pft e. None of the other choices is correct a. (II) b. (III) c. None of the choices is correct d. (I) Determine the complexity of the algorithm in tems of the number of comparisons Procedure thuattoan(π1 , π2 … , ππ : πππ‘πππππ ) k:=0 for i:=1 to n do if ππ < 0 the k:=k+1 Print(k) (I) O(n) A. B. C. D. E. 5 8 9 None of the other choices is correct 6 How many divisions are needed when using Euclidean algorithm to find the greatest common 3111 and 3135 A. 4 B. 5 C. 6 D. 7 A. (i) B. (iii) C. (iv) D. None of the other choices E. (v) F. (ii) a. b. c. d. (ii) (i) None of the other choices is correct (iii) a. b. c. d. (ii) (iii) (i) (iv) A. B. C. D. E. (ii) (iii) None of the other choices is correct (i) (iv) Using Prim’s to find a minimal spanning tree. What is the list of edges chosen? a. CE,BC,AB,DZ,EZ b. CE,BC,AB,BD,DZ c. None of the other choices is correct d. AB,BC,CE,BD,DZ e. CE,BC,AB,EZ,DZ A. 3 B. 1 C. 2 D. 0 (II) O(logn) (III) O(1) Give the recursive algorithm ---------------------------------------------------------Procedure T(a: real number, n: nonnegative integer) if n=0 then return 1 else return a*T(a,n-1) ----------------------------------------------------------------Find output if a = 2, n = 3. Let p and q be propositions. Which proposition is logically equivalent to ¬π → π ? (i) ¬π → π (ii) π → π (iii) π ∨ ¬π (iv) π ∨ π (v) π ∧ π Which of the following is a function? (i) π: π → π, π(π) = √π (ii) π: π → π , π(π) = √π (iii) π: π → π, π(π) = √π Which of the following sets is the power set {a, ∅} (i) {∅, {π}, {∅, π}} (ii) {∅, {π}, {∅}, {π, ∅}} (iii) {∅, {π}, {∅}, {π, {∅}}} (iv) {∅, {π, ∅}} Find the postfix notation for the expression (π₯ − π¦)2 + π₯(π¦ + 5) (i) π₯π¦ − 2 ↑ π₯π¦5 +∗ + (ii) +↑ −π₯π¦2 ∗ π₯ + 5π¦ (iii) π₯ − π¦ ↑ 2 + π₯ ∗ π¦ + 5 (iv) +↑ −π₯ π¦ 2 ∗ π₯ + π¦ 5 Let M be the incidence matrix of the given graph that vertices indexed by v1, v2, v3, v4, and the columns indexed by e1, e2, e3, e4. What is the sum of the entries in the fourth row of M? e1 v1 e2 v3 A.3 B.8 C.6 D. None of the choices is correct E. 7 A. None of the other choices is correct B. (iv) C. (i) D. (iii) E. (ii) a. 13 b. None of the other choices is correct c. 11 d. 9 e. 8 Find the length of the shortest path from a to z What is the maximum height of a full binary tree with 101 vertices a. 50 b. 100 c. 6 d. 101 e. None of the other choices is correct a. 2 b. 1 c. 0 d. 3 e. 4 Find a if LCM(a,4200)=58800 and GCD(a,4200)=280 a. 11760 b. 784 c. 1960 d. 3920 a. {1,2,3,4,5,6,8} b. {1,2,3,4,5,} c. {1,2,3,4,5,8} d. {0,1,2,3,4,5,6} e3 v2 e4 v4 Let m = 210 + 29 Find 3π πππ 11 Find the binary expansion of the 243 (i) (11110010)2 (ii) (11100010)2 (iii) (11010011)2 (iv) (11110011)2 Find the smallest integer n such that the following function is π(π₯ π ) [π₯ log π₯] + [π₯ + log π₯] Let A={0,2,4,6,8,10}, B={1,2,3,4,5,6} and C={1,2,3,4,5,7,8,9}. Find (π΄ ∪ π΅) ∩ πΆ. Let U={a,b,c,d,e,f,g,h,I,j}. Let P be the subset of U whose bit string representation is the subset of U whose bit string representation is 0100110111. Find the intersection of P and A. {b,e,h,i} B. {b,e,h,I,j} C. {c,f,g,j} D. E. A. B. C. D. E. {c,f,g,h,j} None of the other choices is correct (iv) (ii) (iii) (i) None of the other choices is correct Which number is congruent to 10 modulo 17 a. 90 b. 80 c. 85 d. 95 e. None of the other choices is correct a. None of the other choices is correct b. 110000 c. 111101 d. 101100 e. 001101 Let G be a simple graph whose vertices are of degree 3. If G has 15 edges, how many vertices a. 10 b. 20 c. 5 d. 25 e. Such G does not exist a. (i) b. None of the other choices is correct c. (ii) d. (iv) e. (iii) Find the negation of the proposition ∃π₯(π(π₯) → π(π₯)) (i) ∀π₯(π(π₯) → π(π₯)) (ii) ∀π₯(¬π(π₯) → π(π₯)) (iii) ∀π₯(¬π(π₯) ∧ π(π₯)) (iv) ∀π₯(¬π(π₯) ∧ ¬π(π₯)) Find the value of the expression (101101 ∨ 110001) β¨ 001101 a. b. c. d. e. 27 26 28 None of the other choices 25 Find π(5), if π(π) is defined recursively by π(0) = −1, π(1) = 2 and π(π + 1) = π(π) + 5π(π − 1) πππ π = 1,2,3, … a. b. c. d. e. (iii) (ii) (iv) (i) None of the other choices Let P(n) be the statement ”3n=0”. The domain consists of all non-negative integer. A proof of ∀ππ(π) is as follows: (i) P(0) is clearly true. (ii) Assume that P(0),…,P(k) are true for some non-negative integer k. (iii) Write k+1=i+j for some integer, j with 0 ≤ π, π ≤ π (iv) We have: 3(k+1)=3i+3j=0+0=0, as P(i), P(j) are true. So P(k+1)=0. By strong induction, we conclude ∀ππ(π). How many edges in a full 3-ary tree with 101 leaves? a. 102 b. c. d. e. a. b. c. d. 150 None of the other choices is correct 101 97 (iii) (ii) (i) (iv) a. All n> 2 and odd b. All>2 c. All n>2 and even d. None of the other choices is correct Which sequence can be the degree sequence of a simple graph? A. 2,2,3,3,4,4 B. 2,2,4,4,5,5 C. 0,1,2,3,4,5 D. 1,1,1,2,2,2 E. 1,1,2,2,4,4,6 a. (iv) b. (i) c. (ii) d. None of the other choices is correct e. (iii) A. B. C. D. E. None of the other choices is correct (iii) (iv) (ii) (i) Given the Binary search algorithm Input = 2,4,5,7,8,9,10,13 and x = 11, after the third time of diving into sublists. The sublist to be considered is_______ a. 13 b. 10 c. 9. 10 d. 10. 13 Given the recursive algorithm that computes the n-th Fibonacci number Procedure F(n: natural number) If n = 0 then F(n):=0 Else If n = 1 then F(n):= 1 Else F(n):= F(n-1) +F(n-2); Let T(n) be an increasing function such that T(n) =2T(n/2) + 1 Chosen the best answer. (i) T(n)=O(n) (ii) T(n)=O(logn) (iii) T(n)=O(π2 ) (iv) T(n)=O(π3 ) For which n>2 does the graph ππ have Euler circuits Let P(x)=”x is a freshman” Q(x)=”x takes Dmath 1”, where the consists of all students in a university. Translate the sentence into logical expression: “Every freshman must take Dmath 1”. (i) ∀π₯(π(π₯) ∧ π(π₯)) (ii) ∀π₯(π(π₯) → π(π₯)) (iii) ∃π₯(π(π₯) ∧ π(π₯)) Given the set π ⊆ π defined recursively as follows: Basis step: 4,6 ∈ π , −π ∈ π Recursive step: If π, π ∈ π π‘βππ { π+ π ∈ π (i) π = { π π π β£ π πππ£ππ ππππ ππ¦ 2} (ii) π = {π ∈ π β£ π πππ£ππ ππππ ππ¦ 3} (iii) π = {π ∈ π β£ π πππ£ππ ππππ ππ¦ 4 How many additions are used if n = 6? a. 8 b. 7 c. 9 d. 12 e. None of the other choices is correct Which of the following is NOT a circuit in this graph? a. A-B-C-D-F-B-A b. C-D-E-F-B-A-C c. B-A-D-E-F-B d. E-F-B-A-D-E e. D-B-F-E-D What is the average number of bits used for one character when using Huffman coding to encode message “mathematic”? a. 2.8 b. 2.2 c. 2.6 d. None of the other choices is correct e. 2.4 a. (ii) b. (iv) c. (iii) d. None of the other choices is correct e. (i) Consider the argument with the hypotheses: “ I will be happy if your project succeeds. Your project can become successful only if you change the method.” And the conclusion: “ Therefore, if you change the method, then i will very happy.” Chosen the right answer. a. The argument is valid using hypothetical syllogism b. The argument is invalid c. The argument is valid using modus tollens d. The argument is valid using simplification e. The argument is valid using modus ponens Using depth-first search to produce a spanning tree for the given simple graph and assume that the vertices are ordered alphabetically. Choose the vertex A as the root of this spanning tree. What is the spanning tree that we obtain? a. (i) b. (ii) Let m,n be integer. Translate the sentence into a logical expression “ Each integer is either odd or even” (I) ∀π ∀π[(π = 2π + 1) ∨ (π = 2π)] (II) ∀π ∃π[(π = 2π + 1) ∨ (π = 2π)] (III) ∃π ∃π[(π = 2π + 1) ∨ (π = 2π)] (IV)∃π ∀π[(π = 2π + 1) ∨ (π = 2π)] c. d. e. a. b. c. d. e. a. b. c. d. e. (iii) (iv) None of the other choices is correct None of the other choices is correct 3 6 12 2 None of the other choices is correct. 123 127 121 125 Given π = {∅, {∅}, {π, π}, π}, π = {π₯, {π§, π§}, π₯} How many one-to-one functions are there from Y to X Given a sequence {ππ } satisfying the recurrence relation. π0 = − 1, ππ = ππ−1 + 2π πππ π = 1,2, … Find π6