• + 1 comment

    The edges will be same as original adjacency list with extension of all 2^K states at one node , That is you there is edge (u,v,c) in the list then there will be (u,i) --> (v,i + items[u]) with cost c and the reverse edges in v,i+items[u] .