Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Shopping at the store helps maintain the site. Thank you.
Learning Math Online
Sites for teachers
Sites for parents
Terms of use
Awards
Interactive Activities

CTK Exchange
CTK Wiki Math
CTK Insights - a blog
Math Help

III Millennium Olympiad

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Stories for Young
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Games to relax

Sites for teachers
Sites for parents

Education & Parenting

Manifesto  |  Bookstore  |  Contents  |  Amazon store  |  Term index  |  What changed?  |  Contact  |  Recommend
RSS Feed: Recent changes at CTK

Marriage Problem

The applet below is a simulation of the W.McWorter's algorithm. The following controls are available:

  1. You can manually swap rows, columns, or both. There are three radio buttons: r, c, and b to indicate the action of your choice. Click outside the board near the row/column you want to be swapped. Then, in the same manner, pick another row/column.
  2. You can instruct the applet to perform the next step of the algorithm by pressing Step.
  3. It will continue until finished if you press either Fast or Slow.
  4. Reset can be pressed at any time.
  5. The same is true of Log. Have it on if you want a logout of the steps.
  6. When you press reset the board is filled randomly. You may click on squares to toggle their value.
  7. You may take your steps back. Note, however, that some algorithmic steps do two swaps, some do only one. You may only take back one swap at a time.

This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Which it is not. If you want to see the applet work, visit Sun's website at http://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.


Buy this applet
What if applet does not run?

Experimenting with the applet leads to several observations:

  1. Consider a matrix with 1s in squares next to the diagonal and 0s everywhere else, aij = 1 iff |i - j| = 1, and aij = 0, otherwise. Prove that if n, the size of the matrix, is even, the complete match possible. The complete match is impossible if n is odd.

  2. Start with the unit (diagonal) matrix: aij = 1 iff i = j. This matrix has the property that there is just a single 1 in every column and every row. General matrices with this property are called permutation matrices. Such matrices appear in the Calendar Magic puzzle and the Rook Problem. The name permutation matrices is explained by the fact that such matrices supply an additional way to represent a permutation. Every permutation matrix encodes a solution to the marriage problem. The algorithm is blind to this fact. It attempts to construct a transversal of 1s, and results in the longest sequence of 1s that may be placed on the diagonal. Prove that, for a permutation matrix, the algorithm performs this task within the Greedy Phase.

Copyright © 1996-2009 Alexander Bogomolny

34220568Page copy protected against web site content infringement by Copyscape


Search:
Keywords:

Google
Web CTK