Magic Trick
Contraction Mapping Theorem. If (X, d) is a complete
metric space and T : X -> X is a contraction mapping, then T has
one and only one fixed point (i.e., there exists exactly one x belonging
to X such that T(x) = x.
If you are interested in a proof, I'm sure you'll find something in google. Source Code
- MagicTrick.java - Applet code. Image stripping is used to minimize network noise at download time
- Deck.java - Deck of cards
- Card.java - Cards abstraction
- cards.gif - Image of all cards
One last thingI have to clarify that when I coded the Java applet I didn't know about the Contraction Mapping Theorem. Thus, the code is stricly following the rules as they were explained to me by my dad. So the code is neither a Mathematical proof nor a direct implementation of the Linear Algebra involved. I'd think Maple would do a better job at visualizing something like this, rather than a card trick. However, I'm still amazed how everything is connected and how a simple game can be used to explain complex mathematics. |

Guestbook | ©
Jose Sandoval 2004-2009 jose@josesandoval.com |