REVIEW 1502 - Attempt Review

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

11/25/2020 REVIEW 1502: Attempt review

Home / My courses / [email protected] / General / REVIEW 1502

Started on Wednesday, 25 November 2020, 10:38 AM


State Finished
Completed on Wednesday, 25 November 2020, 11:19 AM
Time taken 41 mins 26 secs
Marks 46.0/50.0
Grade 9.2 out of 10.0 (92%)

Question 1
Complete

Mark 1.0 out of 1.0

[7010] Let G be a complete graph with 45 edges. G has:

Select one:
9 vertices.

8 vertices.

10 vertices.

None of the others

7 vertices.

The correct answer is: 10 vertices.

Question 2
Complete

Mark 1.0 out of 1.0

[636] How many strings of five ASCII characters contain the character @ at least once? [Note: There are 128 different ASCII characters.]

Select one:
127^4

None

5 * 128^4

132

128^5 – 127^5

The correct answer is: 128^5 – 127^5

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 1/24
11/25/2020 REVIEW 1502: Attempt review

Question 3
Complete

Mark 0.0 out of 1.0

[121] Which of these following statements are valid (true)?

Select one:
c.

b.

a.

b. and d.

d.

a. and c.

The correct answer is: a. and c.

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 2/24
11/25/2020 REVIEW 1502: Attempt review

Question 4
Complete

Mark 1.0 out of 1.0

[423] How may prime numbers are there between 1 to 20?

Select one:
7

The correct answer is: 8

Question 5
Complete

Mark 1.0 out of 1.0

[217] Let A = {a, b, c, d, e} and B = {d, e, f, g, h}. Determine the intersection of two sets of (A \ B) and (B \ A).

Select one:
{f, g, h}

{a, b, c, f, g, h}

{a, b, c}

empty

The correct answer is: empty

Question 6
Complete

Mark 1.0 out of 1.0

[413] Find least common multiple of 120 and 500 by their prime factorizations

Select one:
5 * (2^5)

None of the others

(2^3) * 3 * (5^3)

(2^5) * 3 * (5^3)

The correct answer is: (2^3) * 3 * (5^3)

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 3/24
11/25/2020 REVIEW 1502: Attempt review

Question 7
Complete

Mark 1.0 out of 1.0

[429] Encrypt the message "DY" using the function f(p) = (p + 11) mod 26.

Select one:
OK

None of those

NJ

OJ

The correct answer is: OJ

Question 8
Complete

Mark 1.0 out of 1.0

[241] Which of the following two sets are equal?

Select one:
A = {1, 2, 4} and B = {1, 2, 3}

A = {1, 2, 3} and B = {2, 1, 3}

A = {1, 2} and B = {1}

A = {1, 2} and B = {1, 2, 3}

The correct answer is: A = {1, 2, 3} and B = {2, 1, 3}

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 4/24
11/25/2020 REVIEW 1502: Attempt review

Question 9
Complete

Mark 1.0 out of 1.0

[427] If the function f(p) = (p + 11) mod 26 is used to encrypt a message, which of the following functions can be used to decrypt the

message?

Select one:
(i)

(ii)

Both

None

The correct answer is: (ii)

Question 10
Complete

Mark 1.0 out of 1.0

[867] Which is the ARRAY of strings that can be used to BUILD the following binary search tree?

Select one:
“DIE JUST LOSE MEMORIES NEVER PROGRAMMERS OLD THEIR THEY”

“OLD PROGRAMMERS THEY NEVER DIE JUST LOSE THEIR MEMORIES”

None of the others

“OLD PROGRAMMERS NEVER DIE THEY JUST LOSE THEIR MEMORIES”

“NEVER JUST DIE PROGRAMMERS THEIR THEY LOSE OLD MEMORIES”

The correct answer is: “NEVER JUST DIE PROGRAMMERS THEIR THEY LOSE OLD MEMORIES”

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 5/24
11/25/2020 REVIEW 1502: Attempt review

Question 11
Complete

Mark 1.0 out of 1.0

[331] Choose the correct increasing order if the functions commonly used in big-O estimates.

Select one:
None

1 << log(n) << n << n•log(n) << n^2 << n! << 2^n << 3^n

1 << log(n) << n << n•log(n) << n^2 << 2^n << 3^n << n!

1 << n << log(n) << n^2 << n•log(n) << 2^n << 3^n << n!

The correct answer is: 1 << log(n) << n << n•log(n) << n^2 << 2^n << 3^n << n!

Question 12
Complete

Mark 1.0 out of 1.0

