Week 8 Flashcards

1
Q

What problems are not known to be in P?

A

Travelling salesperson
Bin-pacing
Graph colouring
Timetabling

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

What is the travelling salesman?

A

Decide if a salesperson can complete a round trip of N cities within a given mileage allowance, visiting each city exactly once.

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

What is the Hamilton cycle problem

A

In TSP it decides whether a round trip that visits each city exactly once is even possible.

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

What is the Bin-packing problem?

A

Decide if T trucks, each of which can carry a load W can carry N crates of different weights.

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

What is the Knapsack problem?

A

0-1 knapsack problem is to pack a backpack that can hold weight W with items of different weights and values.

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

What is graph colouring problem

A

Assign colours to each vertex of a graph G such that no adjacent vertices get same colour. The aim is to minimize the number of colours while coloring a graph.

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

What is the timetabling problem

A

The timetabling problem is to create a timetable so that given a list of modules, a list of students enrolled on those modules, and the timeslots available, no student has a clash.

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

How do we make progress for problems not in P

A

Use algorithms that find:
solutions that are approximate
solutions that come quickly on average
solutions that are probably correct.

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

Explain solutions that are approximate

A

One way to make progress is to find solutions that are
approximate — a reasonably short tour or a timetable with a
few clashes may be better than nothing.

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

Explain solutions that come quickly on average

A

Another way to make progress is to find solutions that come
quickly on average — typical data may not cause a problem.

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

Explain solutions that are probably correct

A

Another way to make progress is to find solutions that are
probably correct — there is a very small chance the solution
will be incorrect.

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

What is the complexity class NP

A

NP is for problems for which there are no known algorithms for finding solutions in P, but there are algorithms for checking solutions in P.

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

What does NP stand for

A

Non-deterministic polynomial time. It is the collection of decision problems that can be solved by a
non-deterministic machine in polynomial time.

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

Whats an example of NP problem

A

Sudoku

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

What are NP complete problems?

A

The hardest problems in NP. If an algorithm in P was found for it, there would be algorithms in P found for all of them.

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

What is the SAT problem?

A

The SAT problem is to assign values to the variables of a
boolean formula 𝜑 that make it true.
For
𝜑 = (¬𝑝 ∨ 𝑞) ∧ (¬𝑞 ∨ 𝑟) ∧ (𝑝 ∨ 𝑞 ∨ ¬𝑟)
take 𝑝 = false and 𝑞 = true, and 𝑟 = true.
The SAT problem is NP-complete.

17
Q

What are other NP-complete problems?

A

Clique
String correction problem
Rubik’s cube problem
Subgraph isomorphism problem

18
Q

What is clique problem?

A

Find a fully connected subgraph in a graph. It is NP-complete.

19
Q

What is the string correction problem?

A

Compute the shortest edit distance between one string and another. e.g. rain -> shine is 4 steps
Replace Delete Insert Copy

20
Q

What is the rubiks cube problem?

A

Compute the minimal unscrambling action needed to make all of the faces the same.

21
Q

What is Subgraph Isomorphism problem?

A

Determine whether one graph G contains a subgraph that is isomorphic to H. It is NP complete.

22
Q

How do we solve NP-complete problems?

A

Exact algorithms
Approximate algorithms
Probablistic algorithms

23
Q

What is an exact algorithm?

A

Usually only work for relatively small input
Travelling salesman has (n-1)!/2 possible tours, so O(n!). Using dynamic programming to remember subtours makes this O(n^2 2^N)

24
Q

What is an approximate algorithm?

A

Finds a decent solution that is not optimal but can be computed in P time.

25
Q

What is a probablistic algorithm?

A

Finds a solution that is probably a good one.

26
Q

What is a probablistic algorithm?

A

Finds a solution that is probably a good one.