Branch and bound method for wiring problem