Applied Discrete Mathematics

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Let A = {1,2}, B = {g,r,a,y}, and f:A -->B is the function defined by f = {(1,g),(2,g)}. Determine the domain, codomain, and range of f.

The domain is A, codomain is B, and the range is {g}

Which (if any) entries in the last column (the ones in boldface) of the table below are incorrect? P | Q | P⇒Q | (P⇒Q)⇒P -------------------------- T | T | T | *T* T | F | F | *T* F | T | T | *T* F | F | T | *T*

The entries in boldface in the last two rows.

Let P be the statement "The moon is made of cheese" and Q be the statement "19 ∈ {1,2,3,4,5,6,7,8,9,10}". Determine the truth value of P ⇔ Q.

True

Let P be the statement "The set {a,b,c} has exactly 4 elements" and Q be the statement "3 ∈ {1,2,4}". Determine the truth value of the statement P ⇒ Q.

True

Let P be the statement "Triangles have five sides and Q be the statement "1 < 2." Determine the truth value of P ⊕ Q

True

Let P(x) be the open sentence "x + 1 < 3" where the domain for x is the set S = {-1,0,1}. What is the truth value of ∀xP(x)?

True

Suppose a "for" loop in algorithm takes 2,300 passes for a particular set of input. Subsequent to these passes, it terminates, and then another "for" loop takes 4,500 passes. Then there are 6,800 passes total.

True

Suppose a password for an online banking system must have 10 characters, and the characters be any digit 0,1,2,...,9, an uppercase letter, or lowercase letter, and the passwords are case sensitive (meaning that, for example, the password A123456789 is different than the password a123456789). Then, to determine the number of possible passwords, one could compute 62^10.

True

Suppose a password must contain 2 characters, where a character can be any of the digits 1,2,3,4,5 or any lowercase letter. Then to compute the number of possible passwords, one would compute 31^2.

True

Suppose we were to perform a trace of the algorithm presented in the textbook to convert 11000sub2 to base 10. Then, we would name the input a4=1, a3=1, a2=0, a1=0, and a0=0; also n = 4.

True

Is "3x = 9" a statement?

no

Identity Laws

p^T≡p | pVF≡F

Negation Laws

pv!p=T | p^!p=F

Absorbtion Laws

pv(p^q)≡p | p^(pvq)≡p

Distributive Laws

pv(q∧r)≡(pvq)∧(pvr) | p^(qvr)≡(p^q)v(p^r)

Domination Laws

pvT≡T | p^F≡F

Idempotent Laws

pvp≡p | p^p≡p

Commutative Laws

pvq≡pvp | p^q≡q^p

The 2-permutations of the set {a,r,t} are ar, ra, at, ta, rt, and tr.

True

The double sum 2 3 ∑ ∑ (i*j) = 18 i=1 j=1

True

The output to the recursive factorial algorithm with n = 4 is 24.

True

To determine the number of ways a President, Vice-President, Secretary, Treasurer, and Song Leader for a club can be chosen for a club that has 50 members, one could compute the value of P(50,5).

True

{a,b,c} = {c,a,b,c}

True

If we encrypt the word TROY with a shift cipher with k = 3, what would the corresponding letters of the ciphtertext be? (use capital letters)

WURB

Is "2 >7" a statement?

Yes

Let A = {0,1,2} and R be the relation on A given by R = {(0,0),(0,1),(0,2),(1,2),(2,2)}. Is R antisymmetric?

Yes

Let A = {0,1,2} and R be the relation on A given by R = {(0,0),(0,1),(1,0),(2,2)}. Is R symmetric?

Yes

Let A = {7, {7}, {7,{7}}} and B = {7,{7}}. Is B⊂A?

Yes

