CATEGORY: MATHEMATICS Flashcards

1
Q

What is the time complexity of the binary search algorithm in the worst case?
a) O(n)
b) O(log n)
c) O(n log n)
d) O(1)

A

Answer: b) O(log n)

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

Which number system is most commonly used in computer science?

A

Binary

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

The Greatest Common Divisor (GCD) of two numbers can be efficiently computed using:

A

The Euclidean Algorithm

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

In public-key cryptography, which mathematical problem is the security of RSA encryption based on?
a) Solving linear equations
b) Factorizing large prime numbers
c) Computing the square root of a number
d) Finding the determinant of a matrix

A

Answer: b) Factorizing large prime numbers

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

Which of the following data structures is based on the mathematical concept of graphs?
a) Stack
b) Queue
c) Binary Search Tree
d) Linked List

A

Answer: c) Binary Search Tree

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

The Fibonacci sequence can be computed efficiently using dynamic programming.
TRUE OR FALSE

A

Answer: True

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

The P vs NP problem asks whether every problem whose solution can be verified in polynomial time can also be solved in polynomial time.
TRUE OR FALSE

A

Answer: True

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

The floating-point representation of numbers in computers is completely precise and does not introduce errors.

A

Answer: False (Floating-point arithmetic can introduce rounding errors due to finite precision.)

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

Big-O notation describes the exact running time of an algorithm.

A

Answer: False (Big-O describes the asymptotic upper bound of an algorithm’s growth rate.)

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

The Fast Fourier Transform (FFT) is used in computer science for efficient polynomial multiplication and signal processing.
TRUE OR FALSE

A

Answer: True

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

Which algorithm is used for finding the shortest path in a weighted graph?
a) Floyd-Warshall Algorithm
b) Kruskal’s Algorithm
c) Dijkstra’s Algorithm
d) Prim’s Algorithm

A

Answer: c) Dijkstra’s Algorithm

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

Which of the following data structures is used in Depth-First Search (DFS)?
a) Queue
b) Stack
c) Hash Table
d) Heap

A

Answer: b) Stack

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

In combinatorics, how many ways can you arrange 5 distinct objects in a row?

A

5!

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

Which of the following sorting algorithms has an average-case time complexity of O(n log n)?
a) Bubble Sort
b) Merge Sort
c) Selection Sort
d) Insertion Sort

A

Answer: b) Merge Sort

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

The SHA-256 algorithm is primarily used for:
a) Data encryption
b) Secure password hashing
c) Generating random numbers
d) Key exchange

A

Answer: b) Secure password hashing

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

In the RSA encryption algorithm, which mathematical operation is used for encryption and decryption?

A

Modular exponentiation

17
Q

A one-time pad encryption method is considered unbreakable if:

A

The key is truly random and as long as the message

18
Q

In supervised learning, what does the algorithm learn from?
a) Only input data
b) Only output data
c) Labeled input-output pairs
d) Unlabeled data

A

Answer: c) Labeled input-output pairs

19
Q

Which mathematical function is commonly used as an activation function in deep neural networks?

A

Sigmoid function

20
Q

In gradient descent, what does the learning rate control?
a) The number of layers in a neural network
b) The size of the step taken towards minimizing the loss function
c) The number of neurons in a layer
d) The amount of training data used

A

Answer: b) The size of the step taken towards minimizing the loss function

21
Q

The K-means clustering algorithm is used in:

A

Unsupervised learning

22
Q

The Cook-Levin theorem states that the Boolean satisfiability problem (SAT) is:

A

NP-complete

23
Q

The Bellman-Ford algorithm is used to find the shortest path in graphs that:

A

Contain negative weights but no negative cycles

24
Q

The Master Theorem is used for analyzing:

A

Divide-and-conquer recurrences

25
Q

What is the time complexity of the Strassen algorithm for matrix multiplication?

26
Q

In modular arithmetic, what is the modular inverse of 3 mod 7?

27
Q

Elliptic curve cryptography (ECC) relies on the difficulty of solving:
a) Integer factorization
b) The discrete logarithm problem on elliptic curves
c) The subset sum problem
d) The knapsack problem

A

b) The discrete logarithm problem on elliptic curves

28
Q

The Chinese Remainder Theorem is useful in cryptography for:

A

Efficient computation with large numbers

29
Q

In machine learning, Principal Component Analysis (PCA) is primarily used for:

A

Feature reduction

30
Q

In deep learning, vanishing gradients occur when:
a) The learning rate is too high
b) The weights update too quickly
c) Gradients become very small, preventing learning
d) There are too few neurons in the network

A

c) Gradients become very small, preventing learning

31
Q

Eigenvalues and eigenvectors are used in:

A

Dimensionality reduction techniques

32
Q

The Halting Problem is an example of a problem that is:

A

Undecidable

33
Q

Which complexity class contains problems that can be solved in polynomial time but are not necessarily in P or NP?