Pre-Assessment

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Four dice are tossed. Two dice have 20 sides, and two dice have six sides. How many ways can the dice land so that the two 20-sided dice show different numbers from each other and the two 6-sided dice show different numbers from each other? 410 436 11,400 14,400

11,400

Which input is accepted by the FSM on the other side? 0000 1101 1110 1111

1110

A mother, father, and their 3 children are having their picture taken. They will all be seated elbow-to-elbow on the living room couch, and the children will not be permitted to sit next to each other. How many different arrangements are possible for the picture? 5 6 12 120

12

Set A has 8 elements, B has 10 elements, and their intersection has 6 elements. How many elements are in the union of these two sets? 12 16 18 24

12

Answer the question on the other side of the card

#1 is the answer

Answer the question on the other side

#2 is the answer

Answer the question on the other side of the card

#3 is correct

The binary representation of 21 is 10101. What is 1721 mod n rewritten using the given binary expression? (17^2 x 17^10 + 17) mod n (17^4 x 17^5 + 17) mod n (17^12 x 17^8 x 17) mod n (17^16 x 17^4 x 17) mod n

(17^16 x 17^4 x 17) mod n

Using lexicographic order, which 4-tuple of {1, 2, 3, 4, 5, 6} fits in the blank of the inequality chain (3, 1 , 4, 1) < (4, 2, 3, 2) < _____________ < (5, 3, 3, 2)? (3, 2, 3, 1) (3, 3, 4, 3) (4, 1, 3, 3) (4, 2, 4, 1)

(4, 2, 4, 1)

Which permutation of the set {1, 2, 3, 4, 5, 6} is first in lexicographic order? (4, 6, 3, 2, 1, 5) (4, 5, 2, 3, 6, 1) (4, 5, 2, 3, 1, 6) (4, 6, 5, 3, 2, 1)

(4, 5, 2, 3, 1, 6)

What is the ones digit of the number 3^902? 1 3 7 9

9

Which set contains the multiplicative inverse of 13 mod 33? {2, 10, 18, 26} {4, 12, 20, 28} {6, 14, 22, 30} {8, 16, 24, 32}

{4, 12, 20, 28}

In the proof for the sum of squares, the inductive hypothesis for any natural number is: P(n): 0^2 + 1^2 + 2^2 + ... + n^2 = n(n + 1)(2n + 1)/6, n≥0. If n = 0, then the left-hand side of P(0) = 0^2 = 0, and right-hand side of P(0) = 0 × (0 + 1)(2 × 0 + 1)/6 = 0 . What is the right-hand side of P(n+1)? n(n + 1)(2n + 1)/2 (n + 1)(2n^2 + 3n + 6)/6 (n + 1)(n + 2)(2n + 3)/6 n(n + 1)(2n + 3)/6 + (n + 1)^2

(n + 1)(n + 2)(2n + 3)/6

Assume that a test for a disease gives a positive result for 1.5% of people who do not have the disease, but does not test negative if the person has the disease. What is the probability that a person who tested positive has the disease, if 1% of people have the disease? .00 .01 .40 .60

.40

here are two coins, one fair and one biased. The biased coin comes up heads with a probability 0.8 and tails with a probability 0.2. One of the coins is selected at random and flipped ten times. The results of the coin flips are mutually independent. The result of the 10 flips is H, T, T, H, H, T, H, H, T, H. What is the probability that the coin flipped was the biased coin? (Round to the nearest tenth.) 0.2 0.3 0.4 0.5

0.3

Answer the question on the other side 000000 001010 101010 110101

001010

An individual has chosen the public key of N = 187 = 11 x 17 and e = 3. What is the private key using RSA encryption? 2 107 15 160

107

A club of 12 people would like to choose a person for each office of president, a vice president, and a secretary. How many different ways are there to select the officers so that only one person holds each office? 36 1,320 1,728 3,960

1320

An individual has chosen a public key of N = 391 = 17 × 23 and e = 7. What is the private key using RSA encryption? 151 352 384

151

What is the decimal expansion of (10011001)2? Less 29 36 153 306

153

What is the sequence of remainders obtained when using Euclid's algorithm to compute the greatest common divisor (GCD) of 178 and 20? 18 2 0 8 2 0 8 4 2 1 0 18 4 2 1 0

18 2 0

The recurrence relation is given by an=an−1+n with initial term a0=4. What is the value of a5? 9 14 19 25

19

A box contains cards numbered 1 - 10. Two cards are randomly picked with replacement. What is the probability of picking the card numbered three at least once? 1/10 9/10 19/100 21/100

19/100

How many people must be in a group to ensure that at least 2 individuals have the same first initial? 27 52 53 650

27

A fair coin is flipped n times and the results recorded. How many different sequences of heads and tails are possible? 2n 2^n n^2 n!

2^n

