LN8 Closest points Flashcards

1
Q

What is a problem reduction in the context of algorithms?

A

A reduction involves transforming a problem X into another problem Y, allowing an algorithm designed for Y to solve instances of X.

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

Give an example of a reduction between two problems.

A

To multiply two integers a and b, we can reduce this to the problem of squaring by using the formula ab = ((a + b)² - (a - b)²) / 4, utilizing a squaring algorithm.

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

What are the two main purposes of reductions in algorithms?

A

1) To solve problem X using an algorithm for a different problem Y, and 2) to show that one problem Y is at least as hard as another problem X.

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

Define polynomial-time reducibility.

A

Problem X is polynomial-time reducible to problem Y if we can transform instances of X to Y in polynomial time, ensuring that Y’s solution can be translated back to a solution for X.

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

What is a decision problem in computational complexity?

A

A decision problem is a problem with a yes/no answer, such as determining if a graph contains a clique of size k.

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

How is the Clique problem formally defined?

A

Given an undirected graph G, the Clique problem asks whether there exists a subset of nodes K where every two nodes are connected by an edge, with K containing at least k nodes.

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

Describe the Independent Set problem in graph theory.

A

Given a graph G, the Independent Set problem seeks the largest subset of nodes such that no two nodes in this subset share an edge.

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

What is the relationship between the Clique and Independent Set problems?

A

Clique and Independent Set are complementary: finding a k-clique in a graph G is equivalent to finding an independent set of size k in the complement graph of G.

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

Explain the concept of a Vertex Cover in a graph.

A

A vertex cover in a graph is a subset of vertices such that each edge in the graph is connected to at least one vertex in this subset.

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

How can Independent Set and Vertex Cover be reduced to each other?

A

For any graph G, a subset C is a vertex cover if and only if the complement set V \ C is an independent set, allowing a reduction by setting the threshold accordingly.

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

What is the complexity class P

A

P is the class of decision problems that can be solved in polynomial time, meaning there exists an algorithm that can solve the problem in O(p(n)) time, where p is a polynomial.

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

Define the complexity class NP.

A

NP is the class of decision problems for which a given solution can be verified in polynomial time, assuming an “advice” (like a solution) is provided.

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

What does NP-completeness signify for a problem?

A

An NP-complete problem is one of the hardest problems in NP; if any NP-complete problem is solved in polynomial time, all problems in NP can be solved in polynomial time.

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

What would it imply if P = NP?

A

If P = NP, every problem that can be verified quickly (NP) can also be solved quickly (P), which would mean polynomial-time algorithms exist for all NP problems.

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

Explain the transitivity of polynomial-time reducibility.

A

If problem X reduces to problem Y in polynomial time and Y reduces to problem Z in polynomial time, then X reduces to Z in polynomial time.

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

Describe the SAT (Satisfiability) problem in computational complexity.

A

SAT asks whether a Boolean formula, made up of literals connected by logical operators, has an assignment of truth values that makes the formula true.

17
Q

How is SAT related to NP-completeness?

A

SAT was the first problem proven to be NP-complete, and it serves as a basis for showing the NP-completeness of other problems via reductions.

18
Q

What does a CNF (Conjunctive Normal Form) in SAT look like?

A

In CNF, a Boolean formula is represented as a conjunction of clauses, where each clause is a disjunction of literals.

19
Q

How can we use reductions to show problem hardness?

A

By showing that a known hard problem (like an NP-complete problem) can be reduced to another problem in polynomial time, we infer the latter problem’s hardness.

20
Q

Why are reductions important in comparing problem difficulty?

A

Reductions allow us to determine if one problem is at least as difficult as another, guiding where to focus efforts for finding efficient algorithms.

21
Q

What is Interval Scheduling, and how is it related to Independent Set?

A

Interval Scheduling, which seeks a set of non-overlapping intervals, is a special case of Independent Set when intervals are converted to an interval graph.

22
Q

Why can’t all problems be reduced to Interval Scheduling?

A

Many graphs cannot be represented as interval graphs, meaning not every independent set problem can be reduced to Interval Scheduling.