Semi-direct product in groups and Zig-zag product in graphs: Connections and applications