Let A = {@,#,*} and B = {0,1,2}. Suppose that f is the relation from A to B defined by f = {(@,0),(#,1),(*,1)}. Is f a function from A to B?

Yes

Suppose a variable b has been assigned to the value of 5, and a loop has the form "While (b > 4) Do ... ." Will we be granted access into this loop?

Yes

Find a formula for the nth term of the sequence 5,10,15,20,25,... .

a subscript n = 5n

Consider the function f:Z→B, where B = {0,1,2,3}, defined by f(a) = a mod 4. Compute f(25) and f(-1).

f(25) = 1 and f(-1) = 3.

If we let A = {1,3,4} and B = {1,2,3,4,5,t,h,e} then A⊆B

true

Double Negatation Laws

!(!p)≡p

De Morgan's Laws

!(p^q)≡!pv!q | !(pvq)≡!p^!q

Let P be the statement "9 ÷ 0 is undefined". Express the statement ¬P in words and determine its truth value.

"9 ÷ 0 is defined." False.

Let P(x) be the open sentence "x has three sides," where the domain for x is the set of all triangles. Provide a translation of the statement ∀xP(x).

"Every triangle has three sides."

Which of the following best represents a trace of the pseudocode recursive factorial algorithm with n = 2?

2! = 2 x (RFA with n = 1) = 2 x (1 x (RFA with n = 0)) = 2 x (1 x 1)) = 2 x 1 = 2

Suppose that a store sells two types of golf balls, namely, brand "Hit it far" and brand "Lots of Spin." There are 15 boxes of "Hit it far" golf balls and 7 boxes of "Lots of Spin" golf balls. How many ways are there to select a box of golf balls?

22

Let A = {0,2,4} and let R be the relation from A to A consisting of pairs (a,b), where a ≤ b. List all the pairs in R.

{(0,0),(0,2),(0,4),(2,2),(2,4),(4,4)}

Let A = {0,1} and B = {1,2}. If R is the "<" relation from A to B, list all the pairs in R.

{(0,1),(0,2),(1,2)}

Let A = {1,2,3} and B = {0,1,2,3}. If R is the ">" relation from A to B, list the pairs in R.

{(1,0),(2,0),(2,1),(3,0),(3,1),(3,2)}

Let A = {0,3,6,9}, and let R be the relation on A such that(a,b) ∈ R provided a | b, where a and b are both elements of A. List all pairs in R.

{(3,3),(3,6),(3,9),(6,6),(9,9),(3,0),(6,0),(9,0)}

Consider the matrix [ 1 1 0 ] 1 0 1 [ 0 0 0 ] representing a relation R on the set {x,y,z}. List all the pairs in this relation, where row/column 1 corresponds to x, row/column 2 corresponds to y, and row/column 3 corresponds to z.

{(x,x),(x,y),(y,x),(y,z)}

Let A = {7,8,9} and B = {Ø}. Find A ∪ B.

{7,8,9,Ø}

Let A = {1,3,5,a} and B = {a,b,c,d,3}. Find A∩B

{a,3}

Let U = {a,l,g,o,r,i,t,h,m} and A = {i,t}. Find A^c.

{a,l,g,o,r,h,m}

Let A = {g,r,a,y}, B = {t,a,n}, and C = {b,l,u,e}. Find A ∪ B ∪ C.

{g,r,a,y,t,n,b,l,u,e}

Express the set {-1,0,1,2,3} in set-builder notation.

{x | -2 < x < 4}

Let P be the statement "A square has seven sides" and Q be the statement "A triangle has one side." Write the statement P ⇒ Q in words.

"If a square has seven sides, then a triangle has one side."

Let P be the statement "The sun is made of lemons" and Q be the statement "8 > 1." Express the statement P v Q in words.

"The sun is made of lemons or 8 > 1."

Let A = {1,2,3,4,a} and B = {a,n,d,1,2}. Find the following: (a) A - B (b) B - A

(a) is {3,4} (b) is {n,d}

Associative Laws

(pvq)vr≡pv(qvr) | (p^q)^r≡p^(q^r)

Compute the sum 5 ∑ (2i-1) i=1

