Naive method
Take for example a problem of the knappack. The naive method would be to first take objects of the smallest size until no longer able to put a new object in the bag.
For i from 1 to n if w[i] + w_conso ≤ W then x[i] := 1 w_conso := w_conso + w[i] else x[i] := 0 End End
Greedy algorithm (intuitive method)
Intuitively, we can say that to maximize the utility in the problem of the knapsack: just put the element with the greatest utility (with a size compatible with the remaining size in the bag) until there is no longer space in the bag.
For that, we will consider x and w the vectors of the choice of the object and its weight sorted in descending order of effectiveness (efficiency = utility / weight). Then the algorithm works like the naive method.
Brute force or enumeration
Generally, the solution tree is represented as a tree (graph). We consider the problem of the knapsack with four objects with the following parameters and a bag size of 30:
object

1

2

3

4

u_i

7

3

4

3

w_i

13

8

12

10

The tree is built by iteration: at each iteration, the new leaves represent the fact of taking or not the next object. We obtain the following binary tree:
The vertices in red exceed the maximum size of the bag, the vertex in purple is the optimal solution. As you can see, the number of leaves is 2^{(n1)} for object n. The number of nodes generated up to the object n is 2^{n} 1.