CS Finals (SW ed.) Flashcards

1
Q

Given the following statements:

Statement A: When 4x+2 = 0, x is 0.5.

Statement B: 20 is a prime number.

Statement C: A and B are true.

Identify the truth value of Statement C.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Statement A: 5 + 23 is 28.

Statement B: 31 - 2 is 33.

Statement C: A or B is not true.

Identify the truth value of Statement C.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Evaluate: True AND False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Evaluate: NOT False AND NOT False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

If p is true and q is false, what is the truth value of the expression p → q?

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which of the following is an example of a compound proposition?

Show answer choices

q

not p

p and q

p

A

p and q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a compound Proposition?

A

statement that combines 2 or more propositions using connectives (and, or, but)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the logical operator ‘¬’ represent?

Show answer choices

Conjunction

Disjunction

Implication

Negation

A

Negation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the definition of a proposition in logic?

Show answer choices

A statement that is either true or false.

A sentence that can be either a statement or a question.

A command or question.

An assumption that is not verified.

A

A statement that is either true or false.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which of the following is NOT a logical constant?

Show answer choices

X

1

True

False

A

X

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a logical constant

A

a symbol that has the same meaning no matter what

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

hat does proof by exhaustive checking involve?

Show answer choices

Using a single example to prove the statement is true.

Assuming the proposition is true and finding a counterexample.

A method of proof that is never conclusive.

Checking all possible cases to see if the proposition holds true.

A

Checking all possible cases to see if the proposition holds true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the truth table used for?

Show answer choices

To define the syntax of logical expressions.

To simplify complex propositions.

To determine the truth values of propositions under different scenarios.

To create logical conclusions.

A

To determine the truth values of propositions under different scenarios.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In propositional logic, what does the symbol ‘→’ signify?

Show answer choices

Conjunction, meaning ‘and’.

Negation, meaning ‘not’.

Disjunction, meaning ‘or’.

Implication, meaning ‘if… then…’

A

Implication, meaning ‘if… then…’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In conditional proof, what must be demonstrated?

Show answer choices

A counterexample to the premise.

That if the premise is true, then the conclusion must also be true.

That both the premise and conclusion are true.

That the conclusion can be true regardless of the premise.

A

That if the premise is true, then the conclusion must also be true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

When constructing a proof by contradiction, what must you assume initially?

Show answer choices

That all premises are valid.

That no conclusions can be drawn.

That the proposition is true.

That the proposition you want to prove is false.

A

That the proposition you want to prove is false.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which of the following statements best defines ‘if and only if’ (↔)?

Show answer choices

It is a condition that relies solely on the first statement.

Either one can be true for the statement to hold.

Both sides must have the same truth value.

The first must be true for the second to be true, but not vice versa.

A

Both sides must have the same truth value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which of the following is NOT a valid method of proof?

Show answer choices

Direct proof.

Proof by contradiction.

Proof by contradiction that involves guessing.

Constructive proof.

A

Proof by contradiction that involves guessing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

In the expression p ∨ q, what does the ‘∨’ operator represent?

Show answer choices

Logical OR

Logical AND

Logical NOT

Logical implication

A

Logical OR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Question 15
1
/
1
What does the conjunction operator ‘∧’ indicate?

Show answer choices

Both statements must be false.

At least one statement is true.

One statement implies the other.

Both statements must be true.

A

Both statements must be true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Which logical operator indicates that at least one of the statements is true?

Show answer choices

Logical AND (∧)

Logical OR (∨)

Implication (→)

Negation (¬)

A

Logical OR (∨)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What do we call the situation where ‘p’ implies ‘q’ and ‘q’ implies ‘p’?

Show answer choices

A biconditional statement.

An implication.

A tautology.

A disjunction.

A

A biconditional statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is a minimal counterexample?

Show answer choices

An example that has multiple variables.

The simplest instance where the proposition fails to hold.

An example that supports the proposition.

The most complex example that invalidates the proposition.

A

The simplest instance where the proposition fails to hold.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which method would you use to prove a proposition that claims something is true for all integers?

Show answer choices

Using a single counterexample.

Mathematical induction.

Direct computation of values.

Exhaustive checking of all integers up to a specified number.

A