Suppose an+1 = 3an - 2an-1 and a0 = 1, a1 = 2. What is an expressed as a function of n? 2^n n + 1 (-1)^n + 3n (-2)^n + 4n

2^n

An 11-person musical ensemble is on a stage with a tuba and a cello. Only 1 of the 11 can play both instruments, and exactly 4 can play neither instrument. The number of ensemble members who play only the cello equals the number who play only the tuba. How many members of the 11-person ensemble play only the cello? 1 2 3 4

3

Answer the question on the other side 2 3 4 5

3

N is an integer between 0 and 9. For how many values of N does [123,3N2] = [0] mod 8, where 123,3N2 is a six-digit number? 2 3 4 5

3

Given the pseudocode fragment: x := 2 count := 4 while (count > 0) x := 2 × x count := count - 1 End-while What is the final value for x? 4 16 32 64

32

How many ways can 7 soccer balls be divided among 3 coaches for practice? 21 36 210 343

36

A random experiment consists of tossing a fair six-sided die repeatedly. How many tosses are required to be certain that the probability that at least one '6' appears is greater than or equal to 1/2? 3 4 5 6

4

Which function is Θ(x^3)? 4x + √x ^3√x + lnx 4x^3 + √x−1 3x^4 − ln(x+2)

4x^3 + √x−1

There are four different colored balls in a bag. There is equal probability of selecting the red, black, green, or blue ball. What is the expected value of getting a green ball out of 20 experiments with replacement? 4 5 20 80

5

Which expression is equivalent to the given expression? 6 ∑ (2i−3) i=−3 Potential answers: 5 ∑ (2i−3) i=−2 9 + 5 ∑ (2i−3) i=−2 9 + 6 ∑ (2i−3) i=−2 −9 + 5 ∑ (2i−3) i=−3

5 ∑ (2i−3) i=−2

What is the minimum number of bits required for the binary representation of a number greater than 32? 4 5 6 10

6

Let N = 12 = 22 + 23. Given that M2 ≡ 51 (mod 59), what is M12 (mod 59)? 3 7 30 36

7

Given this algorithm written in pseudocode: Algo(n) Input: A positive integer n Output: Answer, Algo(n) If n = 1 Answer = 3 Else Answer = 3 × Algo(n-1) End if What is Algo(4)? 7 12 64 81

81

An encryption scheme uses the numerical position of a letter in the alphabet to encrypt characters, e.g., A=1, D=4, Z=26, etc., and spaces are ignored. What is the encoding of "HAPPY BIRTHDAY" using this technique? 81662529182084125 81662529082084125 8116162529082084125 8116162529182084125

8116162529182084125

A grocery store stocks 1-gallon cartons of skim milk, 1% milk, 2% milk, and whole milk. A customer is asked to buy 10 gallons of milk. The customer needs to buy at least one carton of each type of milk. How many different ways can the kinds of milk to buy be selected? 84 120 210 286

84

Answer the question on the other side A C {A, B} {A, C}

A

Answer the question on the other side The only inputs that end at state FSK are the permutations of {f,s,k}. The only input that ends at state FSK is {f,s,k}. Only inputs that include the same number of f's, s's and k's will terminate at FSK. Any input that includes any positive number of f's, s's and k's will terminate at FSK.

Any input that includes any positive number of f's, s's and k's will terminate at FSK.

Answer the question on the other side A B C Input string is not valid.

B

Twenty people have volunteered for an experiment. Twelve of the volunteers are men and eight are women. How many ways are there to select a group of five men and four women? 5!4! C(20,9) C(12,5) × C(8,4) C(20,12) × C(20,8)

C(12,5) × C(8,4)

Given this pseudocode that extracts a sample sequence from the data sequence of length N: Function Sampler (Sequence Data) Set Sample to an empty sequence Set N to the length of Data While N>=1 Append element N of Data to Sample N:= N/2 Return Sample What is the worst-case run time for Function Sampler? O(log2N) O(N/2) O(N) O(Nlog2N)

O(log2N)

Given the pseudocode: procedure bubbleSort( A : list of sortable items ) n = length(A) repeat newn = 0 for i = 1 to n-1 inclusive do if A[i-1] > A[i] then swap(A[i-1], A[i]) newn = i end if end for n = newn until n = 0 end procedure ​What is the worst case performance? O(1) O(n) O(n^2) O(n log(n))

O(n^2)

Given this algorithm: Simple Sort This algorithm sorts the elements of an array. Input: numb, an array of n integers Output: numb, in ascending order for i = 1 to n for j = 1 to n - i if numb(j) > numb(j + 1) temp = numb(j) numb(j) = numb(j + 1) numb(j + 1) = temp end for end for What is the asymptotic worst-case complexity? O(1) O(n) O(n^2) O(n log(n))

O(n^2)

Assume n0 = 1. What is the big-O notation for the function f(n) = n × log(n^2) + 7n^3 + 5n + 3? O(n^3) O(log(n^2)) O(n × log(n^2)) O(n2)

