Computer Science Theory
This quiz covers fundamental concepts and theories in computer science, including algorithms, data structures, complexity analysis, and automata theory.
Questions
Which sorting algorithm has a worst-case time complexity of O(n^2) but a best-case time complexity of O(n)?
- Bubble Sort
- Merge Sort
- Quick Sort
- Heap Sort
What is the time complexity of finding the minimum element in an unsorted array of size n?
- O(n)
- O(log n)
- O(n^2)
- O(1)
Which data structure is used to efficiently store and retrieve elements based on their priority?
- Queue
- Stack
- Heap
- Linked List
What is the maximum number of edges in a graph with n vertices and no self-loops?
- n(n-1)
- n(n+1)
- n^2
- n^3
Which algorithm is used to find the shortest path between two nodes in a weighted graph?
- Dijkstra's Algorithm
- Floyd-Warshall Algorithm
- Kruskal's Algorithm
- Prim's Algorithm
What is the name of the theorem that states that any sufficiently large integer can be expressed as the sum of three primes?
- Goldbach's Conjecture
- Fermat's Last Theorem
- Euler's Theorem
- Chinese Remainder Theorem
Which complexity class represents problems that can be solved in polynomial time?
- P
- NP
- NP-complete
- NP-hard
What is the name of the problem that asks whether a given Boolean formula is satisfiable?
- Traveling Salesman Problem
- Knapsack Problem
- 3-SAT Problem
- Hamiltonian Cycle Problem
Which algorithm is used to find the maximum flow in a network?
- Ford-Fulkerson Algorithm
- Kruskal's Algorithm
- Prim's Algorithm
- Dijkstra's Algorithm
What is the name of the theory that studies the relationship between computation and information?
- Computability Theory
- Information Theory
- Complexity Theory
- Automata Theory
Which algorithm is used to find the connected components of a graph?
- Depth-First Search
- Breadth-First Search
- Kruskal's Algorithm
- Prim's Algorithm
What is the name of the theorem that states that any sufficiently large integer can be expressed as the sum of four squares?
- Goldbach's Conjecture
- Fermat's Last Theorem
- Euler's Theorem
- Lagrange's Four-Square Theorem
Which complexity class represents problems that can be solved in exponential time?
- P
- NP
- NP-complete
- EXP
What is the name of the problem that asks whether a given graph contains a Hamiltonian cycle?
- Traveling Salesman Problem
- Knapsack Problem
- 3-SAT Problem
- Hamiltonian Cycle Problem
Which algorithm is used to find the minimum spanning tree of a weighted graph?
- Kruskal's Algorithm
- Prim's Algorithm
- Dijkstra's Algorithm
- Floyd-Warshall Algorithm