On minimum efficient dominating sets in paths and cycles