25

Find the cardinality of {a,1,b,c}.

4

Find |A|, where A ={3,{3},2,{2,3}}.

4

In performing a trace of the Recursive Euclidean Algorithm to compute the gcd of a = 12 and d = 8 (using the naming conventions presented in the pseudocode), which of the following best represents what the output of the algorithm would be?

4

Determine the value of P(3,2).

6

Suppose there are 100 cans of green beans in a grocery store, and 25 of these are "Best Deal" brand green beans. How many ways are there to choose a can of green beans at this grocery store that are not the "Best Deal" brand?

75

Convert 1111101 to base 16.

7D

Suppose a set S1 has 50 elements and that S2 has 40 elements. There are also 10 elements common to S1 and S2. How many elements are in the union of the sets S1 and S2?

80

Convert 15010 to base 2.

10010110

Consider a sequence (as typically defined) defined by a sub n = 2a sub n-1, for n = 2, 3, 4, ... , and where a sub 1 = -2. Determine a sub 4.

-16

Consider the ceiling function f(a) = ┌ a ┐. Determine f(-3.5).

-3

Let A = Z and B = Z. Consider the function f:A→B defined by the rule that f(a) = 5a-1 for each element in A. Determine f(-1).

-6

Suppose we were to perform a trace of the algorithm presented in the textbook to convert 110002 to base 10. What is the value of the variable "sum" after passing through the i = 2 stage of the "for" loop?

0

Find the bitwise AND of the two bit strings 1110 and 0101.

0100

Determine the value of C(5,3).

10

Consider the following partial table of employee names, employee identification (ID) number, department, and age. What would be the primary key?

Employee ID

Consider the floor function f(a) = └ a ┘. Then f(-0.1) = 0.

False

Consider the following partial grade book for a certain class. Name | Exam 1 Score ------------------------- Bill | 70 Gene | 83 Jesse | 86 ------------------------- Consider the set A = {Bill, Gene, Jesse} and B = {0,1,... , 100}. Then consider the relation R from A to B consisting of pairs (a,b) from the table above with a ∈ A, b ∈ B. In listing all the pairs of R, we have {(70,Bill),(83,Gene),(86,Jesse)}.

False

Consider the sequence whose formula for the nth term is given by the formula a subscript n = n / 5. Then the term a subscript 4 = 1.

False

In tracing the Recursive Fibonacci Sequence Algorithm, the value of the term F6 would work out to be 13.

False

Let A = {0,1,2} and B = {4,8,9}. Let R be the relation from A to B such that (a,b) ∈ R provided that ab = 8. Then all the pairs in R are {(8,1),(4,2)}

False

Let A = {0,1} and B = {r,t,y}. Then A x B = {(r,0), (r,1),(t,0),(t,1),(y,0)(y,1)}.

False

Let A = {1,2,7} and consider the relation R on the set A defined by R = {(1,2), (1,7), (7,1)}. In representing R using a digraph, there should be a directed edge from 2 to 1.

False

Let P be the statement "6 is even" and Q be the statement "1 ∈ {2,3,4}". Determine the truth value of P ^ Q

False

Let P(x) be the open sentence "x^3 = 4," where the domain for x is the set S = {2,3}. What is the truth value of ∃xP(x)?

False

Let P(x) be the statement "x^2 < 0," where the domain for x is the set S = {1,2,3}. What is the truth value of ∃xP(x)?

False

Let's say that Sue wants the password on her computer to NOT begin with "Sue." Let's also say that a password must be of length 20. Each character in the password can be any digit 0,1,2,...,9, an uppercase letter, a lowercase letter, and the passwords are case sensitive. Then the number of passwords that meet Sue's requirements can be determined by computing 62^17.

False

Suppose that, at a university, the Mathematics Department has two clubs, a Theoretical Math Club, and an Applied Math Club. Let's say that there are 30 Theoretical Math Club members, 20 Applied Math Club members, and 5 members of both clubs. Then there are 50 people that are members of the Theoretical Math Club, Applied Math Club, or both clubs.