[627] There are 26 characters in which there are 5 vowels. Suppose that a “word” is any string of seven letters of the alphabet, with repeated
letters allowed.(i) How many words begin with R and end with T?(ii) How many words begin with A or B?

Select one:
(i) 26^7 (ii) 2 * 26^7

(i) 26^5 (ii) 26^7

(i) 26^5 (ii) 2 * 26^6

(i) 26^6 (ii) 2 * 26^5

None

The correct answer is: (i) 26^5 (ii) 2 * 26^6

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 6/24
11/25/2020 REVIEW 1502: Attempt review

Question 13
Complete

Mark 1.0 out of 1.0

[326] Which of the following functions is O(x^2) ?

Select one:
h(x) = x(x+1)(x+2)

f(x) = 100x^2 + 3

g(x) = (xlogx + 1)x

k(x) = 2^x

The correct answer is: f(x) = 100x^2 + 3

Question 14
Complete

Mark 1.0 out of 1.0

[7029] The adjacency matrix for K9 has ___ 1s.

Select one:
72

36

81

18

The correct answer is: 72

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 7/24
11/25/2020 REVIEW 1502: Attempt review

Question 15
Complete

Mark 1.0 out of 1.0

[552] Which of the following function can be used to locate an element x in a DECREASING array by binary search method?

Select one:
None

bsearch_1

bsearch

bsearch_2

The correct answer is: bsearch_2

Question 16
Complete

Mark 1.0 out of 1.0

[277] Determine whether rule f is a function from Z to R. (i) f(x) = 1 for all x (ii) f(x) is a number greater than x

Select one:
(i) fuction; (ii) not a function

(i) fuction; (ii) function

Both (i) and (ii) are not functions

(i) not a fuction; (ii) function

The correct answer is: (i) fuction; (ii) not a function

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 8/24
11/25/2020 REVIEW 1502: Attempt review

Question 17
Complete

Mark 1.0 out of 1.0

[553] The following diagram can be used to describe the execution of the algorithm for ____. (i) Finding the maximum of an array (ii)

Computing the summation of an array

Select one:
(ii)

(i)

All

None

The correct answer is: All

Question 18
Complete

Mark 1.0 out of 1.0

[508] Suppose that f(n) satisfies the divide-and-conquer relation f(n) = 2*f(n/3) + 5 and f(1) = 7. What is f(81)?

Select one:
187

189

185

183

The correct answer is: 187

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 9/24
11/25/2020 REVIEW 1502: Attempt review

Question 19
Complete

Mark 1.0 out of 1.0

[503] By induction hypothesis, the series 1.1 + 2.2 + 3.3 + … + p.p can be proved equivalent to _______.

Select one:
(p^2 + 2)/7

[p * (p+1)] / 4

[p * p * (p+1) * (p+1)] / 4

[p * (p+1) * (2*p + 1)] / 6

The correct answer is: [p * (p+1) * (2*p + 1)] / 6

Question 20
Complete

Mark 0.0 out of 1.0

[248] Stydy the following functions: F: R --> R, F(x) = |x| G: Z --> Z, G(x)= 5x

Select one:
Both F and G are invertible.

None of the others

F is not invertible and G is invertible

F is invertible and G is not.

Both F and G are not invertible.

The correct answer is: F is not invertible and G is invertible

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 10/24
11/25/2020 REVIEW 1502: Attempt review

Question 21
Complete

Mark 1.0 out of 1.0

[156] Let p, q be the propositions as follows p: you can pass the final exam, s: you study hardWrite the proposition "You can pass the final
exam if you study hard" using p, q and logical connectives.

Select one:
pvs

p^s

s→p

p→s

The correct answer is: s → p

Question 22
Complete

Mark 1.0 out of 1.0

[327] Give a big-O estimate for the number of additions used in the following algorithm:

Select one:
O(2n)

O(log n)

O(n)

O(n^2)

The correct answer is: O(n^2)

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 11/24
11/25/2020 REVIEW 1502: Attempt review

Question 23
Complete

Mark 1.0 out of 1.0

[7062] How many edges does a graph have if its degree sequence is 5, 5, 4, 3, 2, 2, 1?

Select one:
10

11

None of the others

The correct answer is: 11

Question 24
Complete

Mark 0.0 out of 1.0

[510] Give a correct RECURSIVE definition of the FACTORIAL of non-negative integer n.

Select one:
a.

c.

b.

None of the others

The correct answer is: a.

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 12/24
11/25/2020 REVIEW 1502: Attempt review

Question 25
Complete

