@@ -0,0 +1,877 @@
+def all_paths(g, start, end, path = %5B%5D, paths = %5B%5D):%0A    if start == end:%0A        path.append(end)%0A        return paths%0A    else:%0A        for node in g%5Bstart%5D:%0A            if node not in path:%0A                path.append(start)%0A                return paths.append(all_paths(g, node, end, path, paths))%0A%0Ag = %7B10:%7B11:10%7D,20:%7B21:12%7D, 11:%7B12:16, 22:16%7D, 12:%7B13:14%7D,22:%7B13:30%7D, 13:%7B%7D%7D%0A%0Aprint(all_paths(g, 11, 13))%0A%0A%0A#done%0A#cost%0A#came from%0Astart = %5B#start values#%5D%0Aend = %5B#end values%5D%0Amin_cost = 100000000000000000000000000000000000000000000000000000000000000000%0A%0Afor s in start:%0A    for u in end:%0A        cost = 0%0A        tbl = %5B%5B0 for _ in range(2*n)%5D for _ in range(3)%5D %0A        for v in g%5Bu%5D:%0A            pos_v = g%5Bu%5D.index(%0A            c = tbl%5B1%5D%0A            if g%5Bu%5D%5Bv%5D %3C min_cost:%0A                min_cost = g%5Bu%5D%5Bv%5D%0A                min_u = u%0A                min_v = v%0A        %0A

Create P4.py