Well the first part would be to somehow keep track of what is connected to what.
One way would be to have the nodes you drag around, and the connections could be indicated by line sprites with two variables that indicate the two uids of the connected nodes.
Since these are electronic components, I'd suppose each component has two nodes, an in and an out if you will.
So you'd have components you can drag around, each with two nodes. Then you'd have a way to add a wire between any two nodes. It's doable by referencing stuff by uids, but there are probably other ways.
To tell if a connection setup matches another should mostly be a matter of checking if the same list of components are used, and they have the same connections. I need to mess with the idea more since there is the issue with the order you added the components. Also most components with maybe the exception of batteries can be connected in reverse. So it would amount to checking all the different combinations.
You could probably do it easier by checking some other criteria to see if it's a correct setup. Maybe just the same components used and everything is powered. Things like limiting the configurations possible can simplify things too, such as a single loop circuit.
That leads to how the power is transmitted. For a single battery a simple thought would be to start from the positive and do a astar search along the connected nodes to the negative. For a true simulation it's probably more nuanced dealing with resistance. Probably a flood fill along the connections would work. Flood till you make a circuit. Electricity physics would be your friend here for really good results.
Anyways, here's a example of how uids could be used to keep track of the connections. It also shows how a basic flood fill can be done. Could be useful for some ideas.
dropbox.com/s/yh85n6xjtwij2f9/node_idea.capx