O(n^3)

Assume that the Sort(list L) function operates in O(nlogn) time, where n is the length of the list (of numbers.) Variables L1, L2, and L3 are lists of real numbers, all of length n. Given the following pseudocode function: Function Sort3(L1, L2, L3) K1 = Sort(L1) For each element, E1, of L1, Add E1 to each element of L2 K2 = Sort(L2) For each element, E2, of L2 Add E2 to each element of L3 K3 = Sort(L3) End-For End-For L = Append lists K3, K1, and K2 return L Which function dominates the run time of Sort3(L1, L2, L3)? O(nlogn) O(n^2logn) O(n^3logn) O(n3)

O(n^3logn)

A life insurance company issues standard or preferred policies. Of the company's policyholders, 60% have standard policies and a probability of 0.01 of dying in the next year, and 40% have preferred policies and a probability of 0.08 of dying in the next year. A policyholder dies in the next year. What is the conditional probability of the deceased having a preferred policy? P(S) = 0.60, P(P) = 0.40,P(D|P) = 0.08, P(D|S) = 0.01, and the answer is 0.8421. P(S) = 0.60, P(P) = 0.40, P(D|P) = 0.01, P(D|S) = 0.08, and the answer is 0.6154. P(S) = 0.40, P(P) = 0.60, P(D|P) = 0.08, P(D|S) = 0.01, and the answer is 0.9231. P(S) = 0.40, P(P) = 0.60, P(D|P) = 0.01, P(D|S) = 0.08, and the answer is 0.1579.

P(S) = 0.60, P(P) = 0.40,P(D|P) = 0.08, P(D|S) = 0.01, and the answer is 0.8421.

Given the recursive algorithm in this pseudocode: RTC(n) Input: A nonnegative integer, n Output: A numerator or denominator (depending on parity of n) in an approximation of If n < 3 Return (n + 1) If n >= 3 t: = RTC(n - 1) If n is odd s:= RTC(n - 2) Return (s + t) If n is even r:= RTC(n - 3) Return (r + t) If n is even print 'Your approximation is ' , RTC(n) , '/' , RTC(n - 1) , '.' What is the output for the algorithm if the input n is 6? Your approximation is 17/12. Your approximation is 17/7. Your approximation is 12/7. Your approximation is 12/5.

Your approximation is 17/12.

Consider the following pseudocode that merges two lists of numbers into one: Merge0(List1, List2) Set OUTlist to empty While List1 is not empty OR List2 is not empty If one list is empty and the other is not, Remove the first number from the non-empty list and add it to OUTlist If both lists are non-empty, Remove the first number from List1 and add it to OUTlist Remove the first number from List2 and add it to OUTlist Return OUTlist If ListA is [1, 3, 5] and ListB is [2, 4, 6] then what is the result of Merge0 (ListA, Merge0 (ListB, ListA))? [ 1, 2, 3, 4, 5, 6 ] [ 1, 1, 3, 2, 5, 3, 4, 5, 6 ] [ 2, 1, 4, 3, 6, 5 ] [ 1, 2, 3, 1, 5, 4, 3, 6, 5 ]

[ 1, 2, 3, 1, 5, 4, 3, 6, 5 ] You first merge List B and List A And then you merge List A with the previous list

Let mn be the amount of money in an investment at the end of year n. At the start of each year, the investment is found to have lost 5%. Additionally, at the beginning of each year, $100 is added to the investment. What is the recurrence relation describing the sequence? mn = 0.95 × mn - 1 + 100 mn = 0.95 × (mn - 1 + 100) mn = 100 - 0.95 × (mn - 1) mn = 0.95 × (mn - 1 - 100)

mn = 0.95 × (mn - 1 + 100)

Given this pseudocode: S = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20} x = 2 While(x<11): For i in S: If 0 ≡ i mod x and i ≠ x: delete i from S end-If end-For x = x + 1 end-While What is S at the end of this code? ∅ {2, 3, 5, 7} {11, 13, 17, 19} {2, 3, 5, 7, 11, 13, 17, 19}

{2, 3, 5, 7, 11, 13, 17, 19}


Kaugnay na mga set ng pag-aaral

DIENCEPHALON II: THE HYPOTHALAMUS NEUROANATOMY

View Set

Introduction to Advertising Final Exam (Lessons 7-13)

View Set

Business Finance Chapter 13 Quiz

View Set

Ch 39: Rheumatic Disorders - PrepU

View Set

1.1.1b Inclined Plane, Wedge, and Screw

View Set

PNU 133 PrepU Passpoint Gastrointestinal Disorders

View Set

Chapter 16-Nutritional Aspects of Pregnancy and Breastfeeding

View Set

"I know why the caged bird sings" Test Review.

View Set

AP Lang Unit 5 Progress Check MCQ Answers

View Set