CATEGORY: MATHEMATICS Flashcards
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)
Answer: b) O(log n)
Which number system is most commonly used in computer science?
Binary
The Greatest Common Divisor (GCD) of two numbers can be efficiently computed using:
The Euclidean Algorithm
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
Answer: b) Factorizing large prime numbers
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
Answer: c) Binary Search Tree
The Fibonacci sequence can be computed efficiently using dynamic programming.
TRUE OR FALSE
Answer: True
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
Answer: True
The floating-point representation of numbers in computers is completely precise and does not introduce errors.
Answer: False (Floating-point arithmetic can introduce rounding errors due to finite precision.)
Big-O notation describes the exact running time of an algorithm.
Answer: False (Big-O describes the asymptotic upper bound of an algorithm’s growth rate.)
The Fast Fourier Transform (FFT) is used in computer science for efficient polynomial multiplication and signal processing.
TRUE OR FALSE
Answer: True
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
Answer: c) Dijkstra’s Algorithm
Which of the following data structures is used in Depth-First Search (DFS)?
a) Queue
b) Stack
c) Hash Table
d) Heap
Answer: b) Stack
In combinatorics, how many ways can you arrange 5 distinct objects in a row?
5!
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
Answer: b) Merge Sort
The SHA-256 algorithm is primarily used for:
a) Data encryption
b) Secure password hashing
c) Generating random numbers
d) Key exchange
Answer: b) Secure password hashing
In the RSA encryption algorithm, which mathematical operation is used for encryption and decryption?
Modular exponentiation
A one-time pad encryption method is considered unbreakable if:
The key is truly random and as long as the message
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
Answer: c) Labeled input-output pairs
Which mathematical function is commonly used as an activation function in deep neural networks?
Sigmoid function
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
Answer: b) The size of the step taken towards minimizing the loss function
The K-means clustering algorithm is used in:
Unsupervised learning
The Cook-Levin theorem states that the Boolean satisfiability problem (SAT) is:
NP-complete
The Bellman-Ford algorithm is used to find the shortest path in graphs that:
Contain negative weights but no negative cycles
The Master Theorem is used for analyzing:
Divide-and-conquer recurrences
What is the time complexity of the Strassen algorithm for matrix multiplication?
O(n^2.81)
In modular arithmetic, what is the modular inverse of 3 mod 7?
5
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
b) The discrete logarithm problem on elliptic curves
The Chinese Remainder Theorem is useful in cryptography for:
Efficient computation with large numbers
In machine learning, Principal Component Analysis (PCA) is primarily used for:
Feature reduction
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
c) Gradients become very small, preventing learning
Eigenvalues and eigenvectors are used in:
Dimensionality reduction techniques
The Halting Problem is an example of a problem that is:
Undecidable
Which complexity class contains problems that can be solved in polynomial time but are not necessarily in P or NP?
PSPACE