move_up function

Move to parent in adjacency matrix