Card trick 1

Can you explain how this card trick works?
Exploring and noticing Working systematically Conjecturing and generalising Visualising and representing Reasoning, convincing and proving
Being curious Being resourceful Being resilient Being collaborative

Problem

Try this card trick, it is mathematical. Can you explain (using mathematics) how it works? You might like to consider using some symbolism.

Here are the instructions:

Volunteer chooses 20 cards in the pack to turn face up.

Volunteer then shuffles the pack.

Volunteer removes the top twenty cards without me looking and the remainder are laid on the table.

The twenty cards are handed back to me, without me looking:

I dont know how many cards are reversed in this group I am holding, but it is likely to be less than the number in the rest of the pack. I like things to be balanced so I am going to try to turn some of the cards over so that both piles have the same number face up.


Turn the whole group upside down.

Count out the number which are face up in each pile. (they should both be the same!)