Abstract

As part of a Technical and Scientific Project offered to L2 students of ISEP over a period of four months at the rate of one hour per week supervised, a study of the composition and the total number of all riffle shuffles used in magic was requested. The riffle shuffle consists of taking a deck of cards, cutting it into any two parts, then inserting randomly the cards of the first packet into the second. In first approximation there are 52! possible riffle shuffles. This number is an upper limit since the cards in a subdeck cannot change their relative position to their neighbours. A card A below a card B in the same subdeck will not be able to find itself above in the final shuffle. The first goal of the project is to compare one single algorithm implemented either recursively or iteratively in terms of execution time depending on the number of cards. The second goal is to compare the implementation of the same algorithm (either iterative or recursive) in several different programming languages (Python, Language C, Matlab, etc.) and to compare execution times according to the used language. Thus, a recursive algorithm was proposed to the students. All the students tried to code this algo and make it iterative … except one! He imagined another algorithm. The algorithm of the student and the teacher were compared in terms of execution time: do the student exceed the master? The aim of this article is to share my experience. I leave it to you to imagine educational sequences around this project in adequacy with your desires and the level of your students.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call