Mark 1.0 out of 1.0

[866] What is the VALUE of each of the following POSTFIX expressions? 9 3 / 5 + 7 2 - *

Select one:
30

20

40

10

The correct answer is: 40

Question 26
Complete

Mark 0.0 out of 1.0

[141] Let P(m, n) be the statement "m divides n", where m and n are positive integers. Consider the statements:(i) P(3, 12) → P(12, 3)(ii) P(12,
3) → P(3, 19)Which one is true?

Select one:
Both of them

None of them

(i)

(ii)

The correct answer is: (ii)

Question 27
Complete

Mark 1.0 out of 1.0

[631] How many license plates can be made using one letters from {A, B, ..., Z} followed by four digits from {0, 1, 2, ..., 9}?

Select one:
26 * 40

26 * 10^4

26 * 4^10

None of the others

The correct answer is: 26 * 10^4

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 13/24
11/25/2020 REVIEW 1502: Attempt review

Question 28
Complete

Mark 1.0 out of 1.0

[219] Determine whether f is a FUNCTION from Z to Z if f(x) = 2 / x.

Select one:
Not well-defined because there are two distinct values assigned to each x.

None of the others

Not defined for x = 0.

Yes, f is a function from Z to Z.

The correct answer is: Not defined for x = 0.

Question 29
Complete

Mark 1.0 out of 1.0

[150] Let p denote a proposition, which one is true?(i) ¬ (p ∧ q) ≡ (¬ p ∧ ¬ q)(ii) p ∧ True ≡ True

Select one:
None

(i)

(ii)

Both

The correct answer is: None

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 14/24
11/25/2020 REVIEW 1502: Attempt review

Question 30
Complete

Mark 1.0 out of 1.0

[619] Show the CORRECT RECURRENCE for counting the NUMBER OF ALL SUBSETS of a set with n elements?

Select one:
none of them

c.

b.

a.

The correct answer is: a.

Question 31
Complete

Mark 1.0 out of 1.0

[7021] Consider the statements: (1) The adjacency matrix of a complete graph contains all 1s. (2) The graphs K2,5 and W5 have the same
number of edges.Which one is true?

Select one:
Both (1) and (2)

(2) only

Neither (1) nor (2)

(1) only

The correct answer is: (2) only

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 15/24
11/25/2020 REVIEW 1502: Attempt review

Question 32
Complete

Mark 1.0 out of 1.0

[7037] Suppose that a graph G is isomorphic to the graph K15. Which of the following statements is/are true? (i)G has 30 edges. (ii)G has a
Hamilton circuit.

Select one:
(ii)

Both

(i)

Neither (i) nor (ii)

The correct answer is: (ii)

Question 33
Complete

Mark 1.0 out of 1.0

[7094] Given the graph. Which statement(s) is (are) TRUE?

Select one:
An Euler circuit is 1 2 3 4 5 6 7 1

An Euler circuit is 1 4 6 7 4 5 6 2 7 1 2 3 1

An Euler circuit is 1 3 2 7 6 5 4 1

The graph has no Euler circuit

The correct answer is: An Euler circuit is 1 4 6 7 4 5 6 2 7 1 2 3 1

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 16/24
11/25/2020 REVIEW 1502: Attempt review

Question 34
Complete

Mark 1.0 out of 1.0

[305] Out of following which property algorithms does not share?

Select one:
Constancy

Finiteness

Input/Output

Generality

The correct answer is: Constancy

Question 35
Complete

Mark 1.0 out of 1.0

[848] Given the following prefix codes:M: 00, N: 010, T: 011, I: 100, U: 101, A: 11.Find the word represented by 0010001001111

Select one:
None of the others

MITNA

MIUNA

MINUA

MINTA

The correct answer is: MINTA

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 17/24
11/25/2020 REVIEW 1502: Attempt review

Question 36
Complete

Mark 1.0 out of 1.0

[144] Write a proposition equivalent to ¬p → q using only p, q, ¬ and ∧

Select one:
(iv)

None of the others

(i)

(ii)

(iii)

The correct answer is: (ii)

Question 37
Complete

Mark 1.0 out of 1.0

[7113] Which of the directed graphs in the Figure have an Euler circuit? Of those that do not, which have an Euler path?

Select one:
G3 has an Euler path

The graph G1 has an Euler circuit.

G2 does not have an Euler cicuit but it has an Euler path

G2 has an Euler circuit

The correct answer is: The graph G1 has an Euler circuit.

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 18/24
11/25/2020 REVIEW 1502: Attempt review

Question 38
Complete