False

Suppose that, in performing a trace of the Recursive Euclidean Algorithm on 20 and 12, if we set a = 20 and d = 12, per the naming conventions in the pseudocode. When we first go into the "If" condition where it states "If a mod d = 0," then the statement "20 mod 12 = 0" has what truth value?

False

Suppose we are given the following list of Prolog facts. player(Smith, TROY) player(Jones, TROY) player(Ware, TROY) player(Roblee, ACME College) Then the query ?player(X, ACME College) would return Yes

False

Suppose we have the following scheme for passwords: Each password must be of length 4, 5, or 6. The first character of each password must be a digit 0,1,2,...,9. The remaining characters can be any digits 0,1,2,...,9, an uppercase letter, or a lowercase letter; the passwords are case sensitive. Then, to determine the number of possible passwords, one could compute 62^4 + 62^5 + 62^6.

False

The 3rd and 4th terms of the Fibonacci sequence are 5 and 8, respectively.

False

The base 16 integer CAB16 converted to base 10 is 4423.

False

The list of all the 2-combinations of the set {m,a,t,h} is ma, mt, mh, and ah.

False

The number of ternary strings of length 5 can be determined by computing 5^3.

False

The statement ¬P v ¬Q is logically equivalent to the statement ¬(P v Q).

False

{1,3} ∈ {1,3,{1}},{3}}

False

{1,Ø} ⊂ {{1},Ø,{Ø}}

False

Let A = {0,1,2} and R be the relation on A given by R = {(0,0),(0,1),(0,2),(1,0),(1,2),(2,1),(2,2)}. Is R reflexive?

No

Let A = {0,1,2} and R be the relation on A given by R = {(0,0),(0,1),(1,0),(1,2),(2,1),(2,2)}. Is R transitive?

No

A correct way to express the sum of the numbers in the finite sequence 3, 4, 5, 6, 7 would be as 7 ∑ i i=3

True

In using the division algorithm to compute the quotient and remainder for a = 25 and b = 9, the quotient is 2 and the remainder is 7.

True

Let A = {0,2,4} and B = {0,1,2}. Let R be the relation from A to B of all ordered pairs of the form (a,b), where a is in A and b is in B, and where a/b is an integer. Then the pairs in R are {(0,1),(0,2),(2,1)(2,2),(4,1),(4,2)}

True

Let A = {1,2,3}, B = {2,3}, and C = {3,6}. Suppose R is a 3-ary relation that is defined by the following rule (a,b,c) is an element of R provided that a + 2 = b and b | c, and where a ∈ A, b ∈ B, and c ∈ C. Then the triples in R are {(1,3,3),(1,3,6)}.

True

Let A = {1,2,3}, B = {3,4}, and C = {5,6}. Suppose that R is a 3-ary relation that is defined by the following rule: (a,b,c) is an element of R provided that a + 1 = b, and b + 2 = c, where a ∈ A, b ∈ B, and c ∈ C.Then the triples in R are {(2,3,5),(3,4,6)}.

True

Let A = {3,4,5} and B = {g,o}. Then A x B = {(3,g),(3,o),(4,g),(5,g),(5,o)}.

True

Let A = {3,4,5}, and let R be the relation on A consisting of pairs of the form (a,b), where ab > 15, and both a and b are elements of A. If we represent R using a matrix (where the first, second, and third rows/columns of the matrix correspond to 3, 4, and 5, respectively), the matrix would be [ 0 0 0 ] 0 1 1 [0 1 1 ]

True


Set pelajaran terkait

Missouri Statues, Rules and Regulations Common to All Lines: Practice Questions

View Set

Reading and Language Arts CKT 7812

View Set

Percentage - express % as a fraction

View Set

Personal Finance: Chapters 4-7 Exam

View Set