Mathematical induction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Let A = {34, 67, 21, 94, 43}; Let B = {22, 21, 14, 19, 67}; Let C = {94, 67, 34, 32, 22}; And A∈U, B∈U C∈U. Which of the following elements belong to B'\C? Select all that apply. Partial points are awarded. Show answer choices 94 67 43 21 32
43
26
Question 3 5 / 5 Let A = {34, 67, 21, 94, 22}; Let B = {22, 42, 14, 19, 67}; Let C = {92, 21, 34, 32, 22}; And A∈U, B∈U C∈U. Which of the following elements belong to (C'∪B)? Select all that apply. Partial points are awarded. Show answer choices 21 67 92 34 22
67
27
Question 4 5 / 5 Let A = {34, 67, 21, 94, 22}; Let B = {22, 75, 14, 86, 67}; Let C = {32, 79, 94, 75, 22}; And A∈U, B∈U C∈U. Which of the following elements belong to (A∩C)'? Select all that apply. Partial points are awarded. Show answer choices 67 34 94 75 22
67 34 75
28
Question 5 5 / 5 Let A = {34, 67, 21, 94, 43}; Let B = {22, 21, 14, 19, 67}; Let C = {94, 67, 34, 32, 22}; And A∈U, B∈U C∈U. Which of the following elements belong to AΔC? Select all that apply. Partial points are awarded. Show answer choices 21 64 32 43 22
21 32 43 22
29
Question 1 0 / 5 Which of the following is considered a set? Select all that apply. Partial points will not be provided. Show answer choices J = {all natural even numbers that are less than 25 but greater than 26} G = {apple, banana, orange, melon, banana} Y = { x^2 | x ∈ N } A = {5, 2, 8768, 1} O = {1, 2, 3, 5, 8, 13, ...}
J = {all natural even numbers that are less than 25 but greater than 26} Y = { x^2 | x ∈ N } A = {5, 2, 8768, 1} O = {1, 2, 3, 5, 8, 13, ...}
30
Consider this set statement: A space equals space left curly bracket space 12 space comma space 5 space comma space 3 space comma space minus 2 space right curly bracket B space equals space left curly bracket space x plus 2 space vertical line space space x element of A space right curly bracket C space equals space left curly bracket space y minus 7 space vertical line space space y element of B space right curly bracket Which of the following is a member of C? Select ALL that apply. Partial points are NOT awarded. Hide answer choices 0 5 7 -9 1
0 7
31
Consider this set statement: F equals left curly bracket space a l l space s t r i n g s space t h a t space e n d space w i t h space apostrophe e apostrophe space right curly bracket U equals left curly bracket a l l space s t r i n g s right curly bracket Which of the following elements is a member of F'? Select ALL that apply. Partial points are NOT provided. Hide answer choices eeeeeeeeeeeeeeeeeeeeeee equipment ;seotu;wjrecrunse;uc;fuodfjodsslkfe' mahiwagang salamin kailan ba nya aaminin kanyang tunay na pagtingin adorable
equipment ;seotu;wjrecrunse;uc;fuodfjodsslkfe' mahiwagang salamin kailan ba nya aaminin kanyang tunay na pagtingin
32
Consider this set statement: D equals left curly bracket space x plus 1 space vertical line space x element of natural numbers semicolon space x vertical ellipsis 2 right curly bracket Which of the following is a member of the said set? Select ALL that apply. Partial points are awarded. Partial and negative credit Points may have been deducted for incorrect answers. Hide answer choices -1126298745 2937234983243 29374983572758 0 2047834791
2937234983243 2047834791
33
Consider the following set statement: H space equals space left curly bracket 1 comma space 3 comma space 5 comma space 7 comma space 11 comma space 13 comma space 17 comma space 19 comma space 23 comma space... right curly bracket Which of the following is an element of the given set? Select ALL that apply. Partial points are NOT awarded. Hide answer choices 28 67 43
67 43
34
Consider this set statement: A space equals space left curly bracket space 12 space comma space 5 space comma space 3 space comma space minus 2 space right curly bracket B space equals space left curly bracket space x plus 2 space vertical line space space x element of A space right curly bracket C space equals space left curly bracket space y minus 7 space vertical line space space y element of B space right curly bracket Which of the following is not a member of B∩C? Select ALL that apply. Partial points are NOT awarded. Hide answer choices -2 5 0 7 6
-2 5 6
35
Question 6 3 / 5 Consider this set statement: G space equals space left curly bracket space x plus y space vertical line space space x space less than space 5 semicolon space x element of straight integer numbers semicolon space y element of straight real numbers space right curly bracket Which of the following is a member of the given set above? Select ALL that apply. Partial points are awarded. Partial and negative credit Points may have been deducted for incorrect answers. Hide answer choices -32 2.3 3124 3 0
-32 2.3 3124 3 0
36
Assume the following statements: A equals left curly bracket space 67 space comma space 18 space comma space 28 space comma space 21 space right curly bracket B equals left curly bracket space 12 space comma space 9 space comma space 11 space comma space 18 space right curly bracket C equals left curly bracket space 23 space comma space 28 space comma space 67 space comma space 1 space right curly bracket U equals left curly bracket space e l e m e n t s space i n space A comma space B comma space a n d space C space right curly bracket Which of the following are not a member of (A∪C)? Select ALL that apply. Partial points will be provided. Hide answer choices 18 11 1 67 12
11 12
37
Which of the following is the difference between Tuples and Lists? Hide answer choices Tuples can only access two things at a time while lists can access any element anytime. Lists can construct over existing lists to create new lists while tuples cannot. Tuples can have multiple sub-tuples inside it while lists have several bubbles that could be rendered as a set. Lists can be represented in a computer while tuples are offered in a more practical and real-world scenario.
Lists can construct over existing lists to create new lists while tuples cannot.
38
This is the singular elements that can be used to construct a string. Hide answer choices Alphabet Lemma Language Lambda
Alphabet
39
Which of the following statements about strings, languages, and alphabets are true? Select all that apply. Partial points are awarded. Hide answer choices A language is a set of strings. Alphabets are a set of elements that can form a string. Strings are a set of alphabets.
A language is a set of strings. Alphabets are a set of elements that can form a string.
40
This is the operation where two strings are placed next to each other to form a new string. Hide answer choices contempolation contradiction construction concatenation
concatenation
41
A space equals space less than g comma space w comma space e comma space n greater than B space equals space less than s comma space t comma space a comma space c comma space e comma space y greater than What is cons(head(A), head(B)) ? Hide answer choices
42
Which of the following is considered two equal tuples? Select all that apply. Partial points are awarded. Hide answer choices (t, o, o, t) = (o, t, t, o) (m, e, o, w) = (m, e, o, w) (a, b, c) = (a, b, c) (R, O, O, M) = (R, 0, O, M)
(m, e, o, w) = (m, e, o, w) (a, b, c) = (a, b, c)
43
Empty lists do not have heads or tails. T True FALSE
True
44
Given the following alphabet: B space equals space left curly bracket m comma space a comma space l comma space o comma space i right curly bracket Which of the following is a string over B? Select all that apply. Partial points are awarded. Hide answer choices mailaoiiioiiiooiiioooiiioo ilaoilaoilaoilaoilao llaollaollao lmailoamilaiamilailamialomailm mmlamiliml1ailaoilamiloa
mailaoiiioiiiooiiioooiiioo ilaoilaoilaoilaoilao llaollaollao lmailoamilaiamilailamialomailm
45
Given the sets below, which of the following is a member of A x B? Select all that apply. Partial points are awarded. A space equals space left curly bracket 4 comma space 2 comma space 0 right curly bracket B space equals space left curly bracket 6 comma space 9 right curly bracket A space cross times space B space equals space left curly bracket space left parenthesis a comma space b right parenthesis space vertical line space a element of A semicolon space b element of B right curly bracket Hide answer choices {4, 6} (0, 6) (4, 9) (9, 0) (6, 2)
(0, 6) (4, 9)
46
This is the singular elements that can be used to construct a string. Lambda Language Lemma Alphabet
Alphabet
47
Consider the following lists: A space equals space less than g comma space w comma space e comma space n greater than B space equals space less than s comma space t comma space a comma space c comma space e comma space y greater than What is cons(A,B) ? > <, s, t, a, c, e, y> <, >
<, s, t, a, c, e, y>
48
Given the following alphabets: A space equals space left curly bracket a comma space b comma space c comma space d comma space e comma space f right curly bracket B space equals space left curly bracket g comma space r comma space e comma space a comma space t right curly bracket And assume C is a string over A and D is a string over B. Which of the following strings would be valid when C and D are concatenated as CD? Select all that apply. Partial points are not awarded. Hide answer choices decaftea fadedtear greatface bead Λ
decaftea fadedtear bead Λ
49
Given the following alphabet: E space equals space left curly bracket m comma space e comma space o comma space w right curly bracket Which of the following is a string over E? Select all apply. Partial points are not awarded. Hide answer choices meomeowmeowmewoemwneowenw mewmewmewmew meowmeowmeowmeow pspspspspsps emowemowemowemwoemwemweowem
mewmewmewmew meowmeowmeowmeow emowemowemowemwoemwemweowem
50
51
A function can have more than one output for a single input. T F
F
52
Every function is a relation, but not every relation is a function. T True F False
T
53
What is the output of the function f(x) = x + 3 when x is 2? Show answer choices 5 3 4 2
5
54
The domain of a function is the set of all possible inputs. T True F False
T
55
If a function has an output of -2 for an input of 3, it can also have an output of 3 for the same input. T True F False
F
56
If f(x) = x^2, what is f(4)? Show answer choices 16 12 4 8
16
57
In a function, each input must have exactly one __________
output.
58
The range of a function includes all possible outputs. T True F False
T
59
What is domain
All possible input in a function
60
What is range
All possible outputs from a function
61
What is input
The Value you put into the function
62
What is output
The result you get from the function
63
A function can be represented by a table, a graph, or an equation. T True F False
T
64
Which of the following represents a function? Show answer choices f(x) = 2x y^2 = x x = 5 x + y = 5
f(x) = 2x
65
In modular arithmetic, what is 10 mod 4? Show answer choices 0 2 1
2
66
Public-key Cryptography
Uses pairs of keys, one public and one private
67
Hash Function
Transforms input data into a fixed size string of characters.
68
Encryption
The process of converting plaintext into ciphertext.
69
Decryption
The process of converting ciphertext back into plaintext.
70
The first prime number is ____.
2
71
Prime Number
A number greater than 1 that has no positive divisors other than 1 and itself.
72
Modular Arithmetic
Arithmetic that deals with remainders after division by a specific number.
73
Caesar Cipher
A method of encryption that shifts letters by a fixed number.
74
Substitution Cipher
A method of encryption where each letter is replaced by a different letter.
75
What is the main purpose of a hash function in cryptography? Show answer choices To create a fixed-size output from input data To encrypt data To decrypt data To generate prime numbers
To create a fixed-size output from input data
76
What is one of the main weaknesses of a Caesar cipher? Show answer choices Easily broken through frequency analysis Cannot be used for encryption Requires large keys Only works with numbers
Easily broken through frequency analysis
77
Which of the following operations is used in a Caesar cipher? Show answer choices Rotate Invert Shift Swap
Shift
78
Modular arithmetic can be used to find remainders after division. T True F False
True
79
In modular arithmetic, adding numbers wraps around after reaching a certain _____________
value(notsure) Modulus
80
All prime numbers are odd numbers. T True F False
F
81
Which cipher is considered a symmetric cipher? Show answer choices RSA Substitution Cipher Caesar Cipher Diffie-Hellman
Caesar Cipher
82
Which of the following numbers is a prime number? Show answer choices 10 13 6 4
13
83
1 Caesar Cipher
A simple shift cipher.
84
Transposition Cipher
Rearranges the characters in the plaintext.
85
Block Cipher
Encrypts data in fixed-size blocks.
86
4 Stream Cipher
Encrypts data one bit or byte at a time.
87
What is the result of 7 mod 3? Show answer choices 1 2 3 0
1
88
Frequency analysis is a technique used to break substitution ciphers. T True F False
T
89
A Caesar cipher encrypts data by rearranging the order of letters. T True F False
F
90
What is the primary purpose of a public key in cryptography? Show answer choices To sign messages for authenticity To ensure data integrity without encryption To encrypt data that only the corresponding private key can decrypt To determine the hash of data
To encrypt data that only the corresponding private key can decrypt
91
In cryptography, what does the term 'encryption' specifically refer to? Show answer choices The process of converting plaintext into ciphertext The reverse process of decryption The generation of keys The act of hashing data
The process of converting plaintext into ciphertext
92
Which cipher is considered the simplest form of encryption? Show answer choices Diffie-Hellman AES RSA Caesar cipher
Caesar cipher
93
A hash function can produce the same output for different inputs. (True/False) T True F False
False
94
In context to number theory, what does the term modulo refer to? Show answer choices The remainder after division of one number by another The product of two numbers The total count of prime numbers The sum of digits in a number
The remainder after division of one number by another
95
In a substitution cipher, how is data transformed? Show answer choices By replacing each letter with another letter By rearranging letters By converting letters to numbers By shifting all letters by a fixed amount
By replacing each letter with another letter
96
Which of the following is a characteristic of a prime number? Show answer choices It is an even number It has an infinite number of factors It has exactly two distinct positive divisors: 1 and itself It is divisible by at least one other number
It has exactly two distinct positive divisors: 1 and itself
97
Which property is essential for a function to be considered a hash function? Show answer choices Linearity Randomness Reversibility Determinism
Determinism
98
Why is frequency analysis effective against simple ciphers? Show answer choices It uses brute force to try every possible code It analyzes the frequency of letters or groups of letters to decipher encryption It changes the keys used in encryption It relies on prime numbers to break encryption
It analyzes the frequency of letters or groups of letters to decipher encryption
99
SHA-256 is widely used because it produces a secure fixed-size __________
Hash
100
Binomial Theorem
formula that describes the algebraic expansion of powers of a binomial.
101
Permutations consider the order of items. T True F False
T
102
Binomial Coefficient
Counts ways to choose k elements from n.
103
permutation formula
n!/(n-r)!
104
Combination formula
n!/r!(n-r)!
105
A set with one element is called a
singleton
106
An example that proves a statement false is often called a
counterexample
107
direct approach to proving a conditional of the form “if A then B” starts with the assumption that the antecedent ______________
A is true.
108
is a false statement
contradiction
109
starts out by assuming that the statement to be proved is false
proof by contradiction
110
another name for proof by contradiction
indirect proof
111