Chapter 27 Flashcards

1
Q

What is fractional knapsack problem

A

In the 0-1 Knapsack problem, we are not allowed to break items. We either take the whole item or don’t take it.
In Fractional Knapsack, the setup is exactly the same but we can break items for maximizing the total value of knapsack.

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

what is knapsack problem

A

The knapsack problem or rucksack problem is a problem in combinatorial optimization: Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.

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

Can we solve fractional knapsack problem with greedy algorithm and it is optimal

A

Yes

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

What is row eye

A

Price/weight = answer is row eye for that data set

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

Can we solve knapsack problem with greedy algorithm and is it optimal

A

We can solve knapsack problem with greedy algorithm but its not optimal

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

What gives optimal solution in knapsack problem

A

Dynamic programming

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

When we can built graph

A

In a condition when:

  • A set of objects
  • relationship between objects
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are example of graphs

A

computer and communicate network, transport network, GIS, VLSI (very large scale integration) etc

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

If we have ordered pair then we will have directed graph. True or False

A

True

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

If we have unordered pair then we will have undirected graph. True or False

A

True

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

What are types of graphs

A

Graph, digraph and multi graph

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

What is digraph

A

directed graph

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

What is adjacent vertices

A

A vertex W is adjacent to vertex V if there is an edge from V to W

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

What is incident edge

A

In an undirected graph, we say that an edge is incident on a vertex if the vertex is an end point of the edge

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

what is out-degree

A

In a digraph, the number of edges coming out of a vertex is called out-degree of that vertex.

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

What is in-degree

A

In digraph, number of edges coming in is the in-degree