Mark 1.0 out of 1.0

[435] Suppose that a computer has only the memory locations 0, 1, 2, ..., 29. Using the hashing function h where h(x) = (x + 5) mod 30 to
determine the memory locations in which 97, 32, and 16 are stored, we have

Select one:
12, 7, 16

None

12, 7, 21

7, 2, 16

12, 2, 16

The correct answer is: 12, 7, 21

Question 39
Complete

Mark 1.0 out of 1.0

[438] A sequence of pseudo-random numbers are generated using X[n+1] = (3X[n] + 5) mod 31 with seed X[0] = 2. We have in order X[1],
X[2], and X[3] are _____.

Select one:
None

8, 29 and 30

11, 1 and 8

11, 7 and 13

11, 7 and 26

The correct answer is: 11, 7 and 26

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 19/24
11/25/2020 REVIEW 1502: Attempt review

Question 40
Complete

Mark 1.0 out of 1.0

[278] Find the inverse function of f (x) = 2x+3

Select one:
x/2–3/2

-x/2+3/2

x/3–2/3

None

The correct answer is: x / 2 – 3 / 2

Question 41
Complete

Mark 1.0 out of 1.0

[101] Which is the NAME of the logically equivalent “p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)” ?

Select one:
De Morgan

Negation

Distributive

Absorption

The correct answer is: Distributive

Question 42
Complete

Mark 1.0 out of 1.0

[617] How many bit strings of LENGTH 10 that do NOT have TWO CONSECUTIVE 0s?

Select one:
55

2^8

None of them

144

The correct answer is: 144

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 20/24
11/25/2020 REVIEW 1502: Attempt review

Question 43
Complete

Mark 1.0 out of 1.0

[333] Which two of three following cases are important when evaluating the complexity of an algorithm? (i) Average-case (ii) Worst-case (iii)
Best-case

Select one:
(i), (ii)

None

(iii), (i)

(ii), (iii)

The correct answer is: (i), (ii)

Question 44
Complete

Mark 1.0 out of 1.0

[521] By induction, we can prove that

Select one:
3^n < n! for any integer greater than 4

3^n > n! for any positive integer

3^n < n! for any integer greater than 6

3^n > n! for any integer greater than 3

The correct answer is: 3^n < n! for any integer greater than 6

Question 45
Complete

Mark 1.0 out of 1.0

[843] Given the coding scheme a: 001, b: 0001, e: 1, r: 0000, s: 0100, t: 011, x: 01010. Find the word represented by 00010010000010011011

Select one:
barsex

None of the others.

barseet

bersart

The correct answer is: barseet

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 21/24
11/25/2020 REVIEW 1502: Attempt review

Question 46
Complete

Mark 1.0 out of 1.0

[313] Find big-O estimate of complexity of the algorithm for finding the maximum.

Select one:
O(n)

O(logn) /

O(1)

O(n^2)

The correct answer is: O(n)

Question 47
Complete

Mark 1.0 out of 1.0

[879] Use BREADTH-first search to produce a spanning tree for the given simple graph. Choose a as the root of this spanning tree and

assume that the vertices are ordered alphabetically.

Select one:
None

abchglidefkjnm

abgchlmidejnfk

abcdefghijklmn

abchglidefjkmn

The correct answer is: a b g c h l m i d e j n f k

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 22/24
11/25/2020 REVIEW 1502: Attempt review

Question 48
Complete

Mark 1.0 out of 1.0

[7111] Given the graphs G1, G2 and H in the figure, which of the following is/are fact(s)?

Select one:
There is a path between every pair of distinct vertices in G2.

G1, G2 and H are all connected.

None

The number of connected components of G1, G2 and H are 1, 2 and 3, respectively.

The correct answer is: The number of connected components of G1, G2 and H are 1, 2 and 3, respectively.

Question 49
Complete

Mark 1.0 out of 1.0

[811] What is the value of following postfix expression: 3 4 * 5 3 - + 2 2 ^ *

Select one:
37

56

12

The correct answer is: 56

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 23/24
11/25/2020 REVIEW 1502: Attempt review

Question 50
Complete

Mark 1.0 out of 1.0

[643] The Tower of Hanoi puzzle with ___ disks can be solved using ___ steps.

Select one:
3, 8

7, 129

5, 33

7, 127

The correct answer is: 7, 127

◄ Course_Introduction_Discrete Mathematics

Jump to...

Slide ►

https://lmsdn.fpt.edu.vn/mod/quiz/review.php?attempt=12298&cmid=2994&showall=1 24/24

You might also like