Test 3 (study guide)

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

Using the following predicates S(x) - x is a student B(x) - x is a book O(x,y) - x owns y L(x,y)- x likes y translate the following sentence If a student likes a book, he or she owns it.

(∀x)(∀y)[(S(x) & B(y) & L(x,y)) → O(x,y)]

Using the following predicates S(x) - x is a student B(x) - x is a book O(x,y) - x owns y L(x,y)- x likes y translate the following sentence If a student owns a book, he or she likes it. ∀,→,∃

(∀x)(∀y)[(S(x) & B(y) & O(x,y)) → L(x,y)]

Using the following predicates S(x) - x is a student B(x) - x is a book O(x,y) - x owns y L(x,y)- x likes y translate the following sentence Every student owns a book, but there is no book that all students own.

(∀x)[(S(x) → (∃y)[B(y) & O(x,y)] & ~(∃y)[B(y) & (∀x)[(S(x) → O(x,y)]]

Using the following predicates S(x) - x is a student B(x) - x is a book O(x,y) - x owns y L(x,y)- x likes y translate the following sentence Every student does not like at least one book.

(∀x)[(S(x) → (∃y)[B(y) & ~L(x,y)]]

Using the following predicates S(x) - x is a student B(x) - x is a book O(x,y) - x owns y L(x,y)- x likes y translate the following sentence Each student likes a book that he or she owns. ∀,→,∃

(∀x)[S(x) → (∃y)[B(y) & O(x,y) & L(x,y)]]

Using the following predicates S(x) - x is a student B(x) - x is a book O(x,y) - x owns y L(x,y)- x likes y translate the following sentence There is a book that no student likes.

(∃y)[B(y) & (∀x)[(S(x) → ~L(x,y)]]

Like in Utah, license plates in the great state of Wisconsin consist of 2 letter and 4 digits. However, only digits can repeat and the two letters always precede the digits. How many possible plates are there in Wisconsin?

26x25x10x10x10x10

License plates in the great state of Utah consist of 2 letters and 4 digits. Both digits and letters can repeat and the order in which the digits and letters matter. Thus, AA1111 and A1A111 are different plates. How many possible plates are there? Justify your answer.

26x26x10x10x10x10x15

A local BBQ restaurants offers 2 side dishes with a lunch plate. There are 7 side dishes. How many choices of side dishes does a customer have? Note: There is no requirement that the customer chooses different side dishes (i.e. he or she can choose say baked beans twice as their side dish).

28

A student club with 30 members need to chose officers. There are five officer positions and no member can occupy two positions at the same time. How many possible slates of candidates are there?

30!/(5!25!)

Let A = { 1,2,3 } and B = { 4, 5, 6, 1}. Select all that are true from below.

A - B = { 2, 3 } B - A = { 4, 5, 6 }

A theorem is:

A proposition that is true

Using the following predicates C(x)x is a car M(x)x is a man O(x,y) x owns y W(x,y) x washes y S(x)x shines P(x)x is pleased what is the best way to render the following predicate logic statement in English? (∀x)[(C(x) & S(x)) → (∃y)[M(y) & O(x,y)]]

All shiney cars own a man.

What are the proporties of the following relation { <a,b>, <b,c>, <c,d>, <a,c>, <a,a>,<b,b> } ? Check all that apply.

Antisymmetric

What are the proporties of the following relation { <a,b>, <b,c>, <c,d>, <d,e>} ? Check all that apply.

Antisymmetric

Which of the following properties hold for the relationship "Parent"? Select all that apply.

Antisymmetric

Let A = { 1,2,3 } and B = { 5, 4,2 ,3 }. Select all that are true from below.

B - A = { 4, 5 } A ∩ B = { 2 , 3 }

Both bridge and poker are played with 52 cards. A poker hand consists of 5 cards; a bridge hand of 13. Are there more possible poker hands or bridge hands?

Bridge

What is meant by the term "discrete" when it is used in the context of this course, as in "discrete structures", or "discrete mathematics"?

Countable (The term discrete means countable. Because other than discrete mathematics what we study is continuous functions.)

X U Y = {z l z ∈ x or z ∈ Y} is a

Definition The given statement is a definition. X U Y means z belongs to X or z belongs to Y. Therefore, it is a definition.

Using the following predicates C(x)x is a car M(x)x is a man O(x,y) x owns y W(x,y) x washes y S(x)x shines P(x)x is pleased what is the best way to render the following predicate logic statement in English? (∀x)[(M(x) & (∃y)[C(y) & O(x,y)]) → P(x)]

Every man who owns a car is pleased

An individual's chances of being killed by a lighting strike in a given year is 1/5,000,000. The Georgia Lottery has just invented a new game "Thunder" in which you win if you guess 5 out of 65 numbers right (order does not matter). True or False: Your chances of winning Thunder are higher than your chances of dying in a lightning strike in a given year.

False

Consider the following graph G: Is the following statement true or false: The edges in G are {v1,v2,v3,v4,v5}

False

Consider the following graph G: Is the following statement true or false: There are two walks from v4 to v1.

False

Consider the following graph G: Is the following statement true or false: {v1,v3, v4,v5} is a walk from v1 to v5

False

If (∀x)([P(x)] → ∃y[Q(y) & R(x,y)] is true, it follow that (∃x)(∃y)[P(x) & Q(y) & R(x,y)]

False

If (∃x)[P(x)] & ∃x[Q(x)] is true, it follow that (∃x)[P(x) & Q(x)]

False

The following sets are identical: B - A and A - B where A and B are different sets.

False

The following sets are identical: {1} and {1, {1} }.

False

The following sets are identical: ∅ and {∅}

False

The following statement The cardinality of the domain of a function is equal that of its range. is

False

The following statement The function f(x) = x + 1 where the domain and codomain are the set of natural numbers is onto is

False

True or False: The following ia a function that is 1 to 1.

False

Using the following predicates S(x) - x is a student B(x) - x is a book O(x,y) - x owns y L(x,y)- x likes y and the term susie translate the following argument and determine whether it is valid (True). Susie is a student. If a student likes a book, he or she owns it. Therefore, Susie owns a book.

False

X x Y is the multiplication of set A times set B.

False Reason: X * Y is the cartesion product of the sets X and Y. It is not the multiplication of two sets. For example : X={1,2,3} Y={4,5,6} X * Y = {(1,4),(1,5),(1,6),(2,5),(2,6),(3,4),(3,5),(3,6)}

In a directed graph, if there is a path from vertex v to vertex v', then there is a path from vertex v' to vertex v.

False if there is path from v to v' then there is pathe from v' to v .This statement is not for every Directed Graph.... this statement is true in some directed graphs and false in some directed graphs. in some Directed Graph. you will get path exist from v to v' and as well as path exists from v' to v,but in other cases you won't get... Definition of directed Graph::Graph contains Directed Edges ,you have to move from one vertex to another vertex based on the directions ..based on the directions statments is valid in some times and invalid in other times : But in case of Undirected Graph if you get path from v to v' then there will be a path from v' to v ,in undirected Graph u can go to both directions..it is valid for Un Directed Graph.. Answer:False;

Is the following a proposition: Do your homework on Tuesday.

False. This does not have a truth value.

Is the following a function? If it is not, say why not. If it is a function, state whether it is onto.

It is a function and it is onto.

Is the following a function? If it is not, say why not. If it is a function, state whether it is onto.

It is not a function because one of the elements in the domain does not have a relation to an element in the codomain.

Is the following a function? If it is not, say why not. If it is a function, state whether it is onto.

It is not a function because one of the elements in the domain relates to more than one of the elements in the range.

Consider the following argument: If Han obeys the rules, he keeps his credit card. Han does not obey the rules. Therefore, he does not keep his credit card. Create a truth table to determine whether the argument is true or false

Let O = Han obeys the rules Let K = Han keeps his credit card O K ~O O⇒K T T F T T F F F F T T T F F T T The Argument is false

Using the following predicates C(x)x is a car M(x)x is a man O(x,y) x owns y W(x,y) x washes y S(x)x shines P(x)x is pleased what is the best way to render the following predicate logic statement in English? (∀x)[(C(x) → ~(∃y)[M(y) & O(x,y)]]

No car owns a man

Consider the sets A = {1,a,3}, B = {1,b,2,d}, C = {0, 1, 7}. What is the value of A ∩ B ∩ C?

None of the above

Consider the following algorithm which takes as input an array A of size n. It first sorts the array and then counts the number of duplicate elements: n = length(A); for(j = 0; j < n; j++){lastswap = 1;for(i = 1; i < j; i++) {if A[i-1] > A[i] {temp = A[i-1];A[i - 1] = A[i];A[i] = temp;lastswap = i;} n = lastswap; } int numDupl = 0; for(j = 0; j < n; j++){ if (A[j] == A[j + 1]) numDupl++; } return numDupl; Determine the complexity of this algorithm

O(n^2)

Which of the following is an onto function?

Option 1

The inverse of which function below is a function?

Option 2

Which of the following is an one-to-one correspondence?

Option 2

In the beginning of the proof for: AU(B∩C)⊆(AUB)∩(AUC) Let x ∈ AU(B∩C) The reason for the above step is

Pick an element 'x' is an element which is chosen to prove our set relations.

Give at least two examples of why logic is relevant in Computer Science. (Pick the best 2)

Programming (For programming logic is really important and very usefull without logic programming is not possible.) Problem Solving (logic has a main role in it.)

In the sub-module on relations, we discussed total orders. Total orders allow you to sort the elements in a list. Why is sorting such an important operation in computing? Choose all that apply.

Queries run faster A report is easier to read when printing out

What are the proporties of the following relation ∅? Check all that apply.

Reflexive Transitive Symmetric Antisymmetric

Which of the following properties hold for the following relationship { <a,a>, <b,b>,<c,c>, <d,d> }? Select all that apply.

Reflexive Transitive Symmetric Antisymmetric

Which of the following properties hold for the relationship "∅"? Select all that apply.

Reflexive Transitive Symmetric Antisymmetric

Using the following predicates C(x)x is a car M(x)x is a man O(x,y) x owns y W(x,y) x washes y S(x)x shines P(x)x is pleased what is the best way to render the following predicate logic statement in English? (∃x)[(C(x) & ~(∃y)[M(y) & O(y,x)]]

There is a car that no-one owns.

Consider the following: Which statement is true?

This is a function.

Consider the following: Which statement is true?

This is not a function because some elements in the domain have multiple elements in the range associated with it.

Consider the following: Which statement is true?

This is not a function because some of the elements in the domain are not associated with any element in the range.

Which of the following properties hold for the relationship "Sister"? Select all that apply.

Transitive

What are the proporties of the following relation { <a,b>, <b,b>, <a,c>, <c,b>} ? Check all that apply.

Transitive Antisymmetric

What are the proporties of the following relation { <a,b>, <b,a>, <c,c>} ? Check all that apply.

Transitive Symmetric

Which of the following properties hold for the relationship "Sibling"? Select all that apply.

Transitive Symmetric

Consider the following graph G: Is the following statement true or false: G has a Euler circuit (aka as a Euler tour).

True

Consider the following graph G: Is the following statement true or false: G is connected.

True

Consider the following graph G: Is the following statement true or false: The edges in G are {<v1,v3>, <v3,v2>,<v4,v2>, <v4,v5>,<v5,v1>}

True

Consider the following graph G: Is the following statement true or false: There are two paths from v4 to v1.

True

In an undirected graph, if there is a path from vertex v to vertex v', then there is a path from vertex v' to vertex v.

True

Is the following a proposition: It always rains on Tuesdays.

True

The cost of health insurance is $900 per month. The cost of an operation for a dramatic injury is $500,000. The chances of someone needing such an operation are 47.3% over a twenty year period. From a purely financial point of view, it is better for you to buy the insurance.

True

The following sets are identical: A ∪ ( B ∪ C ) and ( A ∪ B ) ∪ C.

True

The following sets are identical: B ∩ A and A ∩ B.

True

The following sets are identical: B ∪ A and A ∪ B.

True

The following sets are identical: { 1, 3, 2 } and { 3, 2, 1, 1, 2 }

True

The following sets are identical: ∅ and { x | x is an odd number divisible by 2 }

True

The following statement If the range of a function is identical to the co-domain of a function then the function is onto is

True

The following statement The cardinality of the domain of a one-to-one correspondence is equal that of its range. is

True

True or False: (∀x)[P(x)] & (∃y)[Q(y)} and (∀x)(∃y)[P(x) & Q(y)] logically equivalent.

True

True or False: Consider the sets A = {1,a,3}, B = {1,b,2,d}, C = {0, 1, 7}. A ∩ ∅=∅

True

True or False: An algorithm for achieving Task T with a complexity O(nlog(n)) is usually better than an algorithm for T with complexity O(n^3)

True

Is the following a proposition: Tuesday is the day I do my homework.

True Since it has a truth value. If the homework is done on Tuesday, then it has a truth value.

A successful proof can turn a conditional statement into a theorem

True By Definition: "Theorem is a statement that has been shown to be true with a proof." Also according to wikipedia , "The proof of a theorem is often interpreted as justification of the truth of the theorem statement." and as per Proof in mathematics "mathematical statement whose truth has been established (proved) is called a theorem." eg: theorem : : The sum of the interior angles of a triangle is 180º. This is proven logically and hence forms a theorem. All the above definitions are implying the same thing which is: => A successful proof can turn a condition statement into a theorem. if you can prove a statement logically then the statement becomes a theorem.

Create a truth table to determine whether the following proposition is valid: (p & q) → (~p v q)

p q -p p^q -p∨q (p^q)⇒(-p∨q) T T F T T T T F F F F T F T T F T T F F T F T T The statement is valid

Create a truth table to determine whether the following two propositions are equivalent, i.e. are true under the same circumstances (p v q) and (~p → q)

p q ~p pvq ~p→q T T F T T T F F T T F T T T T F F T F F They are the same

Create a truth table to determine whether the following proposition is true (p v q) → ~(~p & ~q)

p q ~p ~q ~p^~q pvq ~(~p^~q) (pvq)→~(~p^~q) T T F F F T T T T F F T F T T T F T T F F T T T F F T T T F F T The Statement is valid

Consider the following graph: G can be represented in the following adjacency matrix:

v1v2v3v4v5 v1 00100 v2 00000 v3 01000 v4 01001 v5 10000

Consider the following graph: G can be represented in the following adjacency matrix:

v1v2v3v4v5 v1 00101 v2 00110 v3 11000 v4 01001 v5 10010

Which of the following is an equivalence relation? { <1,1>, <2,2>,<1,3> } { <1,1>, <1,2>, <2,2>,<2,3>, <1,3>, <3,3> } { <1,1>, <2,2>,<1,3>, <3,1>, <3,3> } { <1,1>, <2,2>,<1,3>, <3,3> }

{ <1,1>, <2,2>,<1,3>, <3,1>, <3,3> }

The transitive closure of { <1,2>, <1,3>, <2, 4> } is

{ <1,2>, <1,3>, <2, 4>, <1,4> }

Which of the following is total order? { <a,a>, <b,b>,<c,c>, <d,c> } { <a,a>, <b,b>,<c,c>,<b,c>,<b,a>,<c,a> } { <a,b>, <b,c>, <a,c> } { <a,a>, <b,b>,<c,c>, <d,d>, <a,b>,<b,c> }

{ <a,a>, <b,b>,<c,c>,<b,c>,<b,a>,<c,a> }

Consider the sets A = {1,a,3}, B = {1,b,2,d}, C = {0, 1, 7}. What is the value of A ∪ B? Choose the best answer.

{1,a,3,b,2,d}

Consider the sets A = {1,a,3}, B = {1,b,2,d}, C = {0, 1, 7}. What is the value of A ∪ (B ∩ C)?

{1,a,3}

Consider the sets A = {1,a,3}, B = {1,b,2,d}, C = {0, 1, 7}. What is the value of (A ∪ B) ∩ C ?

{1}

Which of the following is total order? { <1,1>, <2,2>,<1,3>, <3,1>, <3,3> } { <1,2>, <2,3>,<1,3>, <3,4>} {<1,1>, <1,2>, <2,2>, <2,3>,<3,3>,<1,3>} { <1,2>, <2,3>,<1,3>}

{<1,1>, <1,2>, <2,2>, <2,3>,<3,3>,<1,3>}

Consider the sets A = {1,a,3}, B = {1,b,2,d}, C = {0, 1, 7}. What is the value of A - B?

{a,3}

Consider the sets A = {1,a,3}, B = {1,b,2,d}, C = {0, 1, 7}. What is the value of B - A?

{b,2,d}

Using the following predicates C(x)x is a car M(x)x is a man O(x,y) x owns y W(x,y) x washes y S(x)x shines P(x)x is pleased translate the following English statement into predicate logic: Every man owns a car that shines.

∀x(M(x))⇒∃y[(C(y)^O(x,y)^S(y)]

Using the following predicates C(x)x is a car M(x)x is a man O(x,y) x owns y W(x,y) x washes y S(x)x shines P(x)x is pleased translate the following English statement into predicate logic: If a man is pleased, he owns a car and washes it.

∀x[M(x)^P(x)]⇒∃y[C(y)^O(x,y)^W(x,y)]

Using the following predicates C(x)x is a car M(x)x is a man O(x,y) x owns y W(x,y) x washes y S(x)x shines P(x)x is pleased translate the following English statement into predicate logic: All men who own cars wash them

∀x[M(x)^∃y(C(y)^O(x,y)]⇒W(x,y)

Using the following predicates C(x)x is a car M(x)x is a man O(x,y) x owns y W(x,y) x washes y S(x)x shines P(x)x is pleased translate the following English statement into predicate logic: If a man washes a car, the car shines and the man is pleased

∀x∀y[M(x)^C(y)^W(x,y)]⇒[S(y)^P(x)]

Using the following predicates C(x)x is a car M(x)x is a man O(x,y) x owns y W(x,y) x washes y S(x)x shines P(x)x is pleased translate the following English statement into predicate logic: There is a car that does not shine and there is a man who owns it and who is not pleased.

∃x[C(x)^~S(x)]^∃y[M(y)^O(y,x)^~P(y)]

Which of the following is total order? { <1,1>, <2,2>,<1,3>, <3,1>, <3,3> } ∅ { <1,2>, <2,3>,<1,3>, <3,4>} { <1,2>, <2,3>,<1,3>}


Set pelajaran terkait

Med-Surg II Endocrine- Chapter 67

View Set

Nursing Care of the Child With an Alteration in Bowel Elimination/Gastrointestinal Disorder

View Set

AP Environmental Science Fall Final MCQ

View Set