Algorithms and Complexity MCQs (Part-11)

What is the primary feature of the class P in computational complexity theory?

A Requires random access memory
B Solvable in polynomial time
C Solvable in exponential time
D Solvable in logarithmic time

What does the NP class represent in computational complexity?

A Problems that have no solution
B Problems solvable in polynomial time
C Problems solvable with random algorithms
D Problems for which solutions can be verified in polynomial time

What is a key difference between NP and NP-Complete problems?

A NP-Complete problems are as hard as any problem in NP
B NP problems have no solution
C NP-Complete problems can be solved faster
D NP-Complete problems are easier to solve

What is the main goal of data compression algorithms?

A To increase data size
B To encode data in binary
C To reduce memory usage
D To generate random data

Which of the following is an example of a lossless data compression algorithm?

A PNG
B MP3
C JPEG
D MPEG

Which of the following is true about PSPACE problems?

A Solvable in polynomial time
B Solvable by brute force
C Solvable with polynomial space
D Requires exponential time

What is the space complexity of a problem in the class PSPACE?

A Exponential
B Polynomial
C Constant
D Logarithmic

What is the purpose of the Huffman coding algorithm?

A Data compression
B Encrypting data
C Data validation
D Sorting data

Which of the following problems is NP-Hard?

A Matrix multiplication
B Searching in a sorted array
C Traveling Salesman Problem
D Sorting

What is the worst-case time complexity of the Merge Sort algorithm?

A O(n log n)
B O(n²)
C O(n)
D O(log n)

What is the main challenge in solving NP-Hard problems?

A The problem requires no algorithm
B The problem can be solved in linear time
C The problem cannot be solved
D The solution requires exponential time

Which of the following is a characteristic of a lossless compression algorithm?

A Produces irrecoverable data loss
B Produces lossy output
C Reduces file size by eliminating redundant data
D Does not require decompression

Which of the following is a compression algorithm used for video files?

A MP3
B JPEG
C Binary Search
D MPEG

What does the class NP-Complete refer to?

A Problems that are both in NP and as hard as any problem in NP
B Problems that cannot be solved
C Problems solvable in polynomial time
D Problems that are easily solvable

What is the main idea behind the greedy algorithm?

A Always pick the most expensive option
B Use dynamic programming for efficiency
C Make local optimal choices to find a global optimum
D Randomly select solutions