[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1939.0. "Mind reading trick" by FLOYD::YODER (MFY) Thu Feb 23 1995 15:11

The problems below are based on the following "mind reading" trick: the magician
is blindfolded; the audience shuffles a normal deck of 52 cards and draws 5
cards, which they give to the magician's assistant.  The assistant looks at the
cards and then reveals 4 of the chosen cards (one at a time) to the magician. 
The magician then announces what the 5th card is.

The problem assumes that the assistant does not cheat by using any communication
method other than what is conveyed by revealing the 4 cards.

Problem 1 (more engineering than math): construct a method which is "easy to
use" which works for a standard 52-card deck: that is, devise a code whereby the
magician is guaranteed to get the card right after being told the other 4 cards
(with an assistant who knows the code and uses it correctly).

It is trivial to show that a method that works for a deck of M cards will work
for a deck of any lesser size.  So define D(N) as the size of the largest deck
that can be used for this trick with guaranteed success if N cards are drawn and
N-1 revealed, where N is a positive integer.

Problem 2 (easy). D(N) <= N! + N - 1.

Problem 3 (hard). D(N) = N! + N - 1.
T.RTitleUserPersonal
Name
DateLines
1939.1neat trickHERON::BUCHANANEt tout sera bien etFri Feb 24 1995 13:1152
	What an interesting idea.

> Problem 2 (easy). D(N) <= N! + N - 1.

	What we're doing in picking the 4 cards is making a map, f, between
C(D,N) [the combinations of N from D objects] and P(D,N-1) [the 
permutations (ordered combinations) of N-1 from D objects.] In order to
identify the 5th card, we require that f be 1-1. This implies that dom(f)
be =< than range(f), i.e.:

	   D!		D!
	________ =< ________
 	N!(D-N)!    (D-N+1)!

which gives the required expression.

> Problem 3 (hard). D(N) = N! + N - 1.

	i.e.: given D = N! + N - 1, does a suitable f exist?

	We use the Marriage Theorem. Suppose that you have n lads and n
lasses, and for each lad & lass, either the lad loves the lass or he doesn't.
Suppose that for each subset, S, of p lads, the set of lasses loved by at
least one person in S has size >= p. Then the Theorem says that we define a
set of n marriages such that each husband loves his wife. (Apologies for the
sexist presentation.) This theorem can be proved from the max-flow-min-cut
theorem.

	Suppose that we have our lads and lasses as before, and that what
we know is that each lad loves k lasses, and each lass is loved by k lads,
where k >= 1. Then a set of p lads will have pk loves for lasses. Any one
lass can be loved by at most k of the p lads, so the set of lasses loved
by the p lads contains >= pk/k = p lasses. So by the theorem, a set of
n marriages can be defined.

	This corresponds to the situation we have in the problem here. 
Suppose that we have picked N cards from D (a lad). Then there are k=N.(N-1)!
= N! permutations of N-1 cards from N that we can map to (k lasses loved
by the lad.) Equally, each permutation can appear from k combinations.
(Each lass is loved by k lads). Thus the theorem applies, and a function
f must exist.

	Note that this is not a constructive proof. Given the unappealing form
of D (= N! + N - 1), any "natural" f which could be constructed would probably
involve some quite deep combinatorics.

	For N = 5, D = 124, so in principle we could do the same magic trick
even with *two* distinguishable packs of cards (say green-backs and yellow-
backs), since 104 =< 124.

Hugs,
Andrew.
1939.2There is a constructive proofFLOYD::YODERMFYFri Feb 24 1995 14:205
Re: .1

Nice... but now, of course, I'll ask for a constructive proof.  (Possible hint:
no deep combinatorics are needed after all, and this was contrary to my
intuition also.)
1939.3Engineering for magiciansWIBBIN::NOYCEAlpha's faster: over 4.2 billion times (per minute)Fri Feb 24 1995 14:5721
Problem 1:

First, we need a mapping for permutations of 3 cards to a number from 1 to 6:
	ABC = 1		BCA = 4
	ACB = 2		CAB = 5
	BAC = 3		CBA = 6

The magician looks at the ranks (Ace of spaces = high, Deuce of clubs = low,
or some other convention) of the first three cards presented, and translates
the permutation to a number as above.

To the fourth card presented, add this number (modulo 13) to come up with
the number for the hidden card.  The hidden card has the same suit as the
fourth card presented.

=====

Picking 5 cards from a deck with 4 suits ensures you get at least one
pair from the same suit.  With 13 numbers in a suit, you can get from
one of these to the other with only 6 steps (though going the other way
will take more).
1939.4FlawedPOLAR::WALSHMFri Feb 24 1995 15:1813
    re .3: Nice, but not robust.
    
    Consider the following draw:
    	Ace of Hearts
    	Ace of Diamonds
    	Ace of Spades
    	Five of Clubs
    	Seven of Clubs
    According to your system, either the five or the seven would be the
    card withheld, but AAA doesn't give the magician much information. ;)
    
    	Matt
    
1939.5Defense of .3FLOYD::YODERMFYFri Feb 24 1995 16:296
I think the idea was that a total ordering of the cards was to be used; for
example, that all spades outrank all hearts, etc.  Alternatively the cards
within a rank could be ordered this way.  Possibly the choice of "rank" as a
term was unfortunate.

If this is so, the method of .3 is identical to the one I had in mind.
1939.6HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri Feb 24 1995 19:3930
If mark gives 5 cards to assistant, and holds up a 6th for assistant to see,
assistant can read the 5 cards to magician and magician can announce which
card the mark is holding.

This has the advantage that mark gets to choose the secret card.

My understanding of the original problem is that mark hands 5 cards to
assistant, and the assistant chooses which card is to be announced by
the magician.

Although 1 more card is needed for my way, it might amaze the mark more, since
s/he gets to choose the secret card.

My idea for how this new trick would work is that any 5 cards have 5! or
120 orders in which they can be announced (more than 52, which 4! unfortunately
is not) and hence depending on which of the 120 orders assistant chooses,
magician and assistant agree that assistant will choose the order whose
mod 52 is the secret card.

In practicality, it might work like this:  The five cards are A,B,C,D,E.
Assistant finds rank of secret card (0 through 51), then changes it to a
5-digit binary number d0,d1,d2,d3,d4.   If d0 is 0, he arranges A to be less
than B, otherwise A greater than B.  If d1 is 0, he arranges B to be less
than C, etc.  The last digit determines whether E is less than A.

(It's alot easier for magician to *decode* the result than for assistant
to shuffle the 5 cards into correct order!)

/Eric
1939.7The method in .3 does not workHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Mon Feb 27 1995 19:4539
I do not believe the method in .3 works.  Here's what was said.

> First, we need a mapping for permutations of 3 cards to a number from 1 to 6:
> 	ABC = 1		BCA = 4
> 	ACB = 2		CAB = 5
> 	BAC = 3		CBA = 6
> 
> The magician looks at the ranks (Ace of spaces = high, Deuce of clubs = low,
> or some other convention) of the first three cards presented, and translates
> the permutation to a number as above.
> 
> To the fourth card presented, add this number (modulo 13) to come up with
> the number for the hidden card.  The hidden card has the same suit as the
> fourth card presented.

Suppose the 5 cards are

	3c 5d 8s 9h 10h


Your instructions didn't say *what* number from 1 to 6 should be conveyed
by the first 3 cards.  I would assume you'd like to convey the numerical
rank of the secret card modulo 6.

Secret card is 10 for our discussion, which modulo 6 is 4.  So, assume
that those first 3 cards are in an order that conveys "4" to the magician.

We add 4 to the 9, which is 13, take it modulo 13, giving us 0.  How the
heck is the magician supposed to deduce "10" from this "0" ?

Besides, there are *two* possible cards in each suit (out of the 12 left
after discarding the other revealed card of the suit) that map to each modulo
6 value, so I don't see how your method could possibly work.


The other flaw in your method is that there's no way for assistant to
guarantee to the magician that when the number from 1 to 6 is added to one
of the 2 commonly-suited cards, that it will equal the number on the other
card.
1939.8AUSSIE::GARSONachtentachtig kacheltjesTue Feb 28 1995 00:1834
re .7

I believe the method in .3 does work.

>Suppose the 5 cards are
>
>	3c 5d 8s 9h 10h


>Your instructions didn't say *what* number from 1 to 6 should be conveyed
>by the first 3 cards.  I would assume you'd like to convey the numerical
>rank of the secret card modulo 6.

Assume that the first three cards convey precisely some number 1 to 6.

>Secret card is 10

Secret card is 10 and we have to add 1 to get from the 9h to 10h so the
first three cards must convey the number 1.

Suppose though that the heart cards were Qh and 2h then in that case the
secret card must be the 2h and the first three cards must convey 3. The
trick is to select the secret card so that you can go forward (including
wrapping around from king to ace) not more than 6 cards. Put another way,
imagine a clock face with 13 hours on it and two hours selected at random.
One of them is always within 6 hours after the other.

>The other flaw in your method is that there's no way for assistant to
>guarantee to the magician that when the number from 1 to 6 is added to one
>of the 2 commonly-suited cards, that it will equal the number on the other
>card.

This is precisely the intent of the last paragraph of .3. The assistant
must choose the secret card that allows this.
1939.9HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Tue Feb 28 1995 13:386

Thanks, I see it now.  I hadn't realized the trick about "wrapping" around from
the highest card back to the lowest.

/Eric
1939.10proposal for general solutionHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Wed Mar 01 1995 17:3334
Here's my proposal for the general solution.

Actually, I'll describe a method for drawing 5 cards from a deck of 124
cards.  Generalizing should be trivial from this.

Pretend the cards in the deck are ranked 0 through 123, without any suits.

Magician decodes the ordering of the 4 cards announced into a number from
1 to 24.

He then multiplies this number by 5, producing a value from 5 through 120.

The magician then adds this value to the first card that was announced, taking
the result modulo 124, thus producing a final number of 0 through 123.

This will be the value of the hidden card.

Now, let's talk about what the assistant does.

The assistant mentally(!) looks at all 120 orders of the 5 cards.  For each
ordering, he computes the distance from the first card to the last, divides
it by 5.  If there's a remainder, he tries a different order.

For each order whose first to last distance is a multiple of 5, he takes
that multiple (a number from 1 to 24) and sees if the ordering of the first 4
cards is the correct encoding for the multiple.  If so, he announces
those 4 cards.  If not, he goes on to the next ordering.

Conjecture:  There will be at least 1 ordering that fits.  Can you prove
or disprove ?  If I feel like taking time later, I'll write a computer program
to exhaust the possibilities.

/Eric
1939.11counterexample?FLOYD::YODERMFYWed Mar 01 1995 19:009
I think your scheme can't successfully work for both the hands {0,1,2,3,4} and
{120,121,122,123,0}.  For each, the only usable gap that's divisible by 5 is the
one of size 120 which spans from 4 to 0 (or 0 to 120).  So for one hand, you
must show 4 first (the largest card) and for the other you must show 0 first
(the smallest card).  But both must encode the same permutation, since the gap
(120) is the same for the two cases.

The problem is that the first card is overdetermined: it must both be the start
of the gap, and also part of a permutation with the right ordering.
1939.12improvement on .10HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Thu Mar 02 1995 13:3264
o.k. I'll adjust a bit to make it work.  Suppose the hand is

	0,1,2,3,4

I'll hide the 4 and announce

	0,1,2,3

Magician decodes this into "0" (the lowest value) and hence knows the
answer is "4" because of the *remaining* cards, the "4" has relative rank
"0".

So note the 2 changes to the scheme from note .10:

1)	The ordering of the 4 cards is decoded into a number from 0 to 23,
	not a number from 1 to 24.

2)	We introduce the concept of RELATIVE RANK (rr).  The rr of a card
	is it's relative rank once the revealed cards have been deleted.

Let's see if this works with

	120,121,122,123,0

Sure, it's isomorphic to previous.  We hide the "0" and announce

	120,121,122,123

Magician again decodes this into "0", and knows the secret card is "0" since
of the remaining cards, card "0" has rr of 0.


Here's the corrected version for solving the 124-card 5-draw problem:

Assistant mentally tries every possible ordering of the 5 cards.

For each ordering, assistant decodes the ordering of the first 4 into a number
from 0 to 23.  This is multiplied by 5 giving a number from 0 to 115.

Finally, this is added to the first card, taken modulo 120 (because there
are only 120 cards left unrevealed).

If the 5th card's relative rank (face rank decremented once for each of the
first 4 cards whose value it exceeds) matches the final value, then the
assistant uses this ordering.

Conjecture: At least one ordering of any given draw will be able to arranged
as above.

Here's what the magician does.

He decodes the announced ordering of the 4 cards in to a number from 0 to
23.  He multiplies that number by 5 to give a number from 0 to 115, which he
adds to the first card announced, and takes the result modulo 120.

Finally, the magician thinks about each of the four announced numbers in turn,
from lowest to highest, and if it is less than or equal to his computed
value so far, he increments his value by 1.

Phew.  I hope I got that right.  I'm feeling a bit shaky about the instructions
for that bit about relative rank, but I hope you get what I mean.

/Eric
1939.13question on .12FLOYD::YODERMFYThu Mar 02 1995 17:2011
I'm not sure I get it.  Does having all the cards in order always encode the
card 0 (unless 0 is one of the cards revealed), or does it encode the first
unrevealed card higher than the first revealed card?  That is, does revealing

    10, 20, 30, 40

encode card 0 or card 11?  And does

    10, 11, 13, 14

encode card 0 or card 12?  (Or have I misunderstood entirely?)
1939.14HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri Mar 03 1995 13:4941
Here's what I said the magician does (in .12):

> He decodes the announced ordering of the 4 cards in to a number from 0 to
> 23.  He multiplies that number by 5 to give a number from 0 to 115, which he
> adds to the first card announced, and takes the result modulo 120.
> 
> Finally, the magician thinks about each of the four announced numbers in turn,
> from lowest to highest, and if it is less than or equal to his computed
> value so far, he increments his value by 1.


In .13, you asked:

> I'm not sure I get it.  Does having all the cards in order always encode the
> card 0 (unless 0 is one of the cards revealed), or does it encode the first
> unrevealed card higher than the first revealed card?  That is, does revealing
> 
>     10, 20, 30, 40
> 
> encode card 0 or card 11?

If I follow the .12 instructions, I decode the four numbers.  This produces
0.  I multiply by 5, producing 0.  I add that to 10 to get 10.  Lastly, I
consider each number in turn, and in this case one of the numbers (the 10)
is less than or equal to my computed 10 so I bump the computed one to 11.

So yes, 10,20,30,40 says 11, not 0.

Now let's do your other .13 question:

>   And does
> 
>     10, 11, 13, 14
> 
> encode card 0 or card 12?  

Again, the decoded value is 0 (because numbers are strictly increasing), which
is multiplied by 5 to get 0 again, then added to 10 to get 10, and this time
we bump twice, giving us a secret card of 12.

/Eric
1939.15question about .14FLOYD::YODERMFYFri Mar 03 1995 15:592
OK... but if that's so, are you sure you want your instructions to say mod 120
rather than mod 124?
1939.16Claimed disproof of .12 methodFLOYD::YODERMFYFri Mar 03 1995 16:4211
I assume here that "mod 120" was actually meant.  Consider those hands
{x,120,121,122,123} where x is *not* congruent to 4 modulo 5 (and x < 120).

I claim that you cannot encode any of 120..123.  Since none of x,120,121,122,123
are congruent to 4 (mod 5), the largest value you can get after adding a
multiple of 5 and taking the result mod 120 is 118; this can only be bumped once
(on account of x) to 119, and then no other card will contribute a bump.

Therefore, with such a hand, you *must* reveal the four cards 120..123 and
encode x.  But there are (4/5)*120 = 96 possible values for x, and the
permutations of 120..123 can encode at most 24 of them.
1939.17HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri Mar 03 1995 17:055
You may be right, but I'm having some trouble understanding your generalities.
Can you present a specific hand that you believe can't be encoded ?

/Eric
1939.18answer to .17FLOYD::YODERMFYFri Mar 03 1995 18:257
The hand {1,120,121,122,123} can't be encoded.  If you try to encode 1, your
calculation (before bumping) will produce a multiple of 5 (which won't be
bumped, because 1 is not revealed); if you try to encode anything else, the
calculation produces something that is at most 118 and which can be bumped at
most once, so can't reach 120 or higher.

The hand {2,120,121,122,123} has the same problem.
1939.19HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri Mar 03 1995 18:5216
The hand

	1,120,121,122,123

I would encode like this:

	120,121,123,122

Magician would decode that into 1 (instead of 0 since the last two numbers
are reversed).  Then he'd multiply by 5, giving 5, then add to 120 giving
125, then take it mod 124, giving 1.

(maybe that's why we need to use mod 124 instead of mod 120 ?)

/Eric
1939.20counterexample for mod 124FLOYD::YODERMFYFri Mar 03 1995 21:0114
OK... but if you use mod 124 instead, I think {0,5,10,15,20} fails.

Either the mod 124 calculation "wraps" or it doesn't.  If it doesn't, you end up
with something == 0 (mod 5), which must be bumped 0 times (the number of bumps
is at most 4) in order to stay == 0 (mod 5).  This can only happen if 0 is not
one of the revealed cards, so it is the encoded one, and the starting point is
at least 5, which can't work.

If you *do* wrap, the wrap gives you a number == 1(mod 5), which therefore must
be bumped exactly 4 times.  This means the calculated number must be at least
16; it can't be 21 or more, so it is exactly 16, and the encoded number must be
20.  But no matter of which of 0,5,10,15 is shown first, adding a multiple of 5
to it and subtracting 124 can get you to at most 15+(115-124) = 6, so you can't
reach 16 that way.
1939.21HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Mon Mar 06 1995 14:497

Well, maybe I need to go back to the drawing board.

Thanks.

/Eric
1939.22new ideaHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Tue Mar 07 1995 12:5653
o.k.  Here's my latest idea about how to do 5 card draw out of 124 cards.

Considering the 124 cards in a circle, the assistant announces 4 cards such
that when the order of the 4 is decoded into a number from 1 to 24, and
cyclically added to the *first* card announced, the secret card is revealed.
Revealed cards are *skipped* in the addition.

Let's start with your most recent example:

	0,5,10,15,20

Assistant announces

	0,20,10,15

Magician would decode this into 5 and add it to the 0 to get 5, the
secret card.

Let me say a bit more about what we've kind of hand-waved before, namely
how to decode an ordering of 4 cards into a numebr from 1 to 24.

The first card, if the lowest, says we're talking about 1-6, if second
lowest says 7-12, if second to highest says 13-18, and if higest says 19-24.

Then the other 3 cards decode a number from 0 to 5.  Of those 3, if the
first is lowest, we're talking 0-1, if the first is middle value, we're talking
2-3, and if high value we're talking 4-5.

Of the remaining 2, if low then high, we're talking 0, otherwise 1.

Taking in bulk, three cards ordered low,medium,high means 0, and if ordered
high,medium,low it means 5.  Hence high,low,medium means 4.

So, 20,10,15 means 4.  Putting the 0 first means 1, then we add the 4 to get
5.

Let's look back at your other examples.  You mentioned

	1,120,121,122,123

This is simple.  Assistant announces

	120,121,122,123

Since these are low to high, it means the lowest possible number from 1 to 24,
namely 1.  So, magician adds 1 to 120 getting 121, but he knows that's
stupid because 121 is already revealed, so he bumps up to the first unrevealed,
which is 124, but that cycles to 0 (I'm assuming cards are numbered 0 to 123).

o.k. Have at it.  What's the combo that can't be done this way...

/Eric
1939.23two difficult handsFLOYD::YODERMFYTue Mar 07 1995 13:3616
Consider the hands {0,25,50,75,100} and {0,24,49,74,99}.  Both of them have the
property that the gaps between adjacent cards (considered circularly) are all of
size 25 except one, which is of size 24.  Therefore, for each of them, the first
card revealed must be the card before the 24-sized gap, and the permutation must
encode the value 24.  So for the first case we must reveal 100 first (the
highest card), in the other 0 first (the lowest card).

So, in the second case, the permutation encodes something in 1..6 using your
scheme and will fail.  I have presented both hands in order to show that
rearranging the permutation scheme won't help.

Your scheme is, however, getting close enough to mine that after the next
iteration, or by the weekend in any case, I will reveal my method and let others
have the chance to shoot me down for a change.  The weak spot that I have been
attacking in the methods presented is that it feels like they overdetermine the
first card.
1939.24HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Tue Mar 07 1995 16:483
Thanks.  I see that I'll have to refine my method a bit.

1939.25Closer...WIBBIN::NOYCEAlpha's faster: over 4.2 billion times (per minute)Wed Mar 08 1995 11:5019
The problem with Eric's solution is that you don't have enough freedom
to simultaneously pick a permutation, and also indicate which card to
add the decoded number to.  Here's a way for the magician to deduce
which card he needs to add the number to, by looking at the gaps between
the cards.

The magician decodes the permutation of 4 cards into a number 1..24, as
previously explained.  Also, he finds the largest gap between any pair of
cards (considering them arranged in a circle, with 1 following 124).
Add the decoded number to the card that precedes the largest gap.

The assistant must choose a card to hide that has these properties:
  - There is another card within 24 spaces preceding it.
  - Removing the hidden card produces a gap larger than any "natural"
    gap between the other cards.

Unfortunately, this can't always be done.  Suppose the cards are
1, 2, 3, 40, 80.  The only representable cards are 2 and 3 -- but neither
of them is in a gap as big as the one from 80 to 1.
1939.26HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Wed Mar 08 1995 21:2361
How about this:

Once magician knows what the remainder is when the rank of the secret card
is divided by 5, then there are only 24 possible cards out of the unrevealed
120 cards that the secret card can be.

So, the assistant arranges for the smallest of the revealed cards to have the
same remainder modulo 5 as the relative rank of the secret card.

Let's do an example

	1,7,13,24,35

Assistant hides the 13, which initially has a remainder of 3 when divided
by 5.  Why does he pick 13 ?

Well, of the unrevealed cards, since the 1 and the 7 are not in the set,
the 13 slides over 2 spots to the "left" hence giving it a remainder of 1.

So, of the revealed cards

	1,7,24,35 (order not correct yet)

since 1 is the smallest, magician knows that the relative rank of the
secret card has a remainder of 1.

The assistant now calculates like this.  Here are the unrevealed cards
leading up to the secret card of 13:

	0   2   3   4   5   6   8   9   10   11   12   13

and here are their relative ranks

	0   1   2   3   4   5   6   7   8    9    10   11 

Here is the numbering for the possible secret cards (those with remainder 1):

	    0                   1                       2

So, assistant needs to encode "2".  0 would be encoded as all ascending,
1 by all ascending except last two swapped, so 2 is encoded by leaving lowest
first and having mid,low,high for last three.  Hence proper encoding is

	1,24,7,35

Magician hears this.  He sees that 1 is the lowest, so he knows the relative
rank of the secret card is 1 mod 5.  He knows that since the order
is lowest,2nd to highest,2nd,highest, that the encoded value is 2.

So, magician counts 0,1,2 and knows that the third 1 mod 5 card of the
unrevealed ones is the secret card.

Let's try another example:

	0,5,10,15,20

This one's easy.  We can hide the 0, and hence the lowest remaining card
is 5, which tells magician that secret card is mod 0.  And in this case
the ranks don't shift over at all.

/Eric
1939.27Sounds promising, but...WIBBIN::NOYCEAlpha's faster: over 4.2 billion times (per minute)Thu Mar 09 1995 12:548
What if the cards are 1,3,4,5,7 ?
If I hide the 1, the next lower card isn't equivalent to 1 mod 5.
So I must show the 1.  But then none of the other cards is equivalent
to 1 after compressing out the displayed cards:
	hide 3, show 1,4,5,7 : 3 maps to 2
	hide 4, show 1,3,5,7 : 4 maps to 2
	hide 5, show 1,3,4,7 : 5 maps to 2
	hide 7, show 1,3,4,5 : 7 maps to 3.
1939.28HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Thu Mar 09 1995 14:0436

Yeah, I was worried about that.  But the general idea seems promising.

I found myself thinking back to fundamentals.

Like suppose the assistant just took the five cards

	a1,a2,a3,a4,a5

(sorted from lowest to highest) and looked them up in a huge list.  The list
would say

	For cards a1,a2,a3,a4,a5 you should present magician with
		a3,a4,a2,a1


There would be an entry in the list for EVERY possible 5 cards.

The magician would hear

	a3,a4,a2,a1

and he would look up that ordering in another table containing ALL possible
orderings.  The table would say

	If you hear a3,a4,a2,a1 then the magic card is a5.


o.k.  How could an assistant and a magician construct these two lists ?

Note that this is more relaxed than coming up with a scheme that we've been
trying to come up with, since the lists needn't follow any "rhyme or reason"
they need merely be unique.

/Eric
1939.29an exercise in mapping sets of 5 into ordered 4'sHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Mon Mar 13 1995 04:02264
    
    Let's see how I might start composing lists for the assistant to look
    up his 5 cards to find out what to tell the magician, and the other
    list for the magician to look up the 4 cards he hears to know what
    the secret one is.
    
    If assistant gets 0,1,2,3,4 he can tell magician 0,1,2,3.
    
    Magician looks up 0,1,2,3 and sees that secret card is 4.
    
    Now, suppose assistant gets 0,1,2,3,5.  List can tell him to present
    0,1,3,2.  Magician's list will tell him secret number is 5.
    
    So, we quickly see that for the 24 sets of 5 cards 0,1,2,3,n for n from
    4 through 27, assistant's list can tell him to present ordering n of
    the cards 0,1,2,3.  Magician's list reveals n from the particular
    ordering of 0,1,2,3.
    
    Now, what does assistant see in his table for 0,1,2,3,28.  Clearly the
    28 can't be the secret card, since all orderings of 0,1,2,3 are used
    up.
    
    So, table can demand he present magician with 28,1,2,3, and of course
    magician's table shows that secret number is 0.
    
    How about 0,1,2,3,29 ?  Well, table can demand he show 29,1,2,3.
    
    So, clearly with all combos 0,1,2,3,n for n from 27 through 52, table
    can tell assistant to present n,1,2,3 and secret number is 0.
    
    For 0,1,2,3,53 can assistant show 53,1,2,3 ?  Sure, why not ?
    
    So, for 0,1,2,3,n for ALL n, why can't assistant show n,1,2,3 and
    secret card is 0 ?
    
    Looks good !  Sorry to waste your time with all that other stuff.
    
    o.k. so we've covered 0,1,2,3,n.
    
    Let's move on to 0,1,2,4,n.  Looks like same deal.  Assistant can show
    n,1,2,4 and secret card is 0, except we have to be a bit careful with
    n=3.
    
    Remember, assistant looks up the SET of five cards, not a particular
    order.  The magician looks up the order of what he hears.
    
    Hence we might as well have the assistant arrange the 5 cards from
    low to high before looking them up.  So 0,1,2,4,3 becomes 0,1,2,3,4
    and assistant is told to show 4,1,2,3 and secret card is 0.
    
    It's starting to looks like for any ascending set a1,a2,a3,a4,a5, the
    table can request assistant to show a5,a2,a3,a4 and secret card is a0.
    
    What's next ?  Well, what sets doesn't this cover.  Why can't we merely
    say that whatever 5 cards assistant is handed, he shows the magician
    the highest, then the second, third, fourth, and lowest is the secret
    card.
    
    Obviously this isn't enough.  With 0,2,3,4,5 and 1,2,3,4,5 it won't do
    for assistant to show 5,2,3,4 for both cases.
    
    What's the smallest ranked set of 5 cards for which hiding the lowest
    and showing the rest in order doesn't work ?  In other words, what
    are the 2 lowest sets for which
    
    	a5,a2,a3,a4
    
    is ambiguous ?  Well, for it to be ambiguous, we must have 2 different
    a1's, which means since a2 is larger than a1, that a2 is at least 2,
    to allow a1 to ambiguously be 0 or 1.  And a3 is 3, and a4 is 4.
    
    So, in fact it seems like my example is in fact the first ambiguity
    that occurs, namely 0,2,3,4,5 and 1,2,3,4,5.
    
    Let's call the whole business of putting a5 first and hiding a0, and
    otherwise announcing form lowest to highest doing "high-first".  The
    first combo for which high-first no longer works is 1,2,3,4,5.
    
    For 1,2,3,4,5 let's say that the table says to do what we'll call
    high-first-and-swap which means we show 5,2,4,3.  In other words show
    the high card first and swap the third and fourth.
    
    But what about 1,2,3,4,6.  Can we resume high-first ?  That would be
    6,2,3,4 and secret card is 1.  Is that ambigious with anything that
    came before ?  What about 0,2,3,4,6. That came first and was given
    the high-first.  So table would have to show that 1,2,3,4,6 is
    high-first-and-swap.
    
    This is starting to seem a bit untenable.  How can I describe what's
    going on more generally ?
    
    Well, it seems to have something to do with the gaps between the
    numbers.  With 0,1,2,3,n, high-first seems fine.  Scanning in order,
    we first get into trouble with 0,2,3,4,5.  That gap between the 0 and
    the 2 allows room for 1,2,3,4,5.
    
    So, continuing to think about how to organize a table, I'm wondering
    if we should look at all the gaps.  Consider the general ascending
    set of 5 numbers:
    
    	a1,a2,a3,a4,a5
    
    We can compute the 4 gaps between them which are g1=a2-a1, g2=a3-a2,
    g3=a4-a3, g4=a5-a4.  We have
    
    	g1,g2,g3,g4
    
    Which sets all have this same set of g's ?  Clearly any set of a's to
    which we add a constant to each value.  That is,
    
    	a1+c,a2+c,a3+c,a4+c,a5+c
    
    If we don't allow any wrapping, then the most different allowable c's
    will occur when a5 is farthest away from 123 (the largest allowable a).
    For a set such as
    
    	0,1,2,3,4, c can take on values 1 through 122 and we'll get the
    
    same set of g's, namely
    
    	1,1,1,1.
    
    Can we arrange for all sets of a's that have the same g's to be
    subjected to the same table rule, so that our table need only contain
    the g's ?
    
    What are the possible g's ?  There's 1,1,1,1, then there's 1,1,1,n
    for n going up to 121.
    
    This isn't becoming clear to me.
    
    I'd like to go back to the original idea of thinking of all 5-card
    sets as ordered according their ascending order, kind of
    alphabetically.
    
    The table would merely dole out the lowest possible unused 4-card ordering.
    
    So, 0,1,2,3,4 would dole out 0,1,2,3.  0,1,2,3,5 would dole out
    0,1,3,2.  We're back to saying 0,1,2,3,n for the first 24 n's would
    dole out 0,1,2,3 in some order.
    
    What would we dole out for 0,1,2,3,n next ?  Well, what's the next
    lowest possibility.  We're talking about 0,1,2,3,28.  Lowest seems
    to be 0,1,2,28 and hide the 3.
    
    So, for n=28 through n=51, we can show 0,1,2,n and hide 3.  This can
    continue all the way through showing 0,1,2,123 and hiding 3.
    
    What's the next lowest 5-card set ?  It looks like it's 0,1,2,4,5.
    What's the next lowest unused slot?  Well, we can just present
    0,1,2,4 and hide the 5.
    
    Similarly to what we did before, for 0,1,2,4,n we can hide n and show
    an ordering of 0,1,2,4.  This works for the first 24 n again, this
    time for n=5 through 28.
    
    For n=29 what's the next lowest ?  It looks like 0,1,2,29 and hide the
    4.  This can work up through 0,1,2,123 and hide the 4.
    
    Let's summarize what we have so far:
    
    If assistant has these		He shows this		secret card
    ----------------------		-------------		-----------
    0,1,2,3,4-27			{0,1,2,3}		4-27
    
    		( the symbol {a,b,c,d} means a unique orering of a,b,c,d)
    
    0,1,2,3,5-123			0,1,2,5-123		3
    0,1,2,4,5-28			{0,1,2,4}		5-28
    0,1,2,4,29-123			0,1,2,29-123		4
    
    How can I describe more generally what I'm doing ?
    Not sure yet.  Let's put down a few more, continuing in lowest to
    highest so we don't miss any:
    
    0,1,2,5,6-29			{0,1,2,5}		6-29
    0,1,2,5,30-123			0,1,2,30-123		5
    
    0,1,2,a,b-c  (b=a+1, c=b+23)	{0,1,2,a}		b-c
    0,1,2,a,d-123 (d=c+1)		0,1,2,d-123		a
    
    I'm sorry I used "-" to signify range, when it looks so much like
    algebraic minus, maybe I should have used something like ".." for
    range.
    
    Anyway, this pattern can serve up to here:
    
    0,1,2,99,100-123			{0,1,2,99}		100-123
    
    What comes next ?  Well, first there's
    
    0,1,2,100,101-123			{0,1,2,100}		101-123
    
    But we didn't use up the last ordering of {0,1,2,100} since there
    are only 23 not 24 values possible in the last place.  This means we
    didn't use 100,2,1,0.  This bothers me a bit.  But going on anyway...
    
    0,1,a,b,c-d (a>1, b>a, c>b, d=c+23)	{0,1,a,b}		c-d
    0,1,a,b,e-123 (e=d+1)		0,1,a,e-123		b
    
    Can we try the most general?
    
    a,b,c,d,e-f (e>d>c>b>a, f=e+23)	{a,b,c,d}		e-f
    a,b,c,d,g-123 (g=f+1)		a,b,c,g-123		d
    
    Have we reached a practical usable pattern yet ?
    
    Let's try 5 random numbers (sorted ascending)
    
    	3,20,31,47,69
    
    69-47 (yeah, I do mean minus this time) is 22, so we can encode this as
    
    	{3,30,31,47} and let secret card be 69.
    
    How does magician know what to do with this (other than using raw
    table).
    
    Well, suppose the numbers were 3,20,31,47,80.  Now the 80 is too far
    from the 47, so we have to code this as 3,20,31,80 and hide the 47.
    
    How does magician know what to do with this ?
    
    The magician needs to do 2 different things with
    
    	{3,20,31,47} and 3,20,31,80.
    
    I would like to say he can tell the difference because of something to
    do with the gaps he sees.  Somehow, that gap from 31 to 80, being large
    tells the magician that the secret card is between 31 and 80.
    
    But what if assistant originally had 3,20,31,80,81.  Would he be
    presenting the first of {3,20,31,80} which would also be exactly
    3,20,31,80 ?
    
    In other words, how does assistant disambiguate 3,20,31,47,80 and
    3,20,31,80,81.
    
    What is the smallest set of numbers that seems to have this ambiguity ?
    How about 0,1,2,3,28 and 0,1,2,28,29.  In the first case, the 28 is
    too far from the 3 to allow us to use {0,1,2,3} so we use the swap
    scheme and present 0,1,2,28.  In the second case, we want to encode the
    29 as the first of the {0,1,2,28} which is exactly 0,1,2,28, hence
    the ambiguity.
    
    But forgetting the schemes and going back to our committment of merely
    presenting the first unused combo in the table, this means that we
    would have mapped 0,1,2,3,28 into 0,1,2,28 so for 0,1,2,28,29 what
    is the first unused slot ?  Looks like 0,1,2,29.  But that was used
    by 0,1,2,3,29.  So it looks like 0,1,2,28,29 is going to have to be
    mapped into 0,1,28,2.
    
    It's getting late (12:50 late Sunday night) and I'm not sure this
    is leading anywhere.  I hope my thinking out loud produces so aha's for
    your own ideas.
    
    My hunch from this exercise is that one workable answer will have
    something to do with the *gaps* between the numbers.
    
    Fascinating puzzle...
    
    Good night.
    
    /Eric
1939.30FLOYD::YODERMFYMon Mar 13 1995 13:1754
Alas, when I went to write up my method I found a flaw I had missed.  I'm not
sure whether it can be repaired, so the nonconstructive proof in .1 is now as
good as we have.  My method, as it turns out, only works for N <= 3.

I first observe that for N=1, the problem is trivial, so assume N > 1.

The strategy behind the idea was this: order the cards, and consider the gaps
between adjacent cards (including the one gap that "wraps around" from the last
card to the first mod D(N)).  The sum of these gap sizes will be D(N).

Now call a "good gap" one where the difference between cards is <= (N-1)!, and a
"bad gap" one whose size is larger.  The point is, of course, that a "good gap"
can be encoded into a permutation.  Because D(N)/N is between (N-1)! and
(N-1)!+1, there must be at least one good gap and at least one bad gap; and so
there must also be at least one good gap immediately followed by a bad gap.

The strategy was to find the first such occurrence, and (usually: the exception
is described below) encode the size of the good gap.  The erroneous belief
(false for N > 3) was that the location of the encoded gap was unambiguously
determined except when the initial position had only one good gap.

I observe that the method always merges a good/bad gap pair into a bad gap, so
it always reduces the number of good gaps by 1 while leaving the number of bad
gaps unchanged.  So it *is* possible to tell from the exposed cards how many of
each kind of gap there were beforehand.

In the exceptional case (only 1 good gap to begin with), you are left with N-1
bad gaps, and it isn't clear where the good gap used to be, so you seem to be
stuck.  You escape via the following contrivance.

Say the sizes you are left with are b[1] through b[n-1].  Consider the possible
locations of the card between the good gap and bad gap; since the gap *after*
the removed gap was a bad gap, the number of possible locations within gap i is
at most b[i]-1-(N-1)!.  Summing these gives

    sigma(b[i]) - (N-1) - (N-1)*(N-1)! = (N! + N - 1) - (N - 1) - N! + (N-1)!
         = (N-1)!

and so, by switching encoding schemes in this case, you can cover all the
possibilities.

For N=2, you are always in this last case.  For N=3, if not, you must have
started with two good gaps and one bad one, so the location of the merge is
always known.

However, there are cases where the location of the good gap isn't unambiguous. 
For N=4, consider the cases BGGB and GBGB where G represents a good gap and B a
bad one.  Both produce the pattern BGB after merging.  For N=4, a good gap is
one of size at most 6; so the pattern 13,1,12 could have been produced either by
(say) 13,1,1,11 or by 1,12,1,12.  Furthermore, 13,1,12 is produced by 11
different initial states, so no encoding scheme can succeed.

My attempts to patch this flaw haven't worked, and it seems likely a new idea is
needed.
1939.31HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Mon Mar 13 1995 19:235
Well, we seem to be on the same wavelength.  See my last sentence in .29 before
"fascinating puzzle".

/Eric
1939.32let's try the (8,3) problem and see if it helps us with the (124,5) oneHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Wed Mar 15 1995 16:4114
Suppose we have eight cards numbered

	0 1 2 3 4 5 6 7


An audience member hands the magician's assistant 3 of the above cards.

The assistant announces 2 of those 3 to the magician, who is then able
to announce the 3rd.

What scheme do the assistant and magician previously agree on ?

/Eric
1939.33HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Thu Mar 16 1995 14:4270
I tried to do what you said in .30:

>  Because D(N)/N is between (N-1)! and
>(N-1)!+1, there must be at least one good gap and at least one bad gap; and so
>there must also be at least one good gap immediately followed by a bad gap.

>The strategy was to find the first such occurrence, and (usually: the exception
>is described below) encode the size of the good gap.  The erroneous belief
>(false for N > 3) was that the location of the encoded gap was unambiguously
>determined except when the initial position had only one good gap.

I tried to apply this to the 8 card deck draw 3 version, and I have
problems.  Your .30 implies that you believe your method works for drawing
3 cards from an 8-card deck.

Let's consider first possible draw, 012.  The bad gap is from 2 wrapping around
to 0, and it is followed by the good gap 01.  So we want to encode the size
of the good gap 01.

For this game, good gaps will always be size 1 (as in 01) or size 2.

You only said "encode the size of the good gap", and it's clear to me that
with 2 cards to announce to the magician, the only choices we have are to
put the cards from low to high or from high to low.  This is fine, since
we can say that low to high means the gape is size 1 and high to low means
the gap is size 2.

What you didn't say is which 2 cards I should announce in order to encode
the size of the good gap.  My guess is that I should announce the 2 cards that
straddle the bad gap.  That way, the magician knows the good gap is "clockwise"
just after this announced gap, and the order of the cards tells the size
of the gap.

So, with 012, the bad cap is 2-0, so we'll announce 2 and 0 in some order
to the magician.  Since the good gap is 0-1 and is size 1, we want to announce
from low to high, so we announce 02.

Let's start a table:

3 cards that were drawn		what gets announced
-----------------------		-------------------
012				02
013				03
014				04
015				05
016				06
017				07

023				30
024				40
025	50 (tired of hitting all those tabs)
026	60
027	70
034	03

Looks like a problem.  013 and 034 both seem to want us to announce 03.

Let's make sure we didn't make a mistake.  On 013, the 0-1 gap is good, the
1-3 gap is good, the 3-0 gap is bad, and the 0-1 gap is the good one that
follows it.  So we use the 0 and 3 to encode 0-1 and it's a small gap so 
we announce low then high, so 03 seems like the correct call.

Now consider 034.  0-3 is bad, and it is followed by 3-4 which is good.
Since 3-4 is small, we announce 03 again.

So, since 013 and 034 both seem to want us to say 03, I don't see how
your method works, even for n=3, which your note .30 seems to imply it would.

/Eric
1939.34Omitted partFLOYD::YODERMFYThu Mar 16 1995 16:116
What I omitted to say was that the hidden card is the one between the good and
bad gap that you choose.  With 013, you have two good gaps and then a bad gap,
so you hide 3 (before the bad gap of size 5) and reveal 01 to as to encode a
size of 2.  With 034, you have a bad gap, a good one and then a bad one, so you
fall into the exceptional case; you hide 4 and reveal 0,3 so as to encode that
the extra card is 4 (with 0,3 revealed the only other possibility is 5).
1939.35Scheme for n=3, elaboratedFLOYD::YODERMFYThu Mar 16 1995 16:337
In the following table, ab:cd means that if the cards revealed are == (x+a) and
(x+b) modulo 8, then the hidden card is congruent to one of (x+c) or (x+d)
modulo 8 (which can be encoded because there are only two possibilities).

01:23  02:34  03:45  04:15

thus if 4 and 5 are revealed, they encode either 6 or 7 (x is 4 here).
1939.36HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Thu Mar 16 1995 19:0537
That seems like a pretty nifty system.  It's not clear yet how it relates
exactly to gaps.  Let's try a few.  First, I'll repeat your
secret formula:

01:23  02:34  03:45  04:15


ok, let's try 012:

We seem to be in the first case, so We say 01.

013	10


How about 014 ?
If x=1, then the 14 matches "03:".  Does 0 match ":45" ?  Not clear.  How
about matching the 04 to "04:".  Clearly then the 1 matches ":15", so I
guess we say

014	04

015	What do we do here ?

"01" matches "01:" but 5 doesn't match ":23".  Hmmm.  Well, "50" matches
"03:" for x=5.  Is that allowed ?  How high is x allowed to be ?  Anyway,
does "1" match ":45" in this case ?  Well, since the "0" matches "3:" then
the "1" matches ":4" so yes, 015 matches "03:45" so we have

015	05

I'll have to think about all of this.  It's neat if it works but I don't
understand it at all yet.

Thanks.

/Eric
1939.37attempt to clarifyFLOYD::YODERMFYFri Mar 17 1995 13:3717
It may be unclear because the scheme is presented from the point of view of the
decoder (after the card is removed, as it were) rather than from the point of
view before removing the card.  Let me try to clarify the connection to gaps.

For 01:23, the two *starting* points are 012 and 013.  The gaps in these two
cases are 1,1,6 and 1,2,5 respectively, which are both GGB.  The rule says to
find the first (here, the only) occurrence of GB and hide the card between the G
and B (respectively the 2 and 3).  So you reveal the 0 and 1 in whatever order
encodes the size of the G gap that got merged (size 1 and 2 respectively).

The case 02:34 works identically, since 023 and 024 are also both GGB.

The case 04:15 is the exceptional case: 014 is GBB and 045 is BGB.

The case 03:45 also falls into the exceptional case: 034 and 035 are both BGB. 
But here the two possible positions happen to fall into the same gap, so the
method is equivalent to encoding the size of the G gap.
1939.38a different presentation for the 3,8 gameHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Mon Mar 27 1995 21:3850
Here's my solution to the 8,3 problem.  I'm not yet sure whether this is
fundamentally different than Yoder's solution.

Each of the following circles of 8 positions shows a possible arrangement
of the 3 cards that the audience member hands to the assistant.

In each circle, the relative positions of the 3 cards are shown with the
3 symbols A,B,O.

Note that there are conveniently exactly 7 different relative arrangements
possible.

The digit below each circle shows the distance around the circle from A
to B.  Note that they are all different.

The assistant names card A first, then card B.  The magician has these
same diagrams (memorized of course) and merely subtracts A from B, and
consults the circle labeled with that difference, and announces O as the
secret card.
 
      B                     A                   A                     A      
  .       A             .       B            .       O            .       O 
                                                                               
.           O         .           .        .           .        .           . 
                                                                                
  .       .             .       O            .       .             B       . 
      .                     .                    B                     .               
      7                     1                    4                     5                       



      O                     B                   A                       
  .       B             .       .            .       .                
                                                                               
A           .         .           A        .           B                
                                                                                
  .       .             .       .            O       .                 
      .                     O                    .                                
      3                     6                    2                                       
                                                                               

Let's try a few examples.  Suppose the cards are 134.  These match the 3
circle, so the assistant announces the 1 and then the 4.  Suppose the cards
are 017.  Putting the 7 first and viewing it as 701, it matches the 7 circle,
so assistance announces 0 then 7.

Is this clear ?  Does it suggest some ideas for tackling the larger problems?

/Eric
1939.39The solution in .-1 is newFLOYD::YODERMFYTue Mar 28 1995 13:414
The solution given is different from mine: in the case where the difference is
3, the revealed card is between two "good gaps," which never happens in the
system I presented.  It looks much like a similar solution I constructed by hand
when working on the problem, which was based on octagonal patterns.
1939.40some thoughts on the 27,4 gameHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri Mar 31 1995 15:12103
I've been thinking about the 27,4 game, which is:

	Start with a deck of 27 cards labeled 0 through 26.

	Audience member hands any 4 of them to the assistant.  Assistant reads 3 of
	the 4 to the magician who then announces the 4th.  What scheme do assistant
	and magician use for this trick ?


I started thinking about how many distributions of the 4 cards there are around the
hypothetical clock circle of 27 points.

For example, if all 4 cards are next to each other, such as 0,1,2,3 or 6,7,8,9 or
24,25,26,0, that is just *one* distribution.

Another distribution would be where the first two cards are next to each other, then
the next is 10 away, then the next is 7 away.  For example, 5,6,16,23 or 9,10,20,0.
Both those combos would be of the same distribution.

I counted possible distributions like this.  The 1st card can be any of 27, then the
second can be any of 26, the 3rd one in 25 remaining, and the last one in 24, so we have

	27 * 26 * 25 * 24

But, since order doesn't matter (for example 1,6,10,11 is equivalent to 1,6,11,10), each of
the above sets has 4*3*2*1 or 24 orders.  So we lop off the 24, reducing us to

	27 * 26 * 25

Further more, since each remaining set has 27 possible positions around the circle (for
example 2,4,6,8 is the same as 11,13,15,17), we lop off the 27, leaving us with

	26 * 25

This is the number of distinct distributions.


If we read 3 numbers to the magician, he can form 2 gaps from those numbers.  We read

	a b c

He can compute (doing clockwise subtraction around the circle)

	b-a and c-b

How many possible combinations can we convey in this manner?  Well, b-a can be anything
from 1 through 26.  Suppose b-a is 1.  So we are announcing something like

	5 6 c

c-6 can be 1 through 25, it can't be 26 (since c would be 5 in that case but duplicates
aren't allowed).

Now suppose b-a is 2.  For example

	5 7 c

Now c-7 can be 1 through 26, but it can't be 24 (cause c would be 5 again).

Looking at every possible value for b-a, we find there are 26 possibilities, and that
leaves 25 possibilities for c-b because there's always 1 illegal possibility.  Hence
the total number of pairs of gaps around the circle b-a and c-b is

	26 * 25

which is exactly the same is the number of 4-card distributions !  (This matchup of
the 26*25 between number of distributions and number of pairs of gaps seems exciting to
me.  Is it to you ?  Or is it "obvious")


Let me try a random example to help explain the strategy I'm working towards here.

Suppose assistant is handed

	4, 9, 20, 24

Assistant could announce

	4, 9, 20

The magician now knows from this that 1 gap is 5 and the second gap is 11.  He
and the assistant could agree that when the first announced gap is 5, and the second
is 11, then the third is 4.  Hence magician would "know" that the secret number is
24.

In other words, I'm forming a map from the 2 announced gaps to a third gap.  The
table would start like this:

announced gap		agreed hidden gap
-------------		----------------
5,11			4 (third gap)

It's not clear yet to me if there's a simple closed form that could describe this
table, or if an ugly written out or tediously memorized table would be necessary
between magician and assistant.

Does this help any of you, or am I rambling on that which was already figured out
by the rest of you ?

Thanks.

/Eric
1939.41continuing to think about a solution to the 27,4 gameHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Tue Apr 04 1995 19:5388
27 cards labeled 0..26, assistant handed 4, reads 3 to magician, who
announces 4th...

Continuing with theme introduced in .-1:

Divide all combinations of 4 cards into classes according to their gaps
after being sorted clockwise.

If we sort name these classes such that the smallest gaps are named first,
then the first class is

1 1 1 24

Sets of cards falling into this class are 0,1,2,3 or 25,26,0,1.

Let's start forming the table of what the assistant tells the magician:

class		gaps that assistant conveys	example		announce
-----		---------------------------	-------		--------
1 1 1 24	1 1				0,1,2,3		1,2,3

For example, if cards are 0,1,2,3, assistant says 0,1,2.  If cards are
25,26,0,1, assistant says 25,26,0.

As long as we list all possible classes exactly once under "class" and list
unique ordered pairs in the convey column, then we've solved the problem:

1 1 2 23	1 2				0,1,2,4		1,2,4
1 1 3 22	1 3				0,1,2,5		1,2,5
...
1 1 23 2	1 23				0,1,2,25	1,2,25

Notice we won't have 1 1 24 1 because that can be reordered as 1 1 1 24
which we already have dealt with.

So, next grouping is

1 2 1 23	2 1				0,1,3,4		1,3,4 
1 2 2 22	2 2				0,1,3,5		1,3,5
1 2 3 21	2 3				0,1,3,6		1,3,6
...
1 2 22 2	2 22				0,1,3,25	1,3,25

And next is

1 3 1 22	3 1
1 3 2 21	3 2
...
1 3 21 2	3 21

Notice how each of these groupings gets smaller each time, since this time
we started with 22 as 4th gap instead of 23 (because of the 3 as 2nd gap), and
we only let 3rd gap go up to 21 instead of 22 (because 1 3 22 1 was already
listed as 1 1 3 22)

Now that we see more of a pattern, we can name them faster (each line
is a whole group now):

1 4 n 22-n	4 n (n=1..20)			0,1,5,5+n	1,5,5+n
1 5 n 21-n	5 n (n=1..19)			0,1,6,6+n	1,6,6+n
...
1 22 n 4-n	22 1 (n=1 only)			0,22,23,24	0,22,23


2 2 n 23-n	23-n 2 (n=3..20)		0,2,4,24(n=20)	24,0,2
						0,2,4,7(n=3)	7,0,2

Note that for the above line, I couldn't have the assistant announce
"2 n" or "n 23-n" since "2 20" and "3 20" have already been used.

2 3 n 22-n	22-n 5 (n=4..19)		0,2,5,24(n=19)	24,0,5

What's I do for the above line is hide the third card and announce 4th, 1st,
2nd.  The 5 comes, of course, from combining the size 2 and 3 gaps.

2 4 n 21-n	21-n 6 (n=5..18)
2 5 n 20-n	20-n 7 (n=6..17
...
2 10 n 15-n	15-n 12 (n=11..12)

3 4 n 20-n	???

I'm not sure where to go from here.  Is this leading anywhere useful ?

Thanks.

/Eric
1939.42observationsFLOYD::YODERMFYWed Apr 05 1995 20:0512
Re .-1: this seems tedious to carry through by hand, but a computer program
might tell you whether the method finishes or "gets stuck."

I noticed that the gap patterns never have a rotational symmetry: that is, if
you have s[0]...s[n-1] such that s[0]+...+s[n-1] = D(n), there is no m (1 <= m <
n) such that s[(i+m) mod n] = s[i] for 0 <= i < n.  This is because if there
were such an m, m' = gcd(m,n) would also have this property, and then n/m' would
be an integer > 1 dividing both n and D(n); but gcd(n,D(n)) = 1.

This means there is always a uniquely determined point in each pattern where
ordering the gaps after that point gives a lexicographically least result (a
more formal way of saying that the smallest gaps come first).
1939.43HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Wed Apr 05 1995 22:1129
Consider n=4, D(n)=27.

Consider cards

	0,2,4,6

The gaps are

	s[0]=s[1]=s[2]=2, s[3]=21.

Let i=0, m=1.

Observe that

	1 <= 1 < 4
	0 <= 0 < 4
	s[(i+m) mod n] = s[1 mod 4] = s[1] = 2
	s[i] = s[0] = 2.

They're both 2, so it seems like a contradiction to what you wrote:

> if you have s[0]...s[n-1] such that s[0]+...+s[n-1] = D(n), there is
> no m (1 <= m < n) such that s[(i+m) mod n] = s[i] for 0 <= i < n. 


Where's the error ?

/Eric
1939.44notation ambiguousWIBBIN::NOYCEThe brakes still work on this busThu Apr 06 1995 12:3610
I think this

> if you have s[0]...s[n-1] such that s[0]+...+s[n-1] = D(n), there is
> no m (1 <= m < n) such that s[(i+m) mod n] = s[i] for 0 <= i < n. 

meant
...such that s[(i+m) mod n] = s[i] for all i in 0 <= i < n. 
                                       ^^^^^^^^

In your example, if m=1, this succeeds for i=0 & i=1, but fails for i=2.
1939.45HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Wed Apr 12 1995 21:4980
I think I'm ready to write a computer program to solve the 27,4 game.

The program will generate each possible 4-card draw, presorted in ascending
order, like this:

	a=0...26, b=a+1..26, c=b+1..26, d=c+1..26

That gives drawing

	a,b,c,d

Next, I'll compute the gaps

	a,b-a,c-b,a+27-c

I'll look at all 4 possible rotations of these 4 gaps, and see if I've
already considered any drawing yet whose gaps matches any of the rotated
gaps.  If so, I'll discard that drawing entirely.

For example, once I've considered drawing

	0,2,23,25 (gaps 2,21,2,2)

I'll ignore this one:

	3,5,7,9 (gaps 2,2,2,21)

since 2,2,2,21 can be rotated into 2,21,2,2.

If I decide to investigate the drawing, I'll look one at a time at all the
possible announcements.  For example, suppose the drawing is 0,2,23,25.  A
possible announcement is

	0,2,23 (communicated gaps 2,21)

If 2,21 is already in my list of communicated gaps, I'll go on to another
possible announcement, such as

	0,23,2 (communicates gaps 23,6)

Let's suppose 23,6 isn't in my list of communicated gaps.  I add it to the
list like this:

	2,21,2,2 (gaps of drawing) 23,6 (communicated gaps)

That entry tells the assistant that for any drawing whose gaps can be
rotated into 2,21,2,2, the assistant should announce

	a,b,c

where a,b,c are 3 of the 4 cards drawn such that b-a=23 and c-b=6.

The entry tells the magician that if he hears a,b,c such that b-a=23 and c-b=6,
then the 4 cards are spread out into gaps 2,21,2,2.

For example, suppose magician hears

	5,1,7

Magician computes 1-5[+27]=23, and 7-1=6.  So magician looks up 23,6 and
sees that the gaps between the 4 cards are 2,21,2,2.  He knows 3 of the cards
are 5,1,7 so rearranging as 1,5,7, he sees that remaining card must be 3.

Using the calculation in note .40 that the number of gap combinations is
26*25, the program would signal an error if it encounters either less or more
total entries in its list.

As the program progresses, it may encounter a drawing such that all the possible
announcements for that drawing already are in the list.  At that point,
the program goes to the last item on the list, *removes* it, and pretends
it is still dealing with the drawing for that item, commencing with considering
the *next* possible announcement for that item.  Again, if it rejects
the last possible announcement for that drawing it backs up again.

More later.  Comments ?

Thanks.

/Eric
1939.46more on the 27,4 programHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Wed Apr 12 1995 22:0950
One more thing I think the program needs to check.  Suppose the program
starts, and considers the first possible drawing, which is

	0,1,2,3

The gaps are

	1,1,1,24

Program considers announcment

	0,1,2

The communicated gaps are

	1,1

Obviously, since this is the first consideration, that entry doesn't
exist yet, so we enter

	1,1,1,24 (gaps in drawing)    1,1 (communicated gaps)

but now suppose the assistant is using this table.  Suppose the drawing is

	1,2,3,4

This matches that first entry in the table, which merely says to communicate
1,1.  But both of these announcements suffice:

	1,2,3     2,3,4

Magician would receive the communicated gaps of 1,1 and look on table
and know he is seeking a 4th card such that the gaps are 1,1,1,24.

Suppose the announcement is 1,2,3.  The magician sees that if 4th card is 0,
we have 0,1,2,3 and if 4th card is 4, we have 1,2,3,4, and both these
drawings match the gap print of 1,1,1,24.

So there's a flaw.   Maybe the fix for the flaw is for the assistant and
magician to agree that when there's more than one choice, the lowest is
chosen.  That way, when magician hears 1,2,3 and realizes that both 0,1,2,3
and 1,2,3,4 satisfy the gap footprint, he knows it's 1,2,3,4 because if
it were 0,1,2,3, assistant would have said 0,1,2.

I'm not quite sure of myself on this yet...

More tomorrow.

/Eric
1939.47Need to remember exactly what you decidedWIBBIN::NOYCEThe brakes still work on this busThu Apr 13 1995 13:496
I think your table just needs to record *which* of the *original* gaps
to report.  So instead of a table entry like
	1,1,1,24 <=> 1,1
you should have a table entry like
	1*, 1*, 1, 24
to indicate that you chose to report the first two gaps.
1939.48that won't workHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Thu Apr 13 1995 14:4326

The gaps that get reported, aren't necessarily a subset of the gap print
of the drawing.  For example, consider the drawing:

	0,2,5,10

The gap print is

	2,3,5,17

But the announcement might be

	2,0,10

Hence the COMMUNICATED caps are

	25,10

which don't even APPEAR in the gap print.

Hence merely putting asterisks next to 2 numbers in the gap print won't
work (not to mention that the asterisks don't convey order and order is
crucial).

/Eric
1939.4927,4 game solved by computer programHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri Apr 21 1995 19:31332
/*
	This programs solves the 27,4 card puzzle, which is:

	Magician is blindfolded, and his assistant hands a deck of 27
	cards labeled 0 through 26 to an audience member who shuffles
	and hands 4 of the cards back to the assistant.

	The assistant then carefully chooses 3 of the 4 cards, and announces
	them to the magician in a carefully chosen order.  From the values
	and order that the magician hears, he can announce the 4th card.

	What agreement do assistant and magician have ahead of time that
	allows this trick to work ?

	Author (of program, not the puzzle): Eric Osman  21-Apr-1995
*/
#include "stdlib.h"
#include "stdio.h"
/*
	General strategy:

	Every drawing of 4 numbers has a gap print, defined as the spread
	between the 4 numbers, as viewed around a 27 point circle.

	For example, for the drawing 0,1,2,3, the gap print is 1,1,1,24.
	The drawing 24,25,26,0 has exactly the same gap print.

	Suppose the drawing is 2,3,1,0.  This is the same as 0,1,2,3.  That
	is to say, if the assistant announces, say, 2,3,1, the magician has
	to say 0.  The magician has no way of knowing in what order the
	audience member handed the 4 cards to the assistant.

	The announcement 2,3,1 defines 2 gaps, a gap of 1 to get from the
	2 to the 3, and a gap of 25 to get from the 3 to the 1 (continuing
	around the 27-point circle).

	So, for the announcement of 2,3,1, we associate the ordered pair
	of gaps 1,25.  I call this ordered pair a signature.

	The general strategy is that the assistance and magician will agree
	on an association between gap prints and signatures.

	Suppose the agreed signature for gap print 1,1,1,24 is 1,25.  That
	means, if assistant is handed the cards 4,5,6,7, since they have gap
	print 1,1,1,24, the assistant announces 5,6,4.  The magician hears
	that and calculates 6-5 is 1 and 4-6 is 25 (mod 27) so the conveyed
	signature is 1,25.  The magician therefore knows by agreement that
	the gap print is 1,1,1,24 and that 3 of the 4 cards are 4,5,6.  Hence
	he knows the last card must be 7.

	One more thing that needs to be mentioned here is that if there's
	an ambiguity, it is agreed that the smallest possible numbers are
	used.  For example, suppose the signature for gap print 1,1,1,24 is
	1,1.  That means draw 0,1,2,3 will be announced as 0,1,2 and not 1,2,3.
	Similarly, when magician hears 1,2,3, and knows the signature is
	therefore 1,1, he knows the cards are 1,2,3,4 and not 0,1,2,3 since
	if the cards *were* 0,1,2,3, the assistant would have been obliged
	to say 0,1,2.

	There's a total of 26*25 different gap prints possible, and there's
	a total of 26*25 different signatures possible.  This program
	finds and verifies a 1-1 mapping between them.

	Since each of the 2 numbers in a signature can be from 1 through 26,
	a simple encoding to combine the 2 numbers into a single index
	is (n1-1)*26+n2-1.  However, for tables to allow all these different
	indicies, we need to allocate 26*26 slots, since they are not
	contiguous.  That's why max_sigs, the maximum number of signatures,
	is 26*26 and not 26*25.
*/
#define max_sigs 26*26
#define tot_gps 26*25	/* total number of gap prints possible */

int n_sigs;	/* how many signatures have been mapped to gap prints */
int sig_used[max_sigs];		/* non-negative for each mapped signature */

/*
	gp is the structure that records a gap print.  sig is the index
	of the mapped signature.  a,b,c,d are the sample draw for that
	gap print.  w,x,y,z are the gap print itself.  The ss table is
	all the possible signatures for that gap print.  For example, for
	drawing 0,1,2,3, announcement 0,1,2 is signature 1,1 but announcement
	0,1,3 is signature 1,2.  Announcement 1,2,0 is signature 1,25.
	The slots corresponding to all those announcements (usually 24
	different slots total) would be marked off in the ss table.
*/
typedef struct {int sig,a,b,c,d,w,x,y,z; int ss[max_sigs];} gp;

gp gps[tot_gps];	/* The gap prints.  Each one holds a gp */

int n_gps;	/* how many gp's we've found so far */

int main()	/* start here ! */
{
int a,b,c,d,w,x,y,z,i,j,k,m,n=0,q,r,s,e,f,ss,pn;

n_gps = 0;	/* no gp's found yet */

for (i=0; i<tot_gps; i++) gps[i].sig=-1;	/* -1 means no signature yet */

/*
	We cycle through all possible drawings, such that the cards are
	in ascending order.  Remember, all the other drawings are
	equivalent to one of the ascending ones.
*/
for (a=0; a<27; a++)
for (b=a+1; b<27; b++)
for (c=b+1; c<27; c++)
for (d=c+1; d<27; d++)
	{
/*
	w,x,y,z are the gp.  Only z might need to be adjusted, since the
	rest are guaranteed due to the ascending draw chosen.
*/
	w=b-a, x=c-b, y=d-c, z=a-d;
	if (z<0) z+=27;
/*
	For this gp, we search all the gp's we've found so far, and
	throw this one away if it is a duplicate.
*/
	for (k=0; k<n_gps; k++)
	for (i=0; i<4; i++)
		if (w==gps[k].w && x==gps[k].x && y==gps[k].y && z==gps[k].z)
			goto dup;
		else
			{
/*
	Since gp w,x,y,z is equivalent to x,y,z,w etc. we rotate 4 times,
	so we know to throw away the gp if it is already seen in any
	of its rotations.
*/
			int temp=w;
			w=x, x=y, y=z, z=temp;
			}
/*
	If we find more than the expected 26*25 gp's, we detect that
	fatal flaw here.
*/
	if (n_gps >=tot_gps)
		printf (
"bad: attempt to do more than %d gaps at draw=%d %d %d %d\n",
	tot_gps,a,b,c,d),
		exit (0);
/*
	Now that we know the gp is unique, we store the drawing and
	gp itself into our table.
*/
	gps[n_gps].x = x, gps[n_gps].y=y, gps[n_gps].z=z, gps[n_gps].w=w; 
	gps[n_gps].a = a, gps[n_gps].b=b, gps[n_gps].c=c, gps[n_gps].d=d; 
/*
	Now we examine all possible 3-card announcements for this drawing.
*/
	for (j=0; j<24; j++)
		{
		switch (j)
		{
case 0: q=a, r=b, s=c; break;case 1: q=a, r=c, s=b; break;case 2: q=b, r=a, s=c; break;
case 3: q=b, r=c, s=a; break;case 4: q=c, r=b, s=a; break;case 5: q=c, r=a, s=b; break;

case 6: q=a, r=b, s=d; break;case 7: q=a, r=d, s=b; break;case 8: q=b, r=a, s=d; break;
case 9: q=b, r=d, s=a; break; case 10: q=d, r=b, s=a; break;case 11: q=d, r=a, s=b; break;

case 12: q=d, r=b, s=c; break; case 13: q=d, r=c, s=b; break;case 14: q=b, r=d, s=c; break;
case 15: q=b, r=c, s=d; break; case 16: q=c, r=b, s=d; break;case 17: q=c, r=d, s=b; break;

case 18: q=a, r=d, s=c; break; case 19: q=a, r=c, s=d; break;case 20: q=d, r=a, s=c; break;
case 21: q=d, r=c, s=a; break; case 22: q=c, r=d, s=a; break;case 23: q=c, r=a, s=d; break;
		}
/*
	e and f represent the signature for the announcement.
*/
		e=r-q; if (e<0) e+= 27;
		f=s-r; if (f<0) f+= 27;
		ss = (e-1)*26 + f-1;	/* ss is the internal value for sig. */
		if (ss<0 || ss>=max_sigs) printf ("bad ss value %d=(%d,%d)",
			ss,e,f), exit(0);
/*
	We remember this signature as one of the possible ones for this
	gap print.
*/
		gps[n_gps].ss[ss]++;
		}
	n_gps++;
	dup:;
	}
/*
	Once we've tried every possible drawing, we make sure we
	have exactly 26*25 different gp's.
*/
if (n_gps!=tot_gps)
	printf ("bad: not all %d gaps found\n", tot_gps),
	exit (0);
/*
	We now try to map one of the possible sig's for each gp to that
	gp.
*/
for (i=0; i<tot_gps; i++)
	{
	for (j=0; j<max_sigs; j++)
		{
		if (gps[i].ss[j] && !sig_used[j])
			{
			sig_used[j] = 1;
			gps[i].sig = j;
			n_sigs++;
			goto sig_assigned;
			}
		}
	sig_assigned:;
	}
while (1)
{
int progress=0;
/*
	For each gp j that isn't mapped yet to a sig because none
	were available, but for which a gp i is willing to give up it's
	sig to j, since i has another possible sig, we make the trade here.
*/
for (i=0; i<tot_gps; i++) if (gps[i].sig>=0)
for (j=0; j<tot_gps; j++) if (gps[j].sig<0 && gps[j].ss[gps[i].sig])
for (k=0; k<max_sigs; k++) if (!sig_used[k] && gps[i].ss[k] && !gps[j].ss[k])
	{
	gps[j].sig = gps[i].sig;
	gps[i].sig = k;
	sig_used[k] = 1;
	n_sigs++;
//	printf ("gp[%d] gave %d to gp[%d] and got %d instead\n",
//		i,gps[j].sig,j,k);
	progress = 1;
	break;
	}

printf ("*** end of pass through dupls ***\n");
/*
	There are still gp's that aren't mapped to a sig.  The following
	loop finds triplets of gp's i,m,j where j doesn't have a sig,
	but i is willing to take a different sig, giving its sig to m, who
	gives its sig to j.
*/
if (!progress)
{
for (i=0; i<tot_gps; i++) if (gps[i].sig>=0)
for (m=0; m<tot_gps; m++) if (gps[m].sig>=0 && gps[m].ss[gps[i].sig])
for (j=0; j<tot_gps; j++) if (gps[j].sig<0 && !gps[j].ss[gps[i].sig]
	&& gps[j].ss[gps[m].sig])
for (k=0; k<max_sigs; k++) if (!sig_used[k] && !gps[j].ss[k]
		&& gps[i].ss[k])
	{
	gps[j].sig = gps[m].sig;
	gps[m].sig = gps[i].sig;
	gps[i].sig = k;
	sig_used[k] = 1;
	n_sigs++;
//	printf (
//    "gp[%d] gave %d to gp[%d] and took %d so gp[%d] can give %d to gp[%d]\n",
//		i,gps[m].sig,m,k,m,gps[j].sig,j);
	progress = 1;
	break;
	}
printf ("*** end of pass through triples ***\n");
}
/*
	If we assigned any sigs during this pass, we go back and see
	which ones are assignable now.
*/
if (!progress) break;
}
/*
	This loop shows exactly what sig was mapped to each gp.  This
	is the list that the assistant and magician would each work from.

*/
pn=0;
for (i=0; i<tot_gps; i++) if (gps[i].sig >= 0)
	{
	printf (
"sig=(%2d,%2d) sample draw=%2d %2d %2d %2d gap=%2d %2d %2d %2d rank=%3d\n",
		gps[i].sig/26+1,
	gps[i].sig%26+1,gps[i].a,gps[i].b,gps[i].c,gps[i].d,
		gps[i].w,gps[i].x,gps[i].y,gps[i].z,i);
	pn++;
	}
printf ("%d gaps printed\n",pn);

printf ("n_sigs=%d, n_gps=%d, tot_gps=%d\n",n_sigs,n_gps,tot_gps);
/*
	Now we check our work.  We make sure that each possible drawing
	maps to a different gp, and that all gp's are taken.
*/
{
char saw_gap[tot_gps];
for (i=0; i<tot_gps; i++) saw_gap[i] = 0;

for (a=0; a<27; a++)
for (b=a+1; b<27; b++)
for (c=b+1; c<27; c++)
for (d=c+1; d<27; d++)
	{
	int tmp;

	w=b-a;
	x=c-b;
	y=d-c;
	z=a-d; if (z<0) z+=27;

	n=-1;
	for (i=0; i<tot_gps; i++)
	for (j=0; j<4; j++)
		{
		if (gps[i].w==w && gps[i].x==x && gps[i].y==y && gps[i].z==z)
			{
			if (n>=0)
				printf (
	"Bad: gaps %d and %d both match draw %d %d %d %d\n",n,i,a,b,c,d),
				exit (0);
			n=i;
			saw_gap[i]++;
			}
		tmp=w, w=x, x=y, y=z, z=tmp;
		}
	if (n<0)
		printf (
    "Bad: no gap %d %d %d %d found for a draw %d %d %d %d\n",x,y,z,w,a,b,c,d),
		exit (0);
	}
for (i=0; i<tot_gps; i++) if (!saw_gap[i])
	printf ("bad: gap %d %d %d %d did not match any draw\n",
		gps[i].w,gps[i].x,gps[i].y,gps[i].z);
}

return 0;
}
1939.50output of the 27,4 gameHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri Apr 21 1995 19:51679
The program output is shown below.

To help explain it, consider some examples.  The assistant is handed
cards 5 10 15 21.  The assistant calculates that this drawing has gap
print of 5 5 6 11.  He finds the line saying "gap= 5 5 6 11" and it shows
that the signature is 11,21.  Therefore, he announces 10,21,15 since 21-10
is 11 and 15(+27)-21 is 21.

As a second example, suppose the magician hears 6,9,2.  9-6 is 3 and 2(+27)-9
is 20 so the signature is 3,20.  He finds the line saying gap 3 10 10 4 (It's
the line with rank of 537).  So, what 4th number added to 6,9,2 will produce
a gap print of 3 10 10 4.  Well, putting the 4 first, we have gap print
4 3 10 10.  Similarly, with the 3 cards 6,9,2 if we put the 2 first so we read
them in order 2,6,9, we have gaps 4,3.  So it's easy to see that the 4 cards
are therefore 2,6,9,19, since 19-9 is 10 and 2(+27)-19 is 10.

Here's the entire output.

Thanks.

/Eric

*** end of pass through dupls ***
*** end of pass through dupls ***
*** end of pass through triples ***
*** end of pass through dupls ***
*** end of pass through triples ***
sig=( 1, 1) sample draw= 0  1  2  3 gap= 1  1  1 24 rank=  0
sig=( 1, 2) sample draw= 0  1  2  4 gap= 1  1  2 23 rank=  1
sig=( 1, 3) sample draw= 0  1  2  5 gap= 1  1  3 22 rank=  2
sig=( 1, 4) sample draw= 0  1  2  6 gap= 1  1  4 21 rank=  3
sig=( 1, 5) sample draw= 0  1  2  7 gap= 1  1  5 20 rank=  4
sig=( 1,25) sample draw= 0  1  2  8 gap= 1  1  6 19 rank=  5
sig=( 2,26) sample draw= 0  1  2  9 gap= 1  1  7 18 rank=  6
sig=(25, 1) sample draw= 0  1  2 10 gap= 1  1  8 17 rank=  7
sig=(26, 2) sample draw= 0  1  2 11 gap= 1  1  9 16 rank=  8
sig=(26,26) sample draw= 0  1  2 12 gap= 1  1 10 15 rank=  9
sig=( 1,11) sample draw= 0  1  2 13 gap= 1  1 11 14 rank= 10
sig=( 1,12) sample draw= 0  1  2 14 gap= 1  1 12 13 rank= 11
sig=( 1,13) sample draw= 0  1  2 15 gap= 1  1 13 12 rank= 12
sig=( 1,14) sample draw= 0  1  2 16 gap= 1  1 14 11 rank= 13
sig=( 1,15) sample draw= 0  1  2 17 gap= 1  1 15 10 rank= 14
sig=( 1,16) sample draw= 0  1  2 18 gap= 1  1 16  9 rank= 15
sig=( 1,17) sample draw= 0  1  2 19 gap= 1  1 17  8 rank= 16
sig=( 1,18) sample draw= 0  1  2 20 gap= 1  1 18  7 rank= 17
sig=( 1,19) sample draw= 0  1  2 21 gap= 1  1 19  6 rank= 18
sig=( 1,20) sample draw= 0  1  2 22 gap= 1  1 20  5 rank= 19
sig=( 1,21) sample draw= 0  1  2 23 gap= 1  1 21  4 rank= 20
sig=(24, 5) sample draw= 0  1  2 24 gap= 1  1 22  3 rank= 21
sig=( 1,23) sample draw= 0  1  2 25 gap= 1  1 23  2 rank= 22
sig=( 1,24) sample draw= 0  1  3  4 gap= 1  2  1 23 rank= 23
sig=( 2, 2) sample draw= 0  1  3  5 gap= 1  2  2 22 rank= 24
sig=( 2, 3) sample draw= 0  1  3  6 gap= 1  2  3 21 rank= 25
sig=( 2,24) sample draw= 0  1  3  7 gap= 1  2  4 20 rank= 26
sig=( 3,25) sample draw= 0  1  3  8 gap= 1  2  5 19 rank= 27
sig=(24, 1) sample draw= 0  1  3  9 gap= 1  2  6 18 rank= 28
sig=(25,26) sample draw= 0  1  3 10 gap= 1  2  7 17 rank= 29
sig=( 2, 8) sample draw= 0  1  3 11 gap= 1  2  8 16 rank= 30
sig=(26, 3) sample draw= 0  1  3 12 gap= 1  2  9 15 rank= 31
sig=( 2,10) sample draw= 0  1  3 13 gap= 1  2 10 14 rank= 32
sig=( 2,11) sample draw= 0  1  3 14 gap= 1  2 11 13 rank= 33
sig=( 2,12) sample draw= 0  1  3 15 gap= 1  2 12 12 rank= 34
sig=( 2,13) sample draw= 0  1  3 16 gap= 1  2 13 11 rank= 35
sig=( 2,14) sample draw= 0  1  3 17 gap= 1  2 14 10 rank= 36
sig=( 2,15) sample draw= 0  1  3 18 gap= 1  2 15  9 rank= 37
sig=( 2,16) sample draw= 0  1  3 19 gap= 1  2 16  8 rank= 38
sig=( 2,17) sample draw= 0  1  3 20 gap= 1  2 17  7 rank= 39
sig=( 2,18) sample draw= 0  1  3 21 gap= 1  2 18  6 rank= 40
sig=( 2,19) sample draw= 0  1  3 22 gap= 1  2 19  5 rank= 41
sig=( 2,20) sample draw= 0  1  3 23 gap= 1  2 20  4 rank= 42
sig=( 2,21) sample draw= 0  1  3 24 gap= 1  2 21  3 rank= 43
sig=( 2, 1) sample draw= 0  1  3 25 gap= 1  2 22  2 rank= 44
sig=( 3, 1) sample draw= 0  1  4  5 gap= 1  3  1 22 rank= 45
sig=( 2,22) sample draw= 0  1  4  6 gap= 1  3  2 21 rank= 46
sig=(24,26) sample draw= 0  1  4  7 gap= 1  3  3 20 rank= 47
sig=(26, 4) sample draw= 0  1  4  8 gap= 1  3  4 19 rank= 48
sig=( 3, 5) sample draw= 0  1  4  9 gap= 1  3  5 18 rank= 49
sig=( 3, 6) sample draw= 0  1  4 10 gap= 1  3  6 17 rank= 50
sig=( 3,23) sample draw= 0  1  4 11 gap= 1  3  7 16 rank= 51
sig=( 4,24) sample draw= 0  1  4 12 gap= 1  3  8 15 rank= 52
sig=(12,14) sample draw= 0  1  4 13 gap= 1  3  9 14 rank= 53
sig=(13,13) sample draw= 0  1  4 14 gap= 1  3 10 13 rank= 54
sig=(13,26) sample draw= 0  1  4 15 gap= 1  3 11 12 rank= 55
sig=(12,26) sample draw= 0  1  4 16 gap= 1  3 12 11 rank= 56
sig=(16,10) sample draw= 0  1  4 17 gap= 1  3 13 10 rank= 57
sig=(17, 9) sample draw= 0  1  4 18 gap= 1  3 14  9 rank= 58
sig=(18, 8) sample draw= 0  1  4 19 gap= 1  3 15  8 rank= 59
sig=(19, 7) sample draw= 0  1  4 20 gap= 1  3 16  7 rank= 60
sig=(20, 6) sample draw= 0  1  4 21 gap= 1  3 17  6 rank= 61
sig=(21, 5) sample draw= 0  1  4 22 gap= 1  3 18  5 rank= 62
sig=(22, 4) sample draw= 0  1  4 23 gap= 1  3 19  4 rank= 63
sig=(23, 1) sample draw= 0  1  4 24 gap= 1  3 20  3 rank= 64
sig=(25, 3) sample draw= 0  1  4 25 gap= 1  3 21  2 rank= 65
sig=(23,26) sample draw= 0  1  5  6 gap= 1  4  1 21 rank= 66
sig=(26, 5) sample draw= 0  1  5  7 gap= 1  4  2 20 rank= 67
sig=( 4,22) sample draw= 0  1  5  8 gap= 1  4  3 19 rank= 68
sig=( 5,23) sample draw= 0  1  5  9 gap= 1  4  4 18 rank= 69
sig=( 9,17) sample draw= 0  1  5 10 gap= 1  4  5 17 rank= 70
sig=(10,16) sample draw= 0  1  5 11 gap= 1  4  6 16 rank= 71
sig=(11,15) sample draw= 0  1  5 12 gap= 1  4  7 15 rank= 72
sig=(13,15) sample draw= 0  1  5 13 gap= 1  4  8 14 rank= 73
sig=(14,14) sample draw= 0  1  5 14 gap= 1  4  9 13 rank= 74
sig=(14,12) sample draw= 0  1  5 15 gap= 1  4 10 12 rank= 75
sig=(15,11) sample draw= 0  1  5 16 gap= 1  4 11 11 rank= 76
sig=(17,11) sample draw= 0  1  5 17 gap= 1  4 12 10 rank= 77
sig=(18,10) sample draw= 0  1  5 18 gap= 1  4 13  9 rank= 78
sig=(19, 9) sample draw= 0  1  5 19 gap= 1  4 14  8 rank= 79
sig=(20, 8) sample draw= 0  1  5 20 gap= 1  4 15  7 rank= 80
sig=(21, 7) sample draw= 0  1  5 21 gap= 1  4 16  6 rank= 81
sig=(22, 1) sample draw= 0  1  5 22 gap= 1  4 17  5 rank= 82
sig=(23, 5) sample draw= 0  1  5 23 gap= 1  4 18  4 rank= 83
sig=( 4,19) sample draw= 0  1  5 24 gap= 1  4 19  3 rank= 84
sig=( 3,26) sample draw= 0  1  5 25 gap= 1  4 20  2 rank= 85
sig=( 5, 1) sample draw= 0  1  6  7 gap= 1  5  1 20 rank= 86
sig=( 5, 2) sample draw= 0  1  6  8 gap= 1  5  2 19 rank= 87
sig=( 5,21) sample draw= 0  1  6  9 gap= 1  5  3 18 rank= 88
sig=( 6,22) sample draw= 0  1  6 10 gap= 1  5  4 17 rank= 89
sig=(11,17) sample draw= 0  1  6 11 gap= 1  5  5 16 rank= 90
sig=(12,16) sample draw= 0  1  6 12 gap= 1  5  6 15 rank= 91
sig=(14, 1) sample draw= 0  1  6 13 gap= 1  5  7 14 rank= 92
sig=(14,26) sample draw= 0  1  6 14 gap= 1  5  8 13 rank= 93
sig=(15,13) sample draw= 0  1  6 15 gap= 1  5  9 12 rank= 94
sig=(16,12) sample draw= 0  1  6 16 gap= 1  5 10 11 rank= 95
sig=(21, 1) sample draw= 0  1  6 17 gap= 1  5 11 10 rank= 96
sig=(22,26) sample draw= 0  1  6 18 gap= 1  5 12  9 rank= 97
sig=(26, 6) sample draw= 0  1  6 19 gap= 1  5 13  8 rank= 98
sig=(26,20) sample draw= 0  1  6 20 gap= 1  5 14  7 rank= 99
sig=(26,21) sample draw= 0  1  6 21 gap= 1  5 15  6 rank=100
sig=(22, 6) sample draw= 0  1  6 22 gap= 1  5 16  5 rank=101
sig=(26,23) sample draw= 0  1  6 23 gap= 1  5 17  4 rank=102
sig=( 4,26) sample draw= 0  1  6 24 gap= 1  5 18  3 rank=103
sig=(26,25) sample draw= 0  1  6 25 gap= 1  5 19  2 rank=104
sig=( 6, 1) sample draw= 0  1  7  8 gap= 1  6  1 19 rank=105
sig=( 6, 2) sample draw= 0  1  7  9 gap= 1  6  2 18 rank=106
sig=( 6,20) sample draw= 0  1  7 10 gap= 1  6  3 17 rank=107
sig=( 7,21) sample draw= 0  1  7 11 gap= 1  6  4 16 rank=108
sig=(15, 1) sample draw= 0  1  7 12 gap= 1  6  5 15 rank=109
sig=(15,26) sample draw= 0  1  7 13 gap= 1  6  6 14 rank=110
sig=(20, 1) sample draw= 0  1  7 14 gap= 1  6  7 13 rank=111
sig=(21,26) sample draw= 0  1  7 15 gap= 1  6  8 12 rank=112
sig=(26, 7) sample draw= 0  1  7 16 gap= 1  6  9 11 rank=113
sig=(26,17) sample draw= 0  1  7 17 gap= 1  6 10 10 rank=114
sig=(26,18) sample draw= 0  1  7 18 gap= 1  6 11  9 rank=115
sig=(26,19) sample draw= 0  1  7 19 gap= 1  6 12  8 rank=116
sig=( 1, 6) sample draw= 0  1  7 20 gap= 1  6 13  7 rank=117
sig=( 6,14) sample draw= 0  1  7 21 gap= 1  6 14  6 rank=118
sig=(26,22) sample draw= 0  1  7 22 gap= 1  6 15  5 rank=119
sig=( 5,26) sample draw= 0  1  7 23 gap= 1  6 16  4 rank=120
sig=(23, 3) sample draw= 0  1  7 24 gap= 1  6 17  3 rank=121
sig=( 6,18) sample draw= 0  1  7 25 gap= 1  6 18  2 rank=122
sig=( 7, 1) sample draw= 0  1  8  9 gap= 1  7  1 18 rank=123
sig=( 7, 2) sample draw= 0  1  8 10 gap= 1  7  2 17 rank=124
sig=( 7,19) sample draw= 0  1  8 11 gap= 1  7  3 16 rank=125
sig=( 8,20) sample draw= 0  1  8 12 gap= 1  7  4 15 rank=126
sig=(19, 1) sample draw= 0  1  8 13 gap= 1  7  5 14 rank=127
sig=(20,26) sample draw= 0  1  8 14 gap= 1  7  6 13 rank=128
sig=(26, 8) sample draw= 0  1  8 15 gap= 1  7  7 12 rank=129
sig=(26,16) sample draw= 0  1  8 16 gap= 1  7  8 11 rank=130
sig=( 1, 7) sample draw= 0  1  8 17 gap= 1  7  9 10 rank=131
sig=( 7,10) sample draw= 0  1  8 18 gap= 1  7 10  9 rank=132
sig=( 7,11) sample draw= 0  1  8 19 gap= 1  7 11  8 rank=133
sig=( 7,12) sample draw= 0  1  8 20 gap= 1  7 12  7 rank=134
sig=( 7,13) sample draw= 0  1  8 21 gap= 1  7 13  6 rank=135
sig=( 6,26) sample draw= 0  1  8 22 gap= 1  7 14  5 rank=136
sig=( 1,22) sample draw= 0  1  8 23 gap= 1  7 15  4 rank=137
sig=(24, 4) sample draw= 0  1  8 24 gap= 1  7 16  3 rank=138
sig=( 7,17) sample draw= 0  1  8 25 gap= 1  7 17  2 rank=139
sig=( 8, 1) sample draw= 0  1  9 10 gap= 1  8  1 17 rank=140
sig=( 8, 2) sample draw= 0  1  9 11 gap= 1  8  2 16 rank=141
sig=( 8,18) sample draw= 0  1  9 12 gap= 1  8  3 15 rank=142
sig=( 9,19) sample draw= 0  1  9 13 gap= 1  8  4 14 rank=143
sig=(18, 1) sample draw= 0  1  9 14 gap= 1  8  5 13 rank=144
sig=(19,26) sample draw= 0  1  9 15 gap= 1  8  6 12 rank=145
sig=(26, 9) sample draw= 0  1  9 16 gap= 1  8  7 11 rank=146
sig=( 1, 8) sample draw= 0  1  9 17 gap= 1  8  8 10 rank=147
sig=( 8, 9) sample draw= 0  1  9 18 gap= 1  8  9  9 rank=148
sig=( 8,10) sample draw= 0  1  9 19 gap= 1  8 10  8 rank=149
sig=( 8,11) sample draw= 0  1  9 20 gap= 1  8 11  7 rank=150
sig=( 7,26) sample draw= 0  1  9 21 gap= 1  8 12  6 rank=151
sig=( 8,13) sample draw= 0  1  9 22 gap= 1  8 13  5 rank=152
sig=( 4, 1) sample draw= 0  1  9 23 gap= 1  8 14  4 rank=153
sig=(26,24) sample draw= 0  1  9 24 gap= 1  8 15  3 rank=154
sig=( 8,16) sample draw= 0  1  9 25 gap= 1  8 16  2 rank=155
sig=( 9, 1) sample draw= 0  1 10 11 gap= 1  9  1 16 rank=156
sig=( 9, 2) sample draw= 0  1 10 12 gap= 1  9  2 15 rank=157
sig=( 9, 3) sample draw= 0  1 10 13 gap= 1  9  3 14 rank=158
sig=(10,18) sample draw= 0  1 10 14 gap= 1  9  4 13 rank=159
sig=(17, 1) sample draw= 0  1 10 15 gap= 1  9  5 12 rank=160
sig=(18,26) sample draw= 0  1 10 16 gap= 1  9  6 11 rank=161
sig=(26,10) sample draw= 0  1 10 17 gap= 1  9  7 10 rank=162
sig=( 9, 8) sample draw= 0  1 10 18 gap= 1  9  8  9 rank=163
sig=( 9, 9) sample draw= 0  1 10 19 gap= 1  9  9  8 rank=164
sig=( 8,26) sample draw= 0  1 10 20 gap= 1  9 10  7 rank=165
sig=( 1, 9) sample draw= 0  1 10 21 gap= 1  9 11  6 rank=166
sig=( 9,12) sample draw= 0  1 10 22 gap= 1  9 12  5 rank=167
sig=( 9,13) sample draw= 0  1 10 23 gap= 1  9 13  4 rank=168
sig=( 9,14) sample draw= 0  1 10 24 gap= 1  9 14  3 rank=169
sig=(24, 2) sample draw= 0  1 10 25 gap= 1  9 15  2 rank=170
sig=(10, 1) sample draw= 0  1 11 12 gap= 1 10  1 15 rank=171
sig=(10, 2) sample draw= 0  1 11 13 gap= 1 10  2 14 rank=172
sig=(10, 3) sample draw= 0  1 11 14 gap= 1 10  3 13 rank=173
sig=(16, 1) sample draw= 0  1 11 15 gap= 1 10  4 12 rank=174
sig=(17,26) sample draw= 0  1 11 16 gap= 1 10  5 11 rank=175
sig=(26,11) sample draw= 0  1 11 17 gap= 1 10  6 10 rank=176
sig=(10, 7) sample draw= 0  1 11 18 gap= 1 10  7  9 rank=177
sig=( 9,10) sample draw= 0  1 11 19 gap= 1 10  8  8 rank=178
sig=(10, 9) sample draw= 0  1 11 20 gap= 1 10  9  7 rank=179
sig=(10,10) sample draw= 0  1 11 21 gap= 1 10 10  6 rank=180
sig=(10,11) sample draw= 0  1 11 22 gap= 1 10 11  5 rank=181
sig=( 1,10) sample draw= 0  1 11 23 gap= 1 10 12  4 rank=182
sig=(10,13) sample draw= 0  1 11 24 gap= 1 10 13  3 rank=183
sig=(10,14) sample draw= 0  1 11 25 gap= 1 10 14  2 rank=184
sig=(11, 1) sample draw= 0  1 12 13 gap= 1 11  1 14 rank=185
sig=(11, 2) sample draw= 0  1 12 14 gap= 1 11  2 13 rank=186
sig=(11, 3) sample draw= 0  1 12 15 gap= 1 11  3 12 rank=187
sig=(16,26) sample draw= 0  1 12 16 gap= 1 11  4 11 rank=188
sig=(26,12) sample draw= 0  1 12 17 gap= 1 11  5 10 rank=189
sig=(10,26) sample draw= 0  1 12 18 gap= 1 11  6  9 rank=190
sig=( 8,12) sample draw= 0  1 12 19 gap= 1 11  7  8 rank=191
sig=(11, 8) sample draw= 0  1 12 20 gap= 1 11  8  7 rank=192
sig=(11, 9) sample draw= 0  1 12 21 gap= 1 11  9  6 rank=193
sig=(11,10) sample draw= 0  1 12 22 gap= 1 11 10  5 rank=194
sig=(11,11) sample draw= 0  1 12 23 gap= 1 11 11  4 rank=195
sig=(11,12) sample draw= 0  1 12 24 gap= 1 11 12  3 rank=196
sig=(11,13) sample draw= 0  1 12 25 gap= 1 11 13  2 rank=197
sig=(12, 1) sample draw= 0  1 13 14 gap= 1 12  1 13 rank=198
sig=(12, 2) sample draw= 0  1 13 15 gap= 1 12  2 12 rank=199
sig=(12, 3) sample draw= 0  1 13 16 gap= 1 12  3 11 rank=200
sig=(11,26) sample draw= 0  1 13 17 gap= 1 12  4 10 rank=201
sig=(26,13) sample draw= 0  1 13 18 gap= 1 12  5  9 rank=202
sig=( 9,26) sample draw= 0  1 13 19 gap= 1 12  6  8 rank=203
sig=(12, 7) sample draw= 0  1 13 20 gap= 1 12  7  7 rank=204
sig=(12, 8) sample draw= 0  1 13 21 gap= 1 12  8  6 rank=205
sig=(12, 9) sample draw= 0  1 13 22 gap= 1 12  9  5 rank=206
sig=(12,10) sample draw= 0  1 13 23 gap= 1 12 10  4 rank=207
sig=(12,11) sample draw= 0  1 13 24 gap= 1 12 11  3 rank=208
sig=(12,12) sample draw= 0  1 13 25 gap= 1 12 12  2 rank=209
sig=(11,14) sample draw= 0  1 14 16 gap= 1 13  2 11 rank=210
sig=(13, 1) sample draw= 0  1 14 17 gap= 1 13  3 10 rank=211
sig=(26,14) sample draw= 0  1 14 18 gap= 1 13  4  9 rank=212
sig=(13, 5) sample draw= 0  1 14 19 gap= 1 13  5  8 rank=213
sig=( 7,14) sample draw= 0  1 14 20 gap= 1 13  6  7 rank=214
sig=(13, 7) sample draw= 0  1 14 21 gap= 1 13  7  6 rank=215
sig=(13, 8) sample draw= 0  1 14 22 gap= 1 13  8  5 rank=216
sig=(13, 9) sample draw= 0  1 14 23 gap= 1 13  9  4 rank=217
sig=(13,10) sample draw= 0  1 14 24 gap= 1 13 10  3 rank=218
sig=(13,11) sample draw= 0  1 14 25 gap= 1 13 11  2 rank=219
sig=(10,15) sample draw= 0  1 15 17 gap= 1 14  2 10 rank=220
sig=(12,18) sample draw= 0  1 15 18 gap= 1 14  3  9 rank=221
sig=(26,15) sample draw= 0  1 15 19 gap= 1 14  4  8 rank=222
sig=(12,20) sample draw= 0  1 15 20 gap= 1 14  5  7 rank=223
sig=(12,21) sample draw= 0  1 15 21 gap= 1 14  6  6 rank=224
sig=(12,22) sample draw= 0  1 15 22 gap= 1 14  7  5 rank=225
sig=(12,23) sample draw= 0  1 15 23 gap= 1 14  8  4 rank=226
sig=(12,24) sample draw= 0  1 15 24 gap= 1 14  9  3 rank=227
sig=(12,25) sample draw= 0  1 15 25 gap= 1 14 10  2 rank=228
sig=( 9,16) sample draw= 0  1 16 18 gap= 1 15  2  9 rank=229
sig=(11,19) sample draw= 0  1 16 19 gap= 1 15  3  8 rank=230
sig=(11,20) sample draw= 0  1 16 20 gap= 1 15  4  7 rank=231
sig=( 6,16) sample draw= 0  1 16 21 gap= 1 15  5  6 rank=232
sig=(11,22) sample draw= 0  1 16 22 gap= 1 15  6  5 rank=233
sig=(11,23) sample draw= 0  1 16 23 gap= 1 15  7  4 rank=234
sig=(11,24) sample draw= 0  1 16 24 gap= 1 15  8  3 rank=235
sig=(11,25) sample draw= 0  1 16 25 gap= 1 15  9  2 rank=236
sig=( 8,17) sample draw= 0  1 17 19 gap= 1 16  2  8 rank=237
sig=(10,20) sample draw= 0  1 17 20 gap= 1 16  3  7 rank=238
sig=(10,21) sample draw= 0  1 17 21 gap= 1 16  4  6 rank=239
sig=(10,22) sample draw= 0  1 17 22 gap= 1 16  5  5 rank=240
sig=(10,23) sample draw= 0  1 17 23 gap= 1 16  6  4 rank=241
sig=(10,24) sample draw= 0  1 17 24 gap= 1 16  7  3 rank=242
sig=(10,25) sample draw= 0  1 17 25 gap= 1 16  8  2 rank=243
sig=( 7,18) sample draw= 0  1 18 20 gap= 1 17  2  7 rank=244
sig=( 9,21) sample draw= 0  1 18 21 gap= 1 17  3  6 rank=245
sig=( 5,18) sample draw= 0  1 18 22 gap= 1 17  4  5 rank=246
sig=( 9,23) sample draw= 0  1 18 23 gap= 1 17  5  4 rank=247
sig=( 9,24) sample draw= 0  1 18 24 gap= 1 17  6  3 rank=248
sig=( 9,25) sample draw= 0  1 18 25 gap= 1 17  7  2 rank=249
sig=( 6,19) sample draw= 0  1 19 21 gap= 1 18  2  6 rank=250
sig=( 8,22) sample draw= 0  1 19 22 gap= 1 18  3  5 rank=251
sig=( 8,23) sample draw= 0  1 19 23 gap= 1 18  4  4 rank=252
sig=( 8,24) sample draw= 0  1 19 24 gap= 1 18  5  3 rank=253
sig=( 8,25) sample draw= 0  1 19 25 gap= 1 18  6  2 rank=254
sig=( 5,20) sample draw= 0  1 20 22 gap= 1 19  2  5 rank=255
sig=( 4,20) sample draw= 0  1 20 23 gap= 1 19  3  4 rank=256
sig=( 7,24) sample draw= 0  1 20 24 gap= 1 19  4  3 rank=257
sig=( 7,25) sample draw= 0  1 20 25 gap= 1 19  5  2 rank=258
sig=( 4,21) sample draw= 0  1 21 23 gap= 1 20  2  4 rank=259
sig=( 6,24) sample draw= 0  1 21 24 gap= 1 20  3  3 rank=260
sig=( 6,25) sample draw= 0  1 21 25 gap= 1 20  4  2 rank=261
sig=( 3,22) sample draw= 0  1 22 24 gap= 1 21  2  3 rank=262
sig=( 3, 2) sample draw= 0  1 22 25 gap= 1 21  3  2 rank=263
sig=( 2,23) sample draw= 0  1 23 25 gap= 1 22  2  2 rank=264
sig=( 4,25) sample draw= 0  2  4  6 gap= 2  2  2 21 rank=265
sig=( 5,24) sample draw= 0  2  4  7 gap= 2  2  3 20 rank=266
sig=(25,25) sample draw= 0  2  4  8 gap= 2  2  4 19 rank=267
sig=( 7,22) sample draw= 0  2  4  9 gap= 2  2  5 18 rank=268
sig=( 8,21) sample draw= 0  2  4 10 gap= 2  2  6 17 rank=269
sig=( 9,20) sample draw= 0  2  4 11 gap= 2  2  7 16 rank=270
sig=(10,19) sample draw= 0  2  4 12 gap= 2  2  8 15 rank=271
sig=(11,18) sample draw= 0  2  4 13 gap= 2  2  9 14 rank=272
sig=(12,13) sample draw= 0  2  4 14 gap= 2  2 10 13 rank=273
sig=(23, 2) sample draw= 0  2  4 15 gap= 2  2 11 12 rank=274
sig=(13, 2) sample draw= 0  2  4 16 gap= 2  2 12 11 rank=275
sig=(13,12) sample draw= 0  2  4 17 gap= 2  2 13 10 rank=276
sig=(25, 4) sample draw= 0  2  4 18 gap= 2  2 14  9 rank=277
sig=(25,17) sample draw= 0  2  4 19 gap= 2  2 15  8 rank=278
sig=(25,18) sample draw= 0  2  4 20 gap= 2  2 16  7 rank=279
sig=(25,19) sample draw= 0  2  4 21 gap= 2  2 17  6 rank=280
sig=(22, 7) sample draw= 0  2  4 22 gap= 2  2 18  5 rank=281
sig=(19, 4) sample draw= 0  2  4 23 gap= 2  2 19  4 rank=282
sig=( 5,25) sample draw= 0  2  4 24 gap= 2  2 20  3 rank=283
sig=(25,24) sample draw= 0  2  5  7 gap= 2  3  2 20 rank=284
sig=(19, 2) sample draw= 0  2  5  8 gap= 2  3  3 19 rank=285
sig=( 7,23) sample draw= 0  2  5  9 gap= 2  3  4 18 rank=286
sig=(17, 2) sample draw= 0  2  5 10 gap= 2  3  5 17 rank=287
sig=(22, 2) sample draw= 0  2  5 11 gap= 2  3  6 16 rank=288
sig=(12,17) sample draw= 0  2  5 12 gap= 2  3  7 15 rank=289
sig=(13,16) sample draw= 0  2  5 13 gap= 2  3  8 14 rank=290
sig=(14,15) sample draw= 0  2  5 14 gap= 2  3  9 13 rank=291
sig=(13,17) sample draw= 0  2  5 15 gap= 2  3 10 12 rank=292
sig=(13, 3) sample draw= 0  2  5 16 gap= 2  3 11 11 rank=293
sig=(15,10) sample draw= 0  2  5 17 gap= 2  3 12 10 rank=294
sig=(24,25) sample draw= 0  2  5 18 gap= 2  3 13  9 rank=295
sig=(25, 5) sample draw= 0  2  5 19 gap= 2  3 14  8 rank=296
sig=(25,20) sample draw= 0  2  5 20 gap= 2  3 15  7 rank=297
sig=(25,21) sample draw= 0  2  5 21 gap= 2  3 16  6 rank=298
sig=(25,22) sample draw= 0  2  5 22 gap= 2  3 17  5 rank=299
sig=( 9,22) sample draw= 0  2  5 23 gap= 2  3 18  4 rank=300
sig=(19, 3) sample draw= 0  2  5 24 gap= 2  3 19  3 rank=301
sig=(19, 6) sample draw= 0  2  6  8 gap= 2  4  2 19 rank=302
sig=(18, 2) sample draw= 0  2  6  9 gap= 2  4  3 18 rank=303
sig=(19,25) sample draw= 0  2  6 10 gap= 2  4  4 17 rank=304
sig=(16, 2) sample draw= 0  2  6 11 gap= 2  4  5 16 rank=305
sig=(15, 2) sample draw= 0  2  6 12 gap= 2  4  6 15 rank=306
sig=(21, 2) sample draw= 0  2  6 13 gap= 2  4  7 14 rank=307
sig=(23,25) sample draw= 0  2  6 14 gap= 2  4  8 13 rank=308
sig=(25, 6) sample draw= 0  2  6 15 gap= 2  4  9 12 rank=309
sig=(25,16) sample draw= 0  2  6 16 gap= 2  4 10 11 rank=310
sig=(15,16) sample draw= 0  2  6 17 gap= 2  4 11 10 rank=311
sig=( 2, 4) sample draw= 0  2  6 18 gap= 2  4 12  9 rank=312
sig=(14,21) sample draw= 0  2  6 19 gap= 2  4 13  8 rank=313
sig=( 6,23) sample draw= 0  2  6 20 gap= 2  4 14  7 rank=314
sig=(15, 6) sample draw= 0  2  6 21 gap= 2  4 15  6 rank=315
sig=(16, 5) sample draw= 0  2  6 22 gap= 2  4 16  5 rank=316
sig=(17, 4) sample draw= 0  2  6 23 gap= 2  4 17  4 rank=317
sig=(18, 3) sample draw= 0  2  6 24 gap= 2  4 18  3 rank=318
sig=(18, 7) sample draw= 0  2  7  9 gap= 2  5  2 18 rank=319
sig=(17, 7) sample draw= 0  2  7 10 gap= 2  5  3 17 rank=320
sig=(18,25) sample draw= 0  2  7 11 gap= 2  5  4 16 rank=321
sig=(17,25) sample draw= 0  2  7 12 gap= 2  5  5 15 rank=322
sig=(14, 2) sample draw= 0  2  7 13 gap= 2  5  6 14 rank=323
sig=(22,25) sample draw= 0  2  7 14 gap= 2  5  7 13 rank=324
sig=(25, 7) sample draw= 0  2  7 15 gap= 2  5  8 12 rank=325
sig=(11, 7) sample draw= 0  2  7 16 gap= 2  5  9 11 rank=326
sig=( 2, 5) sample draw= 0  2  7 17 gap= 2  5 10 10 rank=327
sig=(16, 9) sample draw= 0  2  7 18 gap= 2  5 11  9 rank=328
sig=(15,20) sample draw= 0  2  7 19 gap= 2  5 12  8 rank=329
sig=(18,14) sample draw= 0  2  7 20 gap= 2  5 13  7 rank=330
sig=(14, 6) sample draw= 0  2  7 21 gap= 2  5 14  6 rank=331
sig=(20, 2) sample draw= 0  2  7 22 gap= 2  5 15  5 rank=332
sig=(25,23) sample draw= 0  2  7 23 gap= 2  5 16  4 rank=333
sig=(17, 3) sample draw= 0  2  7 24 gap= 2  5 17  3 rank=334
sig=(17, 8) sample draw= 0  2  8 10 gap= 2  6  2 17 rank=335
sig=(16, 8) sample draw= 0  2  8 11 gap= 2  6  3 16 rank=336
sig=(21,25) sample draw= 0  2  8 12 gap= 2  6  4 15 rank=337
sig=(25, 8) sample draw= 0  2  8 13 gap= 2  6  5 14 rank=338
sig=(15,25) sample draw= 0  2  8 14 gap= 2  6  6 13 rank=339
sig=(14,25) sample draw= 0  2  8 15 gap= 2  6  7 12 rank=340
sig=(13,25) sample draw= 0  2  8 16 gap= 2  6  8 11 rank=341
sig=(10, 8) sample draw= 0  2  8 17 gap= 2  6  9 10 rank=342
sig=(16,17) sample draw= 0  2  8 18 gap= 2  6 10  9 rank=343
sig=( 2, 6) sample draw= 0  2  8 19 gap= 2  6 11  8 rank=344
sig=(15,19) sample draw= 0  2  8 20 gap= 2  6 12  7 rank=345
sig=(14,19) sample draw= 0  2  8 21 gap= 2  6 13  6 rank=346
sig=(14, 5) sample draw= 0  2  8 22 gap= 2  6 14  5 rank=347
sig=(15, 4) sample draw= 0  2  8 23 gap= 2  6 15  4 rank=348
sig=(16, 3) sample draw= 0  2  8 24 gap= 2  6 16  3 rank=349
sig=(18,11) sample draw= 0  2  9 11 gap= 2  7  2 16 rank=350
sig=(15, 9) sample draw= 0  2  9 12 gap= 2  7  3 15 rank=351
sig=(14, 9) sample draw= 0  2  9 13 gap= 2  7  4 14 rank=352
sig=(20,25) sample draw= 0  2  9 14 gap= 2  7  5 13 rank=353
sig=(25, 9) sample draw= 0  2  9 15 gap= 2  7  6 12 rank=354
sig=(14,11) sample draw= 0  2  9 16 gap= 2  7  7 11 rank=355
sig=(17,12) sample draw= 0  2  9 17 gap= 2  7  8 10 rank=356
sig=(16,18) sample draw= 0  2  9 18 gap= 2  7  9  9 rank=357
sig=(17,17) sample draw= 0  2  9 19 gap= 2  7 10  8 rank=358
sig=( 2, 7) sample draw= 0  2  9 20 gap= 2  7 11  7 rank=359
sig=(15,18) sample draw= 0  2  9 21 gap= 2  7 12  6 rank=360
sig=(14,18) sample draw= 0  2  9 22 gap= 2  7 13  5 rank=361
sig=(13,18) sample draw= 0  2  9 23 gap= 2  7 14  4 rank=362
sig=(15, 3) sample draw= 0  2  9 24 gap= 2  7 15  3 rank=363
sig=(19,10) sample draw= 0  2 10 12 gap= 2  8  2 15 rank=364
sig=(13,24) sample draw= 0  2 10 13 gap= 2  8  3 14 rank=365
sig=(14,23) sample draw= 0  2 10 14 gap= 2  8  4 13 rank=366
sig=(15,14) sample draw= 0  2 10 15 gap= 2  8  5 12 rank=367
sig=(16,13) sample draw= 0  2 10 16 gap= 2  8  6 11 rank=368
sig=(25,10) sample draw= 0  2 10 17 gap= 2  8  7 10 rank=369
sig=(17,18) sample draw= 0  2 10 18 gap= 2  8  8  9 rank=370
sig=(17,19) sample draw= 0  2 10 19 gap= 2  8  9  8 rank=371
sig=(18,17) sample draw= 0  2 10 20 gap= 2  8 10  7 rank=372
sig=(17,21) sample draw= 0  2 10 21 gap= 2  8 11  6 rank=373
sig=(17,22) sample draw= 0  2 10 22 gap= 2  8 12  5 rank=374
sig=(14,17) sample draw= 0  2 10 23 gap= 2  8 13  4 rank=375
sig=(14, 3) sample draw= 0  2 10 24 gap= 2  8 14  3 rank=376
sig=(16,25) sample draw= 0  2 11 13 gap= 2  9  2 14 rank=377
sig=(14,24) sample draw= 0  2 11 14 gap= 2  9  3 13 rank=378
sig=(15,23) sample draw= 0  2 11 15 gap= 2  9  4 12 rank=379
sig=(25,11) sample draw= 0  2 11 16 gap= 2  9  5 11 rank=380
sig=( 2, 9) sample draw= 0  2 11 17 gap= 2  9  6 10 rank=381
sig=(18,16) sample draw= 0  2 11 18 gap= 2  9  7  9 rank=382
sig=(19,16) sample draw= 0  2 11 19 gap= 2  9  8  8 rank=383
sig=(18,18) sample draw= 0  2 11 20 gap= 2  9  9  7 rank=384
sig=(16,21) sample draw= 0  2 11 21 gap= 2  9 10  6 rank=385
sig=(16,22) sample draw= 0  2 11 22 gap= 2  9 11  5 rank=386
sig=(16,23) sample draw= 0  2 11 23 gap= 2  9 12  4 rank=387
sig=(14,16) sample draw= 0  2 11 24 gap= 2  9 13  3 rank=388
sig=(25,12) sample draw= 0  2 12 14 gap= 2 10  2 13 rank=389
sig=(14,10) sample draw= 0  2 12 15 gap= 2 10  3 12 rank=390
sig=(17,14) sample draw= 0  2 12 16 gap= 2 10  4 11 rank=391
sig=(15,22) sample draw= 0  2 12 17 gap= 2 10  5 10 rank=392
sig=(17,16) sample draw= 0  2 12 18 gap= 2 10  6  9 rank=393
sig=(19,20) sample draw= 0  2 12 19 gap= 2 10  7  8 rank=394
sig=(18,19) sample draw= 0  2 12 20 gap= 2 10  8  7 rank=395
sig=(19,18) sample draw= 0  2 12 21 gap= 2 10  9  6 rank=396
sig=(17,15) sample draw= 0  2 12 22 gap= 2 10 10  5 rank=397
sig=(16,15) sample draw= 0  2 12 23 gap= 2 10 11  4 rank=398
sig=(15,15) sample draw= 0  2 12 24 gap= 2 10 12  3 rank=399
sig=(25,13) sample draw= 0  2 13 15 gap= 2 11  2 12 rank=400
sig=(16,14) sample draw= 0  2 13 16 gap= 2 11  3 11 rank=401
sig=(17,23) sample draw= 0  2 13 17 gap= 2 11  4 10 rank=402
sig=(18,22) sample draw= 0  2 13 18 gap= 2 11  5  9 rank=403
sig=(19,21) sample draw= 0  2 13 19 gap= 2 11  6  8 rank=404
sig=(18,20) sample draw= 0  2 13 20 gap= 2 11  7  7 rank=405
sig=(19,14) sample draw= 0  2 13 21 gap= 2 11  8  6 rank=406
sig=(20, 5) sample draw= 0  2 13 22 gap= 2 11  9  5 rank=407
sig=(21, 4) sample draw= 0  2 13 23 gap= 2 11 10  4 rank=408
sig=(22, 3) sample draw= 0  2 13 24 gap= 2 11 11  3 rank=409
sig=(15,24) sample draw= 0  2 14 17 gap= 2 12  3 10 rank=410
sig=(25,14) sample draw= 0  2 14 18 gap= 2 12  4  9 rank=411
sig=(19,22) sample draw= 0  2 14 19 gap= 2 12  5  8 rank=412
sig=(18,21) sample draw= 0  2 14 20 gap= 2 12  6  7 rank=413
sig=(20,13) sample draw= 0  2 14 21 gap= 2 12  7  6 rank=414
sig=(19,13) sample draw= 0  2 14 22 gap= 2 12  8  5 rank=415
sig=(18,13) sample draw= 0  2 14 23 gap= 2 12  9  4 rank=416
sig=(17,13) sample draw= 0  2 14 24 gap= 2 12 10  3 rank=417
sig=(16,24) sample draw= 0  2 15 18 gap= 2 13  3  9 rank=418
sig=(25,15) sample draw= 0  2 15 19 gap= 2 13  4  8 rank=419
sig=(20, 9) sample draw= 0  2 15 20 gap= 2 13  5  7 rank=420
sig=(21, 8) sample draw= 0  2 15 21 gap= 2 13  6  6 rank=421
sig=(20,14) sample draw= 0  2 15 22 gap= 2 13  7  5 rank=422
sig=( 4, 2) sample draw= 0  2 15 23 gap= 2 13  8  4 rank=423
sig=(18,12) sample draw= 0  2 15 24 gap= 2 13  9  3 rank=424
sig=(17,24) sample draw= 0  2 16 19 gap= 2 14  3  8 rank=425
sig=(18,23) sample draw= 0  2 16 20 gap= 2 14  4  7 rank=426
sig=(21,22) sample draw= 0  2 16 21 gap= 2 14  5  6 rank=427
sig=(20,21) sample draw= 0  2 16 22 gap= 2 14  6  5 rank=428
sig=(20,11) sample draw= 0  2 16 23 gap= 2 14  7  4 rank=429
sig=(19,11) sample draw= 0  2 16 24 gap= 2 14  8  3 rank=430
sig=(18,24) sample draw= 0  2 17 20 gap= 2 15  3  7 rank=431
sig=(21,23) sample draw= 0  2 17 21 gap= 2 15  4  6 rank=432
sig=(20,22) sample draw= 0  2 17 22 gap= 2 15  5  5 rank=433
sig=(21,10) sample draw= 0  2 17 23 gap= 2 15  6  4 rank=434
sig=(20,10) sample draw= 0  2 17 24 gap= 2 15  7  3 rank=435
sig=(19,24) sample draw= 0  2 18 21 gap= 2 16  3  6 rank=436
sig=(18, 4) sample draw= 0  2 18 22 gap= 2 16  4  5 rank=437
sig=(22, 9) sample draw= 0  2 18 23 gap= 2 16  5  4 rank=438
sig=(18, 6) sample draw= 0  2 18 24 gap= 2 16  6  3 rank=439
sig=(20,24) sample draw= 0  2 19 22 gap= 2 17  3  5 rank=440
sig=(23, 6) sample draw= 0  2 19 23 gap= 2 17  4  4 rank=441
sig=(19, 5) sample draw= 0  2 19 24 gap= 2 17  5  3 rank=442
sig=(20, 3) sample draw= 0  2 20 23 gap= 2 18  3  4 rank=443
sig=(20, 4) sample draw= 0  2 20 24 gap= 2 18  4  3 rank=444
sig=(21, 3) sample draw= 0  2 21 24 gap= 2 19  3  3 rank=445
sig=(21, 9) sample draw= 0  3  6  9 gap= 3  3  3 18 rank=446
sig=(24, 7) sample draw= 0  3  6 10 gap= 3  3  4 17 rank=447
sig=(24, 8) sample draw= 0  3  6 11 gap= 3  3  5 16 rank=448
sig=(24,24) sample draw= 0  3  6 12 gap= 3  3  6 15 rank=449
sig=( 3, 3) sample draw= 0  3  6 13 gap= 3  3  7 14 rank=450
sig=( 3,21) sample draw= 0  3  6 14 gap= 3  3  8 13 rank=451
sig=(21,15) sample draw= 0  3  6 15 gap= 3  3  9 12 rank=452
sig=(21,16) sample draw= 0  3  6 16 gap= 3  3 10 11 rank=453
sig=(21,17) sample draw= 0  3  6 17 gap= 3  3 11 10 rank=454
sig=(21,18) sample draw= 0  3  6 18 gap= 3  3 12  9 rank=455
sig=(24, 6) sample draw= 0  3  6 19 gap= 3  3 13  8 rank=456
sig=(21,20) sample draw= 0  3  6 20 gap= 3  3 14  7 rank=457
sig=(21,21) sample draw= 0  3  6 21 gap= 3  3 15  6 rank=458
sig=(22, 8) sample draw= 0  3  6 22 gap= 3  3 16  5 rank=459
sig=(23, 7) sample draw= 0  3  6 23 gap= 3  3 17  4 rank=460
sig=(23,24) sample draw= 0  3  7 10 gap= 3  4  3 17 rank=461
sig=(23, 8) sample draw= 0  3  7 11 gap= 3  4  4 16 rank=462
sig=( 3, 4) sample draw= 0  3  7 12 gap= 3  4  5 15 rank=463
sig=(23,10) sample draw= 0  3  7 13 gap= 3  4  6 14 rank=464
sig=(20,20) sample draw= 0  3  7 14 gap= 3  4  7 13 rank=465
sig=(20,15) sample draw= 0  3  7 15 gap= 3  4  8 12 rank=466
sig=(20,16) sample draw= 0  3  7 16 gap= 3  4  9 11 rank=467
sig=(20,17) sample draw= 0  3  7 17 gap= 3  4 10 10 rank=468
sig=(20,18) sample draw= 0  3  7 18 gap= 3  4 11  9 rank=469
sig=(19,15) sample draw= 0  3  7 19 gap= 3  4 12  8 rank=470
sig=(23,17) sample draw= 0  3  7 20 gap= 3  4 13  7 rank=471
sig=(23,18) sample draw= 0  3  7 21 gap= 3  4 14  6 rank=472
sig=(22,12) sample draw= 0  3  7 22 gap= 3  4 15  5 rank=473
sig=(20,23) sample draw= 0  3  7 23 gap= 3  4 16  4 rank=474
sig=(22,24) sample draw= 0  3  8 11 gap= 3  5  3 16 rank=475
sig=(23,19) sample draw= 0  3  8 12 gap= 3  5  4 15 rank=476
sig=(22,10) sample draw= 0  3  8 13 gap= 3  5  5 14 rank=477
sig=(22,11) sample draw= 0  3  8 14 gap= 3  5  6 13 rank=478
sig=( 5,19) sample draw= 0  3  8 15 gap= 3  5  7 12 rank=479
sig=(19,19) sample draw= 0  3  8 16 gap= 3  5  8 11 rank=480
sig=(19,17) sample draw= 0  3  8 17 gap= 3  5  9 10 rank=481
sig=(22,15) sample draw= 0  3  8 18 gap= 3  5 10  9 rank=482
sig=(22,16) sample draw= 0  3  8 19 gap= 3  5 11  8 rank=483
sig=(22,17) sample draw= 0  3  8 20 gap= 3  5 12  7 rank=484
sig=(22,18) sample draw= 0  3  8 21 gap= 3  5 13  6 rank=485
sig=(22,13) sample draw= 0  3  8 22 gap= 3  5 14  5 rank=486
sig=(23,12) sample draw= 0  3  8 23 gap= 3  5 15  4 rank=487
sig=(21,24) sample draw= 0  3  9 12 gap= 3  6  3 15 rank=488
sig=(24, 9) sample draw= 0  3  9 13 gap= 3  6  4 14 rank=489
sig=(22,21) sample draw= 0  3  9 14 gap= 3  6  5 13 rank=490
sig=(24,15) sample draw= 0  3  9 15 gap= 3  6  6 12 rank=491
sig=(24,16) sample draw= 0  3  9 16 gap= 3  6  7 11 rank=492
sig=(24,17) sample draw= 0  3  9 17 gap= 3  6  8 10 rank=493
sig=(24,18) sample draw= 0  3  9 18 gap= 3  6  9  9 rank=494
sig=(24,19) sample draw= 0  3  9 19 gap= 3  6 10  8 rank=495
sig=(24,20) sample draw= 0  3  9 20 gap= 3  6 11  7 rank=496
sig=(24,21) sample draw= 0  3  9 21 gap= 3  6 12  6 rank=497
sig=(22,14) sample draw= 0  3  9 22 gap= 3  6 13  5 rank=498
sig=(23,13) sample draw= 0  3  9 23 gap= 3  6 14  4 rank=499
sig=(24,10) sample draw= 0  3 10 13 gap= 3  7  3 14 rank=500
sig=(23,20) sample draw= 0  3 10 14 gap= 3  7  4 13 rank=501
sig=( 3, 7) sample draw= 0  3 10 15 gap= 3  7  5 12 rank=502
sig=( 3,13) sample draw= 0  3 10 16 gap= 3  7  6 11 rank=503
sig=( 3,14) sample draw= 0  3 10 17 gap= 3  7  7 10 rank=504
sig=( 3,15) sample draw= 0  3 10 18 gap= 3  7  8  9 rank=505
sig=( 3,16) sample draw= 0  3 10 19 gap= 3  7  9  8 rank=506
sig=( 3,17) sample draw= 0  3 10 20 gap= 3  7 10  7 rank=507
sig=( 3,18) sample draw= 0  3 10 21 gap= 3  7 11  6 rank=508
sig=(24,22) sample draw= 0  3 10 22 gap= 3  7 12  5 rank=509
sig=(23,14) sample draw= 0  3 10 23 gap= 3  7 13  4 rank=510
sig=(24,11) sample draw= 0  3 11 14 gap= 3  8  3 13 rank=511
sig=(23,16) sample draw= 0  3 11 15 gap= 3  8  4 12 rank=512
sig=(22,19) sample draw= 0  3 11 16 gap= 3  8  5 11 rank=513
sig=( 3, 8) sample draw= 0  3 11 17 gap= 3  8  6 10 rank=514
sig=( 8, 7) sample draw= 0  3 11 18 gap= 3  8  7  9 rank=515
sig=( 8, 3) sample draw= 0  3 11 19 gap= 3  8  8  8 rank=516
sig=( 7, 3) sample draw= 0  3 11 20 gap= 3  8  9  7 rank=517
sig=( 6, 3) sample draw= 0  3 11 21 gap= 3  8 10  6 rank=518
sig=( 3,19) sample draw= 0  3 11 22 gap= 3  8 11  5 rank=519
sig=(23,15) sample draw= 0  3 11 23 gap= 3  8 12  4 rank=520
sig=(24,12) sample draw= 0  3 12 15 gap= 3  9  3 12 rank=521
sig=( 3, 9) sample draw= 0  3 12 16 gap= 3  9  4 11 rank=522
sig=( 5,10) sample draw= 0  3 12 17 gap= 3  9  5 10 rank=523
sig=( 6, 9) sample draw= 0  3 12 18 gap= 3  9  6  9 rank=524
sig=( 7, 8) sample draw= 0  3 12 19 gap= 3  9  7  8 rank=525
sig=( 9,15) sample draw= 0  3 12 20 gap= 3  9  8  7 rank=526
sig=( 6,12) sample draw= 0  3 12 21 gap= 3  9  9  6 rank=527
sig=( 5, 3) sample draw= 0  3 12 22 gap= 3  9 10  5 rank=528
sig=(24,23) sample draw= 0  3 12 23 gap= 3  9 11  4 rank=529
sig=(24,13) sample draw= 0  3 13 16 gap= 3 10  3 11 rank=530
sig=( 3,10) sample draw= 0  3 13 17 gap= 3 10  4 10 rank=531
sig=( 5, 9) sample draw= 0  3 13 18 gap= 3 10  5  9 rank=532
sig=( 6, 8) sample draw= 0  3 13 19 gap= 3 10  6  8 rank=533
sig=( 7, 7) sample draw= 0  3 13 20 gap= 3 10  7  7 rank=534
sig=( 8, 6) sample draw= 0  3 13 21 gap= 3 10  8  6 rank=535
sig=( 5,13) sample draw= 0  3 13 22 gap= 3 10  9  5 rank=536
sig=( 3,20) sample draw= 0  3 13 23 gap= 3 10 10  4 rank=537
sig=(24,14) sample draw= 0  3 14 18 gap= 3 11  4  9 rank=538
sig=( 3,11) sample draw= 0  3 14 19 gap= 3 11  5  8 rank=539
sig=( 6, 7) sample draw= 0  3 14 20 gap= 3 11  6  7 rank=540
sig=( 7, 6) sample draw= 0  3 14 21 gap= 3 11  7  6 rank=541
sig=( 5,14) sample draw= 0  3 14 22 gap= 3 11  8  5 rank=542
sig=( 4, 3) sample draw= 0  3 14 23 gap= 3 11  9  4 rank=543
sig=( 3,12) sample draw= 0  3 15 19 gap= 3 12  4  8 rank=544
sig=( 5, 7) sample draw= 0  3 15 20 gap= 3 12  5  7 rank=545
sig=( 6, 6) sample draw= 0  3 15 21 gap= 3 12  6  6 rank=546
sig=( 5,15) sample draw= 0  3 15 22 gap= 3 12  7  5 rank=547
sig=( 4,15) sample draw= 0  3 15 23 gap= 3 12  8  4 rank=548
sig=(23,11) sample draw= 0  3 16 20 gap= 3 13  4  7 rank=549
sig=( 5, 6) sample draw= 0  3 16 21 gap= 3 13  5  6 rank=550
sig=( 5,16) sample draw= 0  3 16 22 gap= 3 13  6  5 rank=551
sig=( 4,16) sample draw= 0  3 16 23 gap= 3 13  7  4 rank=552
sig=( 4, 6) sample draw= 0  3 17 21 gap= 3 14  4  6 rank=553
sig=(22,22) sample draw= 0  3 17 22 gap= 3 14  5  5 rank=554
sig=( 4,17) sample draw= 0  3 17 23 gap= 3 14  6  4 rank=555
sig=(22,23) sample draw= 0  3 18 22 gap= 3 15  4  5 rank=556
sig=(23,22) sample draw= 0  3 18 23 gap= 3 15  5  4 rank=557
sig=(23,23) sample draw= 0  3 19 23 gap= 3 16  4  4 rank=558
sig=( 4, 4) sample draw= 0  4  8 12 gap= 4  4  4 15 rank=559
sig=(23, 9) sample draw= 0  4  8 13 gap= 4  4  5 14 rank=560
sig=( 4,10) sample draw= 0  4  8 14 gap= 4  4  6 13 rank=561
sig=( 4, 7) sample draw= 0  4  8 15 gap= 4  4  7 12 rank=562
sig=( 4, 8) sample draw= 0  4  8 16 gap= 4  4  8 11 rank=563
sig=( 4, 9) sample draw= 0  4  8 17 gap= 4  4  9 10 rank=564
sig=( 4,14) sample draw= 0  4  8 18 gap= 4  4 10  9 rank=565
sig=( 4,11) sample draw= 0  4  8 19 gap= 4  4 11  8 rank=566
sig=( 4,12) sample draw= 0  4  8 20 gap= 4  4 12  7 rank=567
sig=( 4,13) sample draw= 0  4  8 21 gap= 4  4 13  6 rank=568
sig=( 4,18) sample draw= 0  4  8 22 gap= 4  4 14  5 rank=569
sig=( 4, 5) sample draw= 0  4  9 13 gap= 4  5  4 14 rank=570
sig=( 5, 5) sample draw= 0  4  9 14 gap= 4  5  5 13 rank=571
sig=( 9, 6) sample draw= 0  4  9 15 gap= 4  5  6 12 rank=572
sig=( 9, 7) sample draw= 0  4  9 16 gap= 4  5  7 11 rank=573
sig=( 5, 8) sample draw= 0  4  9 17 gap= 4  5  8 10 rank=574
sig=( 9, 4) sample draw= 0  4  9 18 gap= 4  5  9  9 rank=575
sig=( 8, 4) sample draw= 0  4  9 19 gap= 4  5 10  8 rank=576
sig=( 5,11) sample draw= 0  4  9 20 gap= 4  5 11  7 rank=577
sig=( 5,12) sample draw= 0  4  9 21 gap= 4  5 12  6 rank=578
sig=( 5, 4) sample draw= 0  4  9 22 gap= 4  5 13  5 rank=579
sig=( 6, 4) sample draw= 0  4 10 14 gap= 4  6  4 13 rank=580
sig=( 6, 5) sample draw= 0  4 10 15 gap= 4  6  5 12 rank=581
sig=( 6,11) sample draw= 0  4 10 16 gap= 4  6  6 11 rank=582
sig=( 6,17) sample draw= 0  4 10 17 gap= 4  6  7 10 rank=583
sig=(13,23) sample draw= 0  4 10 18 gap= 4  6  8  9 rank=584
sig=(15, 8) sample draw= 0  4 10 19 gap= 4  6  9  8 rank=585
sig=( 6,10) sample draw= 0  4 10 20 gap= 4  6 10  7 rank=586
sig=(10, 6) sample draw= 0  4 10 21 gap= 4  6 11  6 rank=587
sig=(12, 5) sample draw= 0  4 10 22 gap= 4  6 12  5 rank=588
sig=( 7, 4) sample draw= 0  4 11 15 gap= 4  7  4 12 rank=589
sig=( 7, 5) sample draw= 0  4 11 16 gap= 4  7  5 11 rank=590
sig=( 7,16) sample draw= 0  4 11 17 gap= 4  7  6 10 rank=591
sig=(14,20) sample draw= 0  4 11 18 gap= 4  7  7  9 rank=592
sig=(16, 4) sample draw= 0  4 11 19 gap= 4  7  8  8 rank=593
sig=(16, 7) sample draw= 0  4 11 20 gap= 4  7  9  7 rank=594
sig=(17, 6) sample draw= 0  4 11 21 gap= 4  7 10  6 rank=595
sig=(11, 5) sample draw= 0  4 11 22 gap= 4  7 11  5 rank=596
sig=( 8,15) sample draw= 0  4 12 16 gap= 4  8  4 11 rank=597
sig=( 8, 5) sample draw= 0  4 12 17 gap= 4  8  5 10 rank=598
sig=(12,19) sample draw= 0  4 12 18 gap= 4  8  6  9 rank=599
sig=(19,12) sample draw= 0  4 12 19 gap= 4  8  7  8 rank=600
sig=(19,23) sample draw= 0  4 12 20 gap= 4  8  8  7 rank=601
sig=(23,21) sample draw= 0  4 12 21 gap= 4  8  9  6 rank=602
sig=(10, 5) sample draw= 0  4 12 22 gap= 4  8 10  5 rank=603
sig=(10, 4) sample draw= 0  4 13 17 gap= 4  9  4 10 rank=604
sig=( 9, 5) sample draw= 0  4 13 18 gap= 4  9  5  9 rank=605
sig=(13, 6) sample draw= 0  4 13 19 gap= 4  9  6  8 rank=606
sig=(14, 4) sample draw= 0  4 13 20 gap= 4  9  7  7 rank=607
sig=( 6,13) sample draw= 0  4 13 21 gap= 4  9  8  6 rank=608
sig=(18, 5) sample draw= 0  4 13 22 gap= 4  9  9  5 rank=609
sig=(13, 4) sample draw= 0  4 14 19 gap= 4 10  5  8 rank=610
sig=(13,20) sample draw= 0  4 14 20 gap= 4 10  6  7 rank=611
sig=(14, 7) sample draw= 0  4 14 21 gap= 4 10  7  6 rank=612
sig=(13,22) sample draw= 0  4 14 22 gap= 4 10  8  5 rank=613
sig=(12, 4) sample draw= 0  4 15 20 gap= 4 11  5  7 rank=614
sig=( 6,15) sample draw= 0  4 15 21 gap= 4 11  6  6 rank=615
sig=(15, 7) sample draw= 0  4 15 22 gap= 4 11  7  5 rank=616
sig=(11, 4) sample draw= 0  4 16 21 gap= 4 12  5  6 rank=617
sig=(16, 6) sample draw= 0  4 16 22 gap= 4 12  6  5 rank=618
sig=( 5,17) sample draw= 0  4 17 22 gap= 4 13  5  5 rank=619
sig=(17, 5) sample draw= 0  5 10 15 gap= 5  5  5 12 rank=620
sig=(11,21) sample draw= 0  5 10 16 gap= 5  5  6 11 rank=621
sig=(17,20) sample draw= 0  5 10 17 gap= 5  5  7 10 rank=622
sig=(14,22) sample draw= 0  5 10 18 gap= 5  5  8  9 rank=623
sig=(14, 8) sample draw= 0  5 10 19 gap= 5  5  9  8 rank=624
sig=(20,12) sample draw= 0  5 10 20 gap= 5  5 10  7 rank=625
sig=(11, 6) sample draw= 0  5 10 21 gap= 5  5 11  6 rank=626
sig=(16,16) sample draw= 0  5 11 16 gap= 5  6  5 11 rank=627
sig=(21,12) sample draw= 0  5 11 17 gap= 5  6  6 10 rank=628
sig=( 7, 9) sample draw= 0  5 11 18 gap= 5  6  7  9 rank=629
sig=( 8, 8) sample draw= 0  5 11 19 gap= 5  6  8  8 rank=630
sig=(12, 6) sample draw= 0  5 11 20 gap= 5  6  9  7 rank=631
sig=(21,11) sample draw= 0  5 11 21 gap= 5  6 10  6 rank=632
sig=(10,12) sample draw= 0  5 12 17 gap= 5  7  5 10 rank=633
sig=( 7,15) sample draw= 0  5 12 18 gap= 5  7  6  9 rank=634
sig=(15, 5) sample draw= 0  5 12 19 gap= 5  7  7  8 rank=635
sig=(22,20) sample draw= 0  5 12 20 gap= 5  7  8  7 rank=636
sig=( 9,11) sample draw= 0  5 12 21 gap= 5  7  9  6 rank=637
sig=(13,19) sample draw= 0  5 13 18 gap= 5  8  5  9 rank=638
sig=(21,14) sample draw= 0  5 13 19 gap= 5  8  6  8 rank=639
sig=( 8,14) sample draw= 0  5 13 20 gap= 5  8  7  7 rank=640
sig=(16,19) sample draw= 0  5 13 21 gap= 5  8  8  6 rank=641
sig=(15,21) sample draw= 0  5 14 20 gap= 5  9  6  7 rank=642
sig=(16,20) sample draw= 0  5 14 21 gap= 5  9  7  6 rank=643
sig=(15,17) sample draw= 0  5 15 21 gap= 5 10  6  6 rank=644
sig=(18,15) sample draw= 0  6 12 18 gap= 6  6  6  9 rank=645
sig=(21,13) sample draw= 0  6 12 19 gap= 6  6  7  8 rank=646
sig=(20,19) sample draw= 0  6 12 20 gap= 6  6  8  7 rank=647
sig=(21,19) sample draw= 0  6 13 19 gap= 6  7  6  8 rank=648
sig=(13,21) sample draw= 0  6 13 20 gap= 6  7  7  7 rank=649
650 gaps printed
n_sigs=650, n_gps=650, tot_gps=650
1939.51Question about programFLOYD::YODERMFYFri Apr 21 1995 20:041
The program is C++ and not C, correct?
1939.52HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri Apr 21 1995 21:264
It uses the ++ operator a few times but it's written in C.

/Eric
1939.53Re: .-1FLOYD::YODERMFYMon Apr 24 1995 13:459
OK, its SPR time I guess.  :-)

(1) My C compiler (either VAX C or DEC C, I haven't ascertained which) doesn't
    like #include "mumble.h", it insists on #include <mumble.h> for stdio etc.
(2) Some lines look like they are commented out by //, which I thought was
    C++ only, and isn't accepted by my compiler in any case.

Of course we all know that C is portable :-), but which C compiler do you use?
Is it correct that the lines beginning with // are meant to be commented out?
1939.54I'm using DECC not VAXCHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Mon Apr 24 1995 14:3814
Yes, // lines are commented out.

Try

	$ cc/decc program

Then you can

	$ link program

(With decc you don't need to explicitly ask for vaxcrtl.exe)

/Eric
1939.55N=5 program?FLOYD::YODERMFYTue Apr 25 1995 20:043
Do you plan to modify your program and run it for the N=5 case?  It seems to me
that if the memory usage was small enough, it might run in less than a day
(given the experience with N=4).
1939.56HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Thu Apr 27 1995 13:189

I wasn't planning on it.  I guess what I'd really like is to find some sort
of closed form for a solution.  It's not really satisfying to me to have
a random-looking mapping from gap print to signature.

Can anyone think of some sort of "system" ?

/Eric
1939.57FLOYD::YODERMFYThu Apr 27 1995 15:2613
Here's a couple of questions aimed at moving towards a system.

1. Can anyone modify the proof in .1 to show that there exists a system with
rotational symmetry?  That is, one where, if the cards are numbered from 0 to
D(N)-1, then the treatment of hands with the same gap pattern is "the same" in
the obvious sense.

2. Let G = (g1,...,gn) be a gap pattern, where the sum of the gi is D(N).  Call
(g1+g2,g3,...gn) a "merging" of G into a pattern with 1 fewer number; and
similarly for (g1,g2+g3,g4,...,gn), etc.  Considering rotated patterns to be the
same, when are two mergings of a gap pattern identical?  One obvious case arises
with any pattern of the form (a,b,a,a,...,a): the mergings (a+b,a,...,a) and
(a,b+a,a,...,a) are the same.  What others exist?
1939.58HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Thu Apr 27 1995 19:4435
It sounds like you're asking if the mapping produced by my program for 27,4
and the one I produced by hand for 8,3 are a mappings the existence of can
be proved.

I've done a very small piece of the proof.  I showed the necessary condition
that the number of possible signatures is as large as the number of gap
patterns.

For 27,4, it so happens that the number of gap patterns and signatures is
both 26*25 or 650.  It would be easy to prove that this is always the case
(or not).

But obviously this doesn't prove that we can always find a 1-1 mapping
between gap patterns and signatures.

You just asked when 2 gap patterns will have identical mergings.  I'm
not clear yet why you want to know that, but I'll entertain it for a moment.

Clearly, all gap patterns of 27,4 can be merged into "27" !  (just add up
all the 4 values).

So let's back off and look at merging just 2 of the 4 values.

Look at some gp's:

1,1,1,24
1,1,2,23

Clearly these both merge into 1,1,25.  But how does that help ?

My program assigned signature 1,1 to 1,1,1,24 and it assigned signatuer 1,2
to 1,1,2,23.  I'm not sure where we go from here.

/Eric
1939.59digressionAUSSIE::GARSONachtentachtig kacheltjesSun Apr 30 1995 22:527
    re .54 etc.
    
    // is part of the ANSI standard for C. It certainly post-dates the
    original VAXC. I don't know whether it will be retrofitted. Generally
    speaking you should get yourself DECC since that is where development
    is occurring. There are enough qualifiers so that you can get old code
    to compile still.
1939.60CSC32::D_DERAMODan D'Eramo, Customer Support CenterMon May 01 1995 14:506
        // is C++, not ANSI/ISO C.  DEC C does allow it in relaxed
        ANSI mode (the default /STANDARD=RELAXED_ANSI89 or
        /STANDARD=NOSTANDARD) but not in strict ANSI mode
        (/STANDARD=ANSI89).
        
        Dan
1939.61mergingsFLOYD::YODERMFYMon May 01 1995 20:1911
With respect to the merging question, (1) I'm only interested in the first
merging step, (2) I'm only interested in when different mergings of the *same*
gap pattern are the same.

The reason for (1) is clear: the gap pattern in the revealed cards is a merging
of the gap pattern of the drawn cards, determined by which card you conceal.

For (2), the motivation is less obvious, but roughly speaking, if you can show
that identical mergings are mostly nonexistent, I think you may be able to alter
the proof in .1 to get a proof of existence of a strategy dependent only on gap
patterns.
1939.62HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Tue May 02 1995 17:4534
>
>The reason for (1) is clear: the gap pattern in the revealed cards is a merging
>of the gap pattern of the drawn cards, determined by which card you conceal.
>

I don't see that this is true at all.  Remember, the 3 out of 4 cards that
are revealed convey information by the ORDER in which they are revealed.

If the 3 cards were always revealed in clockwise order, then yes, they'd
represent a "merging" of 2 of the original gap numbers.

Let's look at an example.  Consider the gap pattern:

	1 2 3 21

An example drawing for this gap pattern is

	0 1 3 6

Sure, if we were to reveal

	0 1 3

then we could talk about the 3--6 gap and the 6--0 gap being somehow merged.

But if we reveal

	1 0 3

then we're doing something totally different than merely "merging".

/Eric

1939.63gap patternsFLOYD::YODERMFYTue May 02 1995 18:0612
We're using terminology differently.  I am using "gap pattern" to mean the
pattern of differences you get after ordering the cards.  One way of looking at
the original problem is to find a function f which maps each merged gap pattern
P into a set f(P) of (n-1)! values (none in P) such that the set G(P) of (n-1)!
gap patterns obtained by adding these values one by one is always disjoint from
G(P') for any P' /= P.  Given this, you can encode the various hands by mapping
the (n-1)! permutations to the values in f(P) by, say, mapping the nth
permutation to the nth value in f(P).

I will try to use "ordered gap pattern" to mean what I have been meaning, and
"unordered gap pattern" for the meaning I think you are using, when there might
be an ambiguity.
1939.64confused and frustrated...HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Thu May 04 1995 02:1091
Alot of what you wrote in that last reply I don't understand.  Some of it
I do, but I disagree with.  I'll put "> " in front of all of what
you wrote and intersperse my comments and questions.

Thanks.

> We're using terminology differently.  I am using "gap pattern" to mean the
> pattern of differences you get after ordering the cards.

	I believe this is exactly what I mean by "gap pattern" or "gap print"
	or "gp" in my program.  For example, suppose the cards are

		2 6 4 0

	I'd order them as

		0 2 4 6

	Then I'd compute the differences (mod 27) 2-0, 4-2, 6-4, 27-6,
	and hence I'd call the gap pattern

		2 2 2 21

	Is this different than what you mean by a gap pattern ?

> One way of looking at the original problem is to find a function f which
> maps each merged gap pattern P into a set f(P) of (n-1)! values (none in P)
> such that the set G(P) of (n-1)! gap patterns obtained by adding these values
> one by one is always disjoint from G(P') for any P' /= P.

	There's alot in the above I'm confused about.

	First of all, I don't see why the input of f(P) is a "merged"
	gap pattern.  I do see why the output of f(P) would be one of a set
	of (n-1)! values.  Once we decide which of the n cards we're
	concealing, we have (n-1)! possible orderings of the rest to announce
	to the magician.

	But your definition of a "merged" gap pattern is where you leave out
	one of the cards and hence add 2 gaps together.  For example, in
	my 2 2 2 21 up above, we could leave the 4 out of the 0 2 4 6
	which gives us 0 2 6, which can be described as merged gap pattern
	2 4 21.

	But suppose the output of f(2 4 21) is 0 6 2.  We could choose to
	describe this announcement in terms of its own gap pattern, which
	is 6-0 2-6 0-2 or 6 23 25.  But 6 23 25 doesn't look anything like the
	original merged gap pattern 2 4 21.

	So I'm still confused as to how merged gap patterns relate to what
	gets announced.

> ... into a set f(P) of (n-1)! values (none in P)
> such that the set G(P) of (n-1)! gap patterns obtained by adding these values
> one by one is always disjoint from G(P') for any P' /= P.

	The "none in P" seems obvious, since P is a merged gap pattern
	and the (n-1)! choices for the output of f(P) are announcements
	which are cards.

	"the set G(P) of (n-1)! gap patterns obtained" doesn't make sense
	to me since the (n-1)! choices aren't gap patterns at all, they're
	cards.

	"obtained by adding these values one by one".  What does this mean ?
	"accumulating" one by one ?  "adding" arithmetically by some
	definition ?  I'm really confused.

	The "is always disjoint" makes a tiny bit of sense to me, since clearly
	in order for the magician to successfully work backwards from
	each possible announcement to a unique drawing, the announcements
	must convey uniquely different pieces of information from each
	other.

> 
> I will try to use "ordered gap pattern" to mean what I have been meaning, and
> "unordered gap pattern" for the meaning I think you are using, when there might
> be an ambiguity.

	As I said at the beginning of the reply, it seems like we're
	both talking about the same kind of gap pattern.  If not, please
	give some real examples of yours.  I'm sorry I'm having
	so much trouble with the theoretical representation.  I'm
	feeling very frustrated about that...

	Any clarity would be appreciated.

	Thanks.

/Eric
1939.65more on gap patternsFLOYD::YODERMFYThu May 04 1995 15:4637
Sorry; on rereading my note I see it is, shall we say, overly terse.  By a gap
pattern I mean a circularly ordered set of values which sum to D(N).  That is,
the pattern (a,b,c) is the same as (b,c,a).  The values represent the
differences between the cards in a hand after ordering, so the hand (3,5,7)
would have the gap pattern (2,2,D(N)-4).

The original gap patterns have N values; if you consider the gap pattern for the
exposed cards only, you have what I call a "merged" gap pattern, one with only
N-1 values.  So if we removed the 5 from (3,5,7), the reduced hand (3,7) has the
gap pattern (4,D(N)-4) = (2+2,D(N)-4).  Obviously, every merged gap pattern is
produced by replacing two adjacent numbers with their sum.

What I said in .63 about the original problem was misleading and, I realize now,
probably incorrect; I was discussing a stricter version of the original problem
in which the strategy is constrained to depend only on the gap pattern of the
hand.  What I was getting at was that if we look at things from the point of
view of the decoder, what we have is that for every reduced hand R, say (0,2) in
the N=3 case, there is a set f(R) of (N-1)! hands it *can* encode; say they are
(0,2,3) and (0,2,4).  The original problem is equivalent to finding, for each
reduced hand, this set f(R) in such a way that f(R1) and f(R2) are disjoint when
R1 /= R2.  We must still, once we have done this, "tack on" an actual encoding
of permutations of R to members of f(R), but this is easy.

What I hoped was that this could be carried over so that we replace hands R with
reduced gap patterns, and for each reduced gap pattern map it to (N-1)! gap
patterns that *can* be encoded.  This has a problem with patterns duplicated by
virtue of symmetry; thus for the N=3 case, suppose the cards (0,4) could encode
for hidden cards 2 and 6.  Both (0,2,4) and (0,4,6) have the *same* gap pattern
(2,2,4), so such a scheme wouldn't map one merged gap pattern to (N-1)! unmerged
ones here.

I wanted to prove that such duplications are, roughly speaking, rare enough such
that a scheme could be constructed which successfully dealt with them as
exceptions.  The G function I mentioned was what you would construct in such a
method as a kind of analogue to the f function above: instead of mapping reduced
hands to full hands, as f does, it would map merged gap patterns to a set of
unmerged ones, "usually" a set with (N-1)! elements.
1939.66HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Thu May 04 1995 18:0018
> This has a problem with patterns duplicated by
> virtue of symmetry; thus for the N=3 case, suppose the cards (0,4) could encode
> for hidden cards 2 and 6.  Both (0,2,4) and (0,4,6) have the *same* gap pattern
> (2,2,4), so such a scheme wouldn't map one merged gap pattern to (N-1)! unmerged
> ones here.

With my scheme, although 0,2,4 and 0,4,6 have the same gap pattern,
that doesn't mean the reduced set (what the magician is told) would be
the same.  Both of these 2 draws represent gap pattern

	2,2,4

Suppose the reduced pattern ("signature" in my program) is 2.

That means that for draw 0,2,4 the assistant announces 0,2 and for draw 0,4,6
the assistant announces 4,6.  So they are distinguishable.

/Eric
1939.67Re: .66FLOYD::YODERMFYThu May 04 1995 19:0210
Yes: in the terminology I was using, the reduced pattern (2,6) would be mapped
to (2,2,4) and some other.  From the point of view of gap patterns, the hands
(0,2,4) and (0,4,6) are "the same": this is seen more easily by rewriting the
latter as (4,6,0), also of a (2,2,4) gap pattern.  What you said was equivalent
to:

  for hand (0,2,4), reveal 0,2
  for hand (4,6,0), reveal 4,6

which makes the equivalence of treatment obvious.
1939.68looking for closed form expression for mappingHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Thu May 04 1995 20:0780
Let's revisit all the possible gap patterns for the 8,3 game, and list
for each one the possible signatures.

Before we do, let's make sure we're talking the same language here.
Take a random 3-card drawing from 0..7, ordered from low to high:

	2 5 6

Compute the gaps, which are 5-2, 6-5, 2+8-6:

	3 1 4

Rotate this gap pattern for lowest to highest:

	1 4 3

I call this rotated form the "gap pattern".

Suppose we choose to announce 6,5 for drawing 2,5,6.  Since 5+8-6 is 7,
I say the "signature" for gap pattern 1 4 3 is 7.

Note that signatures for the 8,3 game are only a single number.  For the
27,4 game, signatures are 2 numbers.

So, now let's list all possible gap patterns for 8,3 and for each, list
all valid signatures:

sample drawing		gap pattern	valid signatures (V on valid ones)
--------------		-----------	1 2 3 4 5 6 7
0 1 2			1 1 6		V V       V V
0 1 3			1 2 5           V V V   V V V
0 1 4			1 3 4		V   V V V   V
0 2 3			2 1 5		V V V   V V V
0 2 4			2 2 4		  V   V   V
0 2 5			2 3 3		  V V   V V
0 3 4			3 1 4		V   V V V   V

In case it isn't clear, the valid signatures are all the combinations of
possible gaps between 2 cards in the drawing.  For example, for drawing 0 1 2,
if the announcement is 0 1, then the signature is 1-0 which is 1.  So there's
a "V" in the 1 column.  But for drawing 0 1 2, if the announcement is 1,0 then
the signature is 0+8-1 which is 7, so there's a "V" in the 7 column.

The pattern of V's is symmetric around the "4" column, since if a-b has
a "V", then so does b-a (mod 8).

A "solution" to the puzzle is to be had by reordering the 7 lines
I've given above, until a nonbroken diagonal of V's appears.  For example,
if we swap the 0 2 3 and 0 2 4 lines, we have:

sample drawing		gap pattern	valid signatures (V on valid ones)
--------------		-----------	1 2 3 4 5 6 7
0 1 2			1 1 6		V V       V V
0 1 3			1 2 5           V V V   V V V
0 1 4			1 3 4		V   V V V   V
0 2 4			2 2 4		  V   V   V
0 2 3			2 1 5		V V V   V V V
0 2 5			2 3 3		  V V   V V
0 3 4			3 1 4		V   V V V   V


Now we can clearly see that a valid solution is to use signature 1 for 0 1 2
and signature 2 for 0 1 3 and 3 for 0 1 4 and 4 for 0 2 4 etc.

Of course there's another diagonal going from lower left to upper right
(necessarily due to the symmetry already mentioned), so another solution
is to use sig 1 for 0 3 4, 2 for 0 2 5, 3 for 0 2 3 etc.

If we were to make such a chart for the 27,4 game, we'd have to
list 26*25 or 650 sample drawings, and have 650 columns for the valid
signatures column.

I was hoping this exercise might suggest a way to see a pattern for a closed
form solution, but I don't see one.  However, it was interesting that
I only had to swap 2 adjacent rows in the middle of the table to go
from a lexicographically ordered list of gap patterns to a solution.
Maybe such a simple transformation will be possible for larger games ?

/Eric
1939.69ObservationsFLOYD::YODERMFYThu May 04 1995 21:5037
Aha!  I think we've been doing the equivalent of talking about "integers" while
one of us implicitly assumes Russell-style integers and the other implicitly
assumes von Neumann style.  I have been thinking of gap patterns as circularly
ordered n-tuples: if forced to make this more precise I would have defined them
to be the equivalence class of (always exactly N) patterns produced by rotating
a given one.  You have been choosing a canonical instance, presumably the
lexically least one (which is always unique, by an earlier theorem).

But if so, I think there is a misprint in your table: 2 1 5 and 3 1 4 are not
valid gap patterns, and should be 1 5 2 and 1 4 3 respectively.  If we rearrange
your table correspondingly, we get:

sample drawing		gap pattern	valid signatures (V on valid ones)
--------------		-----------	1 2 3 4 5 6 7
0 1 2			1 1 6		V V       V V
0 1 3			1 2 5           V V V   V V V
0 1 4			1 3 4		V   V V V   V
0 3 4			1 4 3		V   V V V   V
0 2 3			1 5 2		V V V   V V V
0 2 4			2 2 4		  V   V   V
0 2 5			2 3 3		  V V   V V

This is not so close to having a diagonal set up already.  However, if we order
the rows by reverse lexicographical order of the reversed gap patterns, we get:

sample drawing		gap pattern	valid signatures (V on valid ones)
--------------		-----------	1 2 3 4 5 6 7
0 1 2			1 1 6		V V       V V
0 1 3			1 2 5           V V V   V V V
0 1 4			1 3 4		V   V V V   V
0 2 4			2 2 4		  V   V   V
0 3 4			1 4 3		V   V V V   V
0 2 5			2 3 3		  V V   V V
0 2 3			1 5 2		V V V   V V V

This has both main diagonals set up, which suggests we might be able to come up
with a couple of conjectures for the more general case.
1939.70HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri May 05 1995 13:418
Yes, you're right.  I didn't rotate 2 1 5 and 3 1 4 enough.  By rotating,
I would have found that they are really 1 5 2 and 1 4 3 respectively.

I had to reread your statement "reverse lexico order of the reversed gap
patterns" a few times before seeing what you mean, but I think I get it
now.

/Eric
1939.71on the orderingFLOYD::YODERMFYFri May 05 1995 15:2610
I have realized that one aspect of what I said wasn't necessary: I said
*reverse* lexicographic order of reversed gap patterns.  If a diagonal pattern
is present with reverse lexicographic order of reversed gap patterns, a
different diagonal will be present if forward lexicographic order is used.  The
key that makes the pattern appear (in this one case!) is to order the reversed
patterns lexicographically.

For higher N, where the signatures are longer than a single number, you probably
want to order them lexicographically as well.  Here also, reversing the order
won't matter.
1939.72HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri May 05 1995 17:2934
For the 27,4 situations, signatures are 2 numbers.  For example, consider
the drawing

	0 3 4 7

The gaps are

	3 1 3 20

Suppose we decide to announce to the magician

	3 7 4

This means that the signature is 7-3, 4(+27)-7 or

	4 24

Since each of the 2 numbers in the signature is from 1 through 26, my
program encoded an internal single number of each possible signature.  For
the 2-digit signature

	a b

the program combines them as

	(a-1)*26 + b-1

So 4 24 becomes 3*26+23 or 101.

I wonder if using this combined signature should be what we use when
columnating and looking for a main diagonal ?

/Eric
1939.7327, 4 program that sorts the gaps in reverseHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Mon May 08 1995 13:52346
/*
	This programs solves the 27,4 card puzzle, which is:

	Magician is blindfolded, and his assistant hands a deck of 27
	cards labeled 0 through 26 to an audience member who shuffles
	and hands 4 of the cards back to the assistant.

	The assistant then carefully chooses 3 of the 4 cards, and announces
	them to the magician in a carefully chosen order.  From the values
	and order that the magician hears, he can announce the 4th card.

	What agreement do assistant and magician have ahead of time that
	allows this trick to work ?

	Author (of program, not the puzzle): Eric Osman  21-Apr-1995
*/
#include "stdlib.h"
#include "stdio.h"
/*
	General strategy:

	Every drawing of 4 numbers has a gap print, defined as the spread
	between the 4 numbers, as viewed around a 27 point circle.

	For example, for the drawing 0,1,2,3, the gap print is 1,1,1,24.
	The drawing 24,25,26,0 has exactly the same gap print.

	Suppose the drawing is 2,3,1,0.  This is the same as 0,1,2,3.  That
	is to say, if the assistant announces, say, 2,3,1, the magician has
	to say 0.  The magician has no way of knowing in what order the
	audience member handed the 4 cards to the assistant.

	The announcement 2,3,1 defines 2 gaps, a gap of 1 to get from the
	2 to the 3, and a gap of 25 to get from the 3 to the 1 (continuing
	around the 27-point circle).

	So, for the announcement of 2,3,1, we associate the ordered pair
	of gaps 1,25.  I call this ordered pair a signature.

	The general strategy is that the assistance and magician will agree
	on an association between gap prints and signatures.

	Suppose the agreed signature for gap print 1,1,1,24 is 1,25.  That
	means, if assistant is handed the cards 4,5,6,7, since they have gap
	print 1,1,1,24, the assistant announces 5,6,4.  The magician hears
	that and calculates 6-5 is 1 and 4-6 is 25 (mod 27) so the conveyed
	signature is 1,25.  The magician therefore knows by agreement that
	the gap print is 1,1,1,24 and that 3 of the 4 cards are 4,5,6.  Hence
	he knows the last card must be 7.

	One more thing that needs to be mentioned here is that if there's
	an ambiguity, it is agreed that the smallest possible numbers are
	used.  For example, suppose the signature for gap print 1,1,1,24 is
	1,1.  That means draw 0,1,2,3 will be announced as 0,1,2 and not 1,2,3.
	Similarly, when magician hears 1,2,3, and knows the signature is
	therefore 1,1, he knows the cards are 1,2,3,4 and not 0,1,2,3 since
	if the cards *were* 0,1,2,3, the assistant would have been obliged
	to say 0,1,2.

	There's a total of 26*25 different gap prints possible, and there's
	a total of 26*25 different signatures possible.  This program
	finds and verifies a 1-1 mapping between them.

	Since each of the 2 numbers in a signature can be from 1 through 26,
	a simple encoding to combine the 2 numbers into a single index
	is (n1-1)*26+n2-1.  However, for tables to allow all these different
	indicies, we need to allocate 26*26 slots, since they are not
	contiguous.  That's why max_sigs, the maximum number of signatures,
	is 26*26 and not 26*25.
*/
#define max_sigs 26*26
#define tot_gps 26*25	/* total number of gap prints possible */

int n_sigs;	/* how many signatures have been mapped to gap prints */
int sig_used[max_sigs];		/* non-negative for each mapped signature */

/*
	gp is the structure that records a gap print.  sig is the index
	of the mapped signature.  a,b,c,d are the sample draw for that
	gap print.  w,x,y,z are the gap print itself.  The ss table is
	all the possible signatures for that gap print.  For example, for
	drawing 0,1,2,3, announcement 0,1,2 is signature 1,1 but announcement
	0,1,3 is signature 1,2.  Announcement 1,2,0 is signature 1,25.
	The slots corresponding to all those announcements (usually 24
	different slots total) would be marked off in the ss table.
*/
typedef struct {int sig,a,b,c,d,w,x,y,z,weight; int ss[max_sigs];} gp;

gp gps[tot_gps];	/* The gap prints.  Each one holds a gp */

int n_gps;	/* how many gp's we've found so far */

int main()	/* start here ! */
{
int a,b,c,d,w,x,y,z,i,j,k,m,n=0,q,r,s,e,f,ss,pn,tmp,best,try,bw,bx,by,bz;

n_gps = 0;	/* no gp's found yet */

for (i=0; i<tot_gps; i++) gps[i].sig=-1;	/* -1 means no signature yet */

/*
	We cycle through all possible drawings, such that the cards are
	in ascending order.  Remember, all the other drawings are
	equivalent to one of the ascending ones.
*/
for (a=0; a<27; a++)
for (b=a+1; b<27; b++)
for (c=b+1; c<27; c++)
for (d=c+1; d<27; d++)
	{
/*
	w,x,y,z are the gp.  Only z might need to be adjusted, since the
	rest are guaranteed due to the ascending draw chosen.
*/
	w=b-a, x=c-b, y=d-c, z=a-d;
	if (z<0) z+=27;
/*
	Normalize the gap such that z is largest, then y, then x, then w.
	Rotate until so.
*/
	best = 0;
	for (i=0; i<4; i++)
		{
		try = (((z-1)*26+(y-1))*26+(x-1))*26+(w-1);
		if (try > best) bw=w, bx=x, by=y, bz=z, best=try;
		tmp=w, w=x, x=y, y=z, z=tmp;
		}
	w=bw, x=bx, y=by, z=bz;
/*
	For this gp, we search all the gp's we've found so far, and
	throw this one away if it is a duplicate.
*/
	for (k=0; k<n_gps; k++)
		if (w==gps[k].w && x==gps[k].x && y==gps[k].y && z==gps[k].z)
			goto dup;
/*
	If we find more than the expected 26*25 gp's, we detect that
	fatal flaw here.
*/
	if (n_gps >=tot_gps)
		printf (
"bad: attempt to do more than %d gaps at draw=%d %d %d %d\n",
	tot_gps,a,b,c,d),
		exit (0);
/*
	Now that we know the gp is unique, we store the drawing and
	gp itself into our table.
*/
	gps[n_gps].x = x, gps[n_gps].y=y, gps[n_gps].z=z, gps[n_gps].w=w; 
	gps[n_gps].a = a, gps[n_gps].b=b, gps[n_gps].c=c, gps[n_gps].d=d;
	gps[n_gps].weight = best;
/*
	Now we examine all possible 3-card announcements for this drawing.
*/
	for (j=0; j<24; j++)
		{
		switch (j)
		{
case 0: q=a, r=b, s=c; break;case 1: q=a, r=c, s=b; break;case 2: q=b, r=a, s=c; break;
case 3: q=b, r=c, s=a; break;case 4: q=c, r=b, s=a; break;case 5: q=c, r=a, s=b; break;

case 6: q=a, r=b, s=d; break;case 7: q=a, r=d, s=b; break;case 8: q=b, r=a, s=d; break;
case 9: q=b, r=d, s=a; break; case 10: q=d, r=b, s=a; break;case 11: q=d, r=a, s=b; break;

case 12: q=d, r=b, s=c; break; case 13: q=d, r=c, s=b; break;case 14: q=b, r=d, s=c; break;
case 15: q=b, r=c, s=d; break; case 16: q=c, r=b, s=d; break;case 17: q=c, r=d, s=b; break;

case 18: q=a, r=d, s=c; break; case 19: q=a, r=c, s=d; break;case 20: q=d, r=a, s=c; break;
case 21: q=d, r=c, s=a; break; case 22: q=c, r=d, s=a; break;case 23: q=c, r=a, s=d; break;
		}
/*
	e and f represent the signature for the announcement.
*/
		e=r-q; if (e<0) e+= 27;
		f=s-r; if (f<0) f+= 27;
		ss = (e-1)*26 + f-1;	/* ss is the internal value for sig. */
		if (ss<0 || ss>=max_sigs) printf ("bad ss value %d=(%d,%d)",
			ss,e,f), exit(0);
/*
	We remember this signature as one of the possible ones for this
	gap print.
*/
		gps[n_gps].ss[ss]++;
		}
	n_gps++;
	dup:;
	}
/*
	Once we've tried every possible drawing, we make sure we
	have exactly 26*25 different gp's.
*/
if (n_gps!=tot_gps)
	printf ("bad: not all %d gaps found\n", tot_gps),
	exit (0);
/*
	Sort the list such that largest z's come first, with equal z's
	sorted with largest y's first etc.
*/
	{
	gp tmp_gp;
	for (i=0; i<tot_gps-1; i++)
		if (i>=0 && gps[i].weight<gps[i+1].weight)
			tmp_gp=gps[i], gps[i]=gps[i+1], gps[i+1]=tmp_gp, i=i-2;
	}
/*
	We now try to map one of the possible sig's for each gp to that
	gp.
*/
for (i=0; i<tot_gps; i++)
	{
	for (j=0; j<max_sigs; j++)
		{
		if (gps[i].ss[j] && !sig_used[j])
			{
			sig_used[j] = 1;
			gps[i].sig = j;
			n_sigs++;
			goto sig_assigned;
			}
		}
	sig_assigned:;
	}
printf ("*** end of pass through singles, n_sigs = %d ***\n", n_sigs);
while (1)
{
int progress=0;
/*
	For each gp j that isn't mapped yet to a sig because none
	were available, but for which a gp i is willing to give up it's
	sig to j, since i has another possible sig, we make the trade here.
*/
for (i=0; i<tot_gps; i++) if (gps[i].sig>=0)
for (j=0; j<tot_gps; j++) if (gps[j].sig<0 && gps[j].ss[gps[i].sig])
for (k=0; k<max_sigs; k++) if (!sig_used[k] && gps[i].ss[k] && !gps[j].ss[k])
	{
	gps[j].sig = gps[i].sig;
	gps[i].sig = k;
	sig_used[k] = 1;
	n_sigs++;
//	printf ("gp[%d] gave %d to gp[%d] and got %d instead\n",
//		i,gps[j].sig,j,k);
	progress = 1;
	break;
	}

printf ("*** end of pass through dupls, n_sigs = %d ***\n", n_sigs);
if (n_sigs>=tot_gps) goto all_assigned;
/*
	There are still gp's that aren't mapped to a sig.  The following
	loop finds triplets of gp's i,m,j where j doesn't have a sig,
	but i is willing to take a different sig, giving its sig to m, who
	gives its sig to j.
*/
if (!progress)
{
for (i=0; i<tot_gps; i++) if (gps[i].sig>=0)
for (m=0; m<tot_gps; m++) if (gps[m].sig>=0 && gps[m].ss[gps[i].sig])
for (j=0; j<tot_gps; j++) if (gps[j].sig<0 && !gps[j].ss[gps[i].sig]
	&& gps[j].ss[gps[m].sig])
for (k=0; k<max_sigs; k++) if (!sig_used[k] && !gps[j].ss[k]
		&& gps[i].ss[k])
	{
	gps[j].sig = gps[m].sig;
	gps[m].sig = gps[i].sig;
	gps[i].sig = k;
	sig_used[k] = 1;
	n_sigs++;
//	printf (
//    "gp[%d] gave %d to gp[%d] and took %d so gp[%d] can give %d to gp[%d]\n",
//		i,gps[m].sig,m,k,m,gps[j].sig,j);
	progress = 1;
	break;
	}
printf ("*** end of pass through triples, n_sigs = %d ***\n", n_sigs);
if (n_sigs>=tot_gps) goto all_assigned;
}
/*
	If we assigned any sigs during this pass, we go back and see
	which ones are assignable now.
*/
if (!progress) break;
}
all_assigned:;
/*
	This loop shows exactly what sig was mapped to each gp.  This
	is the list that the assistant and magician would each work from.

*/
pn=0;
for (i=0; i<tot_gps; i++) if (gps[i].sig >= 0)
	{
	printf (
"sig=(%3d=%2d,%2d) sample draw=%2d %2d %2d %2d gap=%2d %2d %2d %2d rank=%3d\n",
		gps[i].sig, gps[i].sig/26+1,
	gps[i].sig%26+1,gps[i].a,gps[i].b,gps[i].c,gps[i].d,
		gps[i].w,gps[i].x,gps[i].y,gps[i].z,i);
	pn++;
	}
printf ("%d gaps printed\n",pn);

printf ("n_sigs=%d, n_gps=%d, tot_gps=%d\n",n_sigs,n_gps,tot_gps);
/*
	Now we check our work.  We make sure that each possible drawing
	maps to a different gp, and that all gp's are taken.
*/
{
char saw_gap[tot_gps];
for (i=0; i<tot_gps; i++) saw_gap[i] = 0;

for (a=0; a<27; a++)
for (b=a+1; b<27; b++)
for (c=b+1; c<27; c++)
for (d=c+1; d<27; d++)
	{
	w=b-a;
	x=c-b;
	y=d-c;
	z=a-d; if (z<0) z+=27;

	n=-1;
	for (i=0; i<tot_gps; i++)
	for (j=0; j<4; j++)
		{
		if (gps[i].w==w && gps[i].x==x && gps[i].y==y && gps[i].z==z)
			{
			if (n>=0)
				printf (
	"Bad: gaps %d and %d both match draw %d %d %d %d\n",n,i,a,b,c,d),
				exit (0);
			n=i;
			saw_gap[i]++;
			}
		tmp=w, w=x, x=y, y=z, z=tmp;
		}
	if (n<0)
		printf (
    "Bad: no gap %d %d %d %d found for a draw %d %d %d %d\n",x,y,z,w,a,b,c,d),
		exit (0);
	}
for (i=0; i<tot_gps; i++) if (!saw_gap[i])
	printf ("bad: gap %d %d %d %d did not match any draw\n",
		gps[i].w,gps[i].x,gps[i].y,gps[i].z);
}

return 0;
}
1939.74output of 27,4 programHANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Mon May 08 1995 13:54656
*** end of pass through singles, n_sigs = 612 ***
*** end of pass through dupls, n_sigs = 642 ***
*** end of pass through dupls, n_sigs = 642 ***
*** end of pass through triples, n_sigs = 650 ***
sig=(  0= 1, 1) sample draw= 0  1  2  3 gap= 1  1  1 24 rank=  0
sig=(  1= 1, 2) sample draw= 0  1  2  4 gap= 1  1  2 23 rank=  1
sig=(673=26,24) sample draw= 0  1  3  4 gap= 1  2  1 23 rank=  2
sig=( 22= 1,23) sample draw= 0  1  2 25 gap= 2  1  1 23 rank=  3
sig=(651=26, 2) sample draw= 0  1  2  5 gap= 1  1  3 22 rank=  4
sig=( 27= 2, 2) sample draw= 0  1  3  5 gap= 1  2  2 22 rank=  5
sig=( 23= 1,24) sample draw= 0  1  3 25 gap= 2  1  2 22 rank=  6
sig=( 21= 1,22) sample draw= 0  1  4  5 gap= 1  3  1 22 rank=  7
sig=( 26= 2, 1) sample draw= 0  1 23 25 gap= 2  2  1 22 rank=  8
sig=( 24= 1,25) sample draw= 0  1  2 24 gap= 3  1  1 22 rank=  9
sig=(675=26,26) sample draw= 0  1  2  6 gap= 1  1  4 21 rank= 10
sig=( 28= 2, 3) sample draw= 0  1  3  6 gap= 1  2  3 21 rank= 11
sig=(674=26,25) sample draw= 0  1  4 25 gap= 2  1  3 21 rank= 12
sig=( 46= 2,21) sample draw= 0  1  4  6 gap= 1  3  2 21 rank= 13
sig=( 48= 2,23) sample draw= 0  2  4  6 gap= 2  2  2 21 rank= 14
sig=( 49= 2,24) sample draw= 0  1  3 24 gap= 3  1  2 21 rank= 15
sig=( 20= 1,21) sample draw= 0  1  5  6 gap= 1  4  1 21 rank= 16
sig=( 52= 3, 1) sample draw= 0  1 22 24 gap= 2  3  1 21 rank= 17
sig=( 47= 2,22) sample draw= 0  1 22 25 gap= 3  2  1 21 rank= 18
sig=( 51= 2,26) sample draw= 0  1  2 23 gap= 4  1  1 21 rank= 19
sig=(  5= 1, 6) sample draw= 0  1  2  7 gap= 1  1  5 20 rank= 20
sig=( 55= 3, 4) sample draw= 0  1  3  7 gap= 1  2  4 20 rank= 21
sig=( 30= 2, 5) sample draw= 0  1  5 25 gap= 2  1  4 20 rank= 22
sig=( 54= 3, 3) sample draw= 0  1  4  7 gap= 1  3  3 20 rank= 23
sig=( 71= 3,20) sample draw= 0  2  4  7 gap= 2  2  3 20 rank= 24
sig=( 74= 3,23) sample draw= 0  1  4 24 gap= 3  1  3 20 rank= 25
sig=( 45= 2,20) sample draw= 0  1  5  7 gap= 1  4  2 20 rank= 26
sig=( 53= 3, 2) sample draw= 0  2  5  7 gap= 2  3  2 20 rank= 27
sig=(647=25,24) sample draw= 0  2  4 24 gap= 3  2  2 20 rank= 28
sig=( 76= 3,25) sample draw= 0  1  3 23 gap= 4  1  2 20 rank= 29
sig=( 19= 1,20) sample draw= 0  1  6  7 gap= 1  5  1 20 rank= 30
sig=( 78= 4, 1) sample draw= 0  1 21 23 gap= 2  4  1 20 rank= 31
sig=( 72= 3,21) sample draw= 0  1 21 24 gap= 3  3  1 20 rank= 32
sig=( 77= 3,26) sample draw= 0  1 21 25 gap= 4  2  1 20 rank= 33
sig=(104= 5, 1) sample draw= 0  1  2 22 gap= 5  1  1 20 rank= 34
sig=(  6= 1, 7) sample draw= 0  1  2  8 gap= 1  1  6 19 rank= 35
sig=( 56= 3, 5) sample draw= 0  1  3  8 gap= 1  2  5 19 rank= 36
sig=( 31= 2, 6) sample draw= 0  1  6 25 gap= 2  1  5 19 rank= 37
sig=( 81= 4, 4) sample draw= 0  1  4  8 gap= 1  3  4 19 rank= 38
sig=( 96= 4,19) sample draw= 0  2  4  8 gap= 2  2  4 19 rank= 39
sig=( 99= 4,22) sample draw= 0  1  5 24 gap= 3  1  4 19 rank= 40
sig=( 70= 3,19) sample draw= 0  1  5  8 gap= 1  4  3 19 rank= 41
sig=( 73= 3,22) sample draw= 0  2  5  8 gap= 2  3  3 19 rank= 42
sig=(106= 5, 3) sample draw= 0  2  5 24 gap= 3  2  3 19 rank= 43
sig=(101= 4,24) sample draw= 0  1  4 23 gap= 4  1  3 19 rank= 44
sig=(571=22,26) sample draw= 0  1  6  8 gap= 1  5  2 19 rank= 45
sig=( 79= 4, 2) sample draw= 0  2  6  8 gap= 2  4  2 19 rank= 46
sig=(122= 5,19) sample draw= 0  2 21 24 gap= 3  3  2 19 rank= 47
sig=(102= 4,25) sample draw= 0  2  4 23 gap= 4  2  2 19 rank= 48
sig=(131= 6, 2) sample draw= 0  1  3 22 gap= 5  1  2 19 rank= 49
sig=( 18= 1,19) sample draw= 0  1  7  8 gap= 1  6  1 19 rank= 50
sig=(123= 5,20) sample draw= 0  1 20 22 gap= 2  5  1 19 rank= 51
sig=(129= 5,26) sample draw= 0  1 20 23 gap= 3  4  1 19 rank= 52
sig=( 80= 4, 3) sample draw= 0  1 20 24 gap= 4  3  1 19 rank= 53
sig=(105= 5, 2) sample draw= 0  1 20 25 gap= 5  2  1 19 rank= 54
sig=(130= 6, 1) sample draw= 0  1  2 21 gap= 6  1  1 19 rank= 55
sig=(  7= 1, 8) sample draw= 0  1  2  9 gap= 1  1  7 18 rank= 56
sig=( 57= 3, 6) sample draw= 0  1  3  9 gap= 1  2  6 18 rank= 57
sig=( 32= 2, 7) sample draw= 0  1  7 25 gap= 2  1  6 18 rank= 58
sig=( 82= 4, 5) sample draw= 0  1  4  9 gap= 1  3  5 18 rank= 59
sig=(121= 5,18) sample draw= 0  2  4  9 gap= 2  2  5 18 rank= 60
sig=(103= 4,26) sample draw= 0  1  6 24 gap= 3  1  5 18 rank= 61
sig=( 95= 4,18) sample draw= 0  1  5  9 gap= 1  4  4 18 rank= 62
sig=(107= 5, 4) sample draw= 0  2  5  9 gap= 2  3  4 18 rank= 63
sig=( 98= 4,21) sample draw= 0  2  6 24 gap= 3  2  4 18 rank= 64
sig=(126= 5,23) sample draw= 0  1  5 23 gap= 4  1  4 18 rank= 65
sig=( 69= 3,18) sample draw= 0  1  6  9 gap= 1  5  3 18 rank= 66
sig=(132= 6, 3) sample draw= 0  2  6  9 gap= 2  4  3 18 rank= 67
sig=(147= 6,18) sample draw= 0  3  6  9 gap= 3  3  3 18 rank= 68
sig=(127= 5,24) sample draw= 0  2  5 23 gap= 4  2  3 18 rank= 69
sig=(155= 6,26) sample draw= 0  1  4 22 gap= 5  1  3 18 rank= 70
sig=(545=21,26) sample draw= 0  1  7  9 gap= 1  6  2 18 rank= 71
sig=(157= 7, 2) sample draw= 0  2  7  9 gap= 2  5  2 18 rank= 72
sig=(154= 6,25) sample draw= 0  2 20 23 gap= 3  4  2 18 rank= 73
sig=(128= 5,25) sample draw= 0  2 20 24 gap= 4  3  2 18 rank= 74
sig=(180= 7,25) sample draw= 0  2  4 22 gap= 5  2  2 18 rank= 75
sig=(181= 7,26) sample draw= 0  1  3 21 gap= 6  1  2 18 rank= 76
sig=( 17= 1,18) sample draw= 0  1  8  9 gap= 1  7  1 18 rank= 77
sig=(148= 6,19) sample draw= 0  1 19 21 gap= 2  6  1 18 rank= 78
sig=(182= 8, 1) sample draw= 0  1 19 22 gap= 3  5  1 18 rank= 79
sig=(204= 8,23) sample draw= 0  1 19 23 gap= 4  4  1 18 rank= 80
sig=(205= 8,24) sample draw= 0  1 19 24 gap= 5  3  1 18 rank= 81
sig=(206= 8,25) sample draw= 0  1 19 25 gap= 6  2  1 18 rank= 82
sig=(156= 7, 1) sample draw= 0  1  2 20 gap= 7  1  1 18 rank= 83
sig=(  8= 1, 9) sample draw= 0  1  2 10 gap= 1  1  8 17 rank= 84
sig=( 58= 3, 7) sample draw= 0  1  3 10 gap= 1  2  7 17 rank= 85
sig=( 33= 2, 8) sample draw= 0  1  8 25 gap= 2  1  7 17 rank= 86
sig=(653=26, 4) sample draw= 0  1  4 10 gap= 1  3  6 17 rank= 87
sig=(146= 6,17) sample draw= 0  2  4 10 gap= 2  2  6 17 rank= 88
sig=(149= 6,20) sample draw= 0  1  7 24 gap= 3  1  6 17 rank= 89
sig=(580=23, 9) sample draw= 0  1  5 10 gap= 1  4  5 17 rank= 90
sig=(120= 5,17) sample draw= 0  2  5 10 gap= 2  3  5 17 rank= 91
sig=(172= 7,17) sample draw= 0  2  7 24 gap= 3  2  5 17 rank= 92
sig=(124= 5,21) sample draw= 0  1  6 23 gap= 4  1  5 17 rank= 93
sig=(655=26, 6) sample draw= 0  1  6 10 gap= 1  5  4 17 rank= 94
sig=(133= 6, 4) sample draw= 0  2  6 10 gap= 2  4  4 17 rank= 95
sig=(153= 6,24) sample draw= 0  3  6 10 gap= 3  3  4 17 rank= 96
sig=(152= 6,23) sample draw= 0  2  6 23 gap= 4  2  4 17 rank= 97
sig=(255=10,22) sample draw= 0  1  5 22 gap= 5  1  4 17 rank= 98
sig=(656=26, 7) sample draw= 0  1  7 10 gap= 1  6  3 17 rank= 99
sig=(570=22,25) sample draw= 0  2  7 10 gap= 2  5  3 17 rank=100
sig=(178= 7,23) sample draw= 0  3  7 10 gap= 3  4  3 17 rank=101
sig=(179= 7,24) sample draw= 0  3  6 23 gap= 4  3  3 17 rank=102
sig=(257=10,24) sample draw= 0  2  5 22 gap= 5  2  3 17 rank=103
sig=(256=10,23) sample draw= 0  1  4 21 gap= 6  1  3 17 rank=104
sig=(657=26, 8) sample draw= 0  1  8 10 gap= 1  7  2 17 rank=105
sig=(183= 8, 2) sample draw= 0  2  8 10 gap= 2  6  2 17 rank=106
sig=(203= 8,22) sample draw= 0  2 19 22 gap= 3  5  2 17 rank=107
sig=(254=10,21) sample draw= 0  2 19 23 gap= 4  4  2 17 rank=108
sig=(258=10,25) sample draw= 0  2 19 24 gap= 5  3  2 17 rank=109
sig=(421=17, 6) sample draw= 0  2  4 21 gap= 6  2  2 17 rank=110
sig=(207= 8,26) sample draw= 0  1  3 20 gap= 7  1  2 17 rank=111
sig=( 16= 1,17) sample draw= 0  1  9 10 gap= 1  8  1 17 rank=112
sig=(173= 7,18) sample draw= 0  1 18 20 gap= 2  7  1 17 rank=113
sig=(208= 9, 1) sample draw= 0  1 18 21 gap= 3  6  1 17 rank=114
sig=(229= 9,22) sample draw= 0  1 18 22 gap= 4  5  1 17 rank=115
sig=(230= 9,23) sample draw= 0  1 18 23 gap= 5  4  1 17 rank=116
sig=(231= 9,24) sample draw= 0  1 18 24 gap= 6  3  1 17 rank=117
sig=(232= 9,25) sample draw= 0  1 18 25 gap= 7  2  1 17 rank=118
sig=(233= 9,26) sample draw= 0  1  2 19 gap= 8  1  1 17 rank=119
sig=(  9= 1,10) sample draw= 0  1  2 11 gap= 1  1  9 16 rank=120
sig=(649=25,26) sample draw= 0  1  3 11 gap= 1  2  8 16 rank=121
sig=(658=26, 9) sample draw= 0  1  9 25 gap= 2  1  8 16 rank=122
sig=( 84= 4, 7) sample draw= 0  1  4 11 gap= 1  3  7 16 rank=123
sig=(632=25, 9) sample draw= 0  2  4 11 gap= 2  2  7 16 rank=124
sig=(174= 7,19) sample draw= 0  1  8 24 gap= 3  1  7 16 rank=125
sig=(597=23,26) sample draw= 0  1  5 11 gap= 1  4  6 16 rank=126
sig=(622=24,25) sample draw= 0  2  5 11 gap= 2  3  6 16 rank=127
sig=(631=25, 8) sample draw= 0  2  8 24 gap= 3  2  6 16 rank=128
sig=(176= 7,21) sample draw= 0  1  7 23 gap= 4  1  6 16 rank=129
sig=(119= 5,16) sample draw= 0  1  6 11 gap= 1  5  5 16 rank=130
sig=(629=25, 6) sample draw= 0  2  6 11 gap= 2  4  5 16 rank=131
sig=(278=11,19) sample draw= 0  3  6 11 gap= 3  3  5 16 rank=132
sig=(177= 7,22) sample draw= 0  2  7 23 gap= 4  2  5 16 rank=133
sig=(151= 6,22) sample draw= 0  1  6 22 gap= 5  1  5 16 rank=134
sig=( 93= 4,16) sample draw= 0  1  7 11 gap= 1  6  4 16 rank=135
sig=(630=25, 7) sample draw= 0  2  7 11 gap= 2  5  4 16 rank=136
sig=(595=23,24) sample draw= 0  3  7 11 gap= 3  4  4 16 rank=137
sig=(604=24, 7) sample draw= 0  3  7 23 gap= 4  3  4 16 rank=138
sig=(280=11,21) sample draw= 0  2  6 22 gap= 5  2  4 16 rank=139
sig=(654=26, 5) sample draw= 0  1  5 21 gap= 6  1  4 16 rank=140
sig=( 67= 3,16) sample draw= 0  1  8 11 gap= 1  7  3 16 rank=141
sig=(184= 8, 3) sample draw= 0  2  8 11 gap= 2  6  3 16 rank=142
sig=(605=24, 8) sample draw= 0  3  8 11 gap= 3  5  3 16 rank=143
sig=(620=24,23) sample draw= 0  3 19 23 gap= 4  4  3 16 rank=144
sig=(621=24,24) sample draw= 0  3  6 22 gap= 5  3  3 16 rank=145
sig=(395=16, 6) sample draw= 0  2  5 21 gap= 6  2  3 16 rank=146
sig=(396=16, 7) sample draw= 0  1  4 20 gap= 7  1  3 16 rank=147
sig=( 41= 2,16) sample draw= 0  1  9 11 gap= 1  8  2 16 rank=148
sig=(209= 9, 2) sample draw= 0  2  9 11 gap= 2  7  2 16 rank=149
sig=(228= 9,21) sample draw= 0  2 18 21 gap= 3  6  2 16 rank=150
sig=(284=11,25) sample draw= 0  2 18 22 gap= 4  5  2 16 rank=151
sig=(398=16, 9) sample draw= 0  2 18 23 gap= 5  4  2 16 rank=152
sig=(447=18, 6) sample draw= 0  2 18 24 gap= 6  3  2 16 rank=153
sig=(448=18, 7) sample draw= 0  2  4 20 gap= 7  2  2 16 rank=154
sig=(397=16, 8) sample draw= 0  1  3 19 gap= 8  1  2 16 rank=155
sig=( 15= 1,16) sample draw= 0  1 10 11 gap= 1  9  1 16 rank=156
sig=(198= 8,17) sample draw= 0  1 17 19 gap= 2  8  1 16 rank=157
sig=(234=10, 1) sample draw= 0  1 17 20 gap= 3  7  1 16 rank=158
sig=(285=11,26) sample draw= 0  1 17 21 gap= 4  6  1 16 rank=159
sig=(399=16,10) sample draw= 0  1 17 22 gap= 5  5  1 16 rank=160
sig=(426=17,11) sample draw= 0  1 17 23 gap= 6  4  1 16 rank=161
sig=(666=26,17) sample draw= 0  1 17 24 gap= 7  3  1 16 rank=162
sig=(423=17, 8) sample draw= 0  1 17 25 gap= 8  2  1 16 rank=163
sig=(259=10,26) sample draw= 0  1  2 18 gap= 9  1  1 16 rank=164
sig=( 10= 1,11) sample draw= 0  1  2 12 gap= 1  1 10 15 rank=165
sig=(652=26, 3) sample draw= 0  1  3 12 gap= 1  2  9 15 rank=166
sig=( 35= 2,10) sample draw= 0  1 10 25 gap= 2  1  9 15 rank=167
sig=(  2= 1, 3) sample draw= 0  1  4 12 gap= 1  3  8 15 rank=168
sig=(648=25,25) sample draw= 0  2  4 12 gap= 2  2  8 15 rank=169
sig=(199= 8,18) sample draw= 0  1  9 24 gap= 3  1  8 15 rank=170
sig=(  3= 1, 4) sample draw= 0  1  5 12 gap= 1  4  7 15 rank=171
sig=(628=25, 5) sample draw= 0  2  5 12 gap= 2  3  7 15 rank=172
sig=(222= 9,15) sample draw= 0  2  9 24 gap= 3  2  7 15 rank=173
sig=(201= 8,20) sample draw= 0  1  8 23 gap= 4  1  7 15 rank=174
sig=(  4= 1, 5) sample draw= 0  1  6 12 gap= 1  5  6 15 rank=175
sig=( 29= 2, 4) sample draw= 0  2  6 12 gap= 2  4  6 15 rank=176
sig=(303=12,18) sample draw= 0  3  6 12 gap= 3  3  6 15 rank=177
sig=(202= 8,21) sample draw= 0  2  8 23 gap= 4  2  6 15 rank=178
sig=(305=12,20) sample draw= 0  1  7 22 gap= 5  1  6 15 rank=179
sig=(118= 5,15) sample draw= 0  1  7 12 gap= 1  6  5 15 rank=180
sig=(160= 7, 5) sample draw= 0  2  7 12 gap= 2  5  5 15 rank=181
sig=( 97= 4,20) sample draw= 0  3  7 12 gap= 3  4  5 15 rank=182
sig=(304=12,19) sample draw= 0  3  8 23 gap= 4  3  5 15 rank=183
sig=(368=15, 5) sample draw= 0  2  7 22 gap= 5  2  5 15 rank=184
sig=(306=12,21) sample draw= 0  1  6 21 gap= 6  1  5 15 rank=185
sig=( 92= 4,15) sample draw= 0  1  8 12 gap= 1  7  4 15 rank=186
sig=(185= 8, 4) sample draw= 0  2  8 12 gap= 2  6  4 15 rank=187
sig=(308=12,23) sample draw= 0  3  8 12 gap= 3  5  4 15 rank=188
sig=(367=15, 4) sample draw= 0  4  8 12 gap= 4  4  4 15 rank=189
sig=(371=15, 8) sample draw= 0  3  7 22 gap= 5  3  4 15 rank=190
sig=(369=15, 6) sample draw= 0  2  6 21 gap= 6  2  4 15 rank=191
sig=(370=15, 7) sample draw= 0  1  5 20 gap= 7  1  4 15 rank=192
sig=( 66= 3,15) sample draw= 0  1  9 12 gap= 1  8  3 15 rank=193
sig=(210= 9, 3) sample draw= 0  2  9 12 gap= 2  7  3 15 rank=194
sig=(309=12,24) sample draw= 0  3  9 12 gap= 3  6  3 15 rank=195
sig=(372=15, 9) sample draw= 0  3 18 22 gap= 4  5  3 15 rank=196
sig=(446=18, 5) sample draw= 0  3 18 23 gap= 5  4  3 15 rank=197
sig=(453=18,12) sample draw= 0  3  6 21 gap= 6  3  3 15 rank=198
sig=(502=20, 9) sample draw= 0  2  5 20 gap= 7  2  3 15 rank=199
sig=(449=18, 8) sample draw= 0  1  4 19 gap= 8  1  3 15 rank=200
sig=( 40= 2,15) sample draw= 0  1 10 12 gap= 1  9  2 15 rank=201
sig=(235=10, 2) sample draw= 0  2 10 12 gap= 2  8  2 15 rank=202
sig=(640=25,17) sample draw= 0  2 17 20 gap= 3  7  2 15 rank=203
sig=(310=12,25) sample draw= 0  2 17 21 gap= 4  6  2 15 rank=204
sig=(373=15,10) sample draw= 0  2 17 22 gap= 5  5  2 15 rank=205
sig=(427=17,12) sample draw= 0  2 17 23 gap= 6  4  2 15 rank=206
sig=(503=20,10) sample draw= 0  2 17 24 gap= 7  3  2 15 rank=207
sig=(477=19,10) sample draw= 0  2  4 19 gap= 8  2  2 15 rank=208
sig=(424=17, 9) sample draw= 0  1  3 18 gap= 9  1  2 15 rank=209
sig=( 14= 1,15) sample draw= 0  1 11 12 gap= 1 10  1 15 rank=210
sig=(223= 9,16) sample draw= 0  1 16 18 gap= 2  9  1 15 rank=211
sig=(260=11, 1) sample draw= 0  1 16 19 gap= 3  8  1 15 rank=212
sig=(311=12,26) sample draw= 0  1 16 20 gap= 4  7  1 15 rank=213
sig=(374=15,11) sample draw= 0  1 16 21 gap= 5  6  1 15 rank=214
sig=(401=16,12) sample draw= 0  1 16 22 gap= 6  5  1 15 rank=215
sig=(504=20,11) sample draw= 0  1 16 23 gap= 7  4  1 15 rank=216
sig=(665=26,16) sample draw= 0  1 16 24 gap= 8  3  1 15 rank=217
sig=(452=18,11) sample draw= 0  1 16 25 gap= 9  2  1 15 rank=218
sig=(624=25, 1) sample draw= 0  1  2 17 gap=10  1  1 15 rank=219
sig=( 11= 1,12) sample draw= 0  1  2 13 gap= 1  1 11 14 rank=220
sig=( 61= 3,10) sample draw= 0  1  3 13 gap= 1  2 10 14 rank=221
sig=( 36= 2,11) sample draw= 0  1 11 25 gap= 2  1 10 14 rank=222
sig=( 86= 4, 9) sample draw= 0  1  4 13 gap= 1  3  9 14 rank=223
sig=(221= 9,14) sample draw= 0  2  4 13 gap= 2  2  9 14 rank=224
sig=(224= 9,17) sample draw= 0  1 10 24 gap= 3  1  9 14 rank=225
sig=(111= 5, 8) sample draw= 0  1  5 13 gap= 1  4  8 14 rank=226
sig=(195= 8,14) sample draw= 0  2  5 13 gap= 2  3  8 14 rank=227
sig=(247=10,14) sample draw= 0  2 10 24 gap= 3  2  8 14 rank=228
sig=(226= 9,19) sample draw= 0  1  9 23 gap= 4  1  8 14 rank=229
sig=(136= 6, 7) sample draw= 0  1  6 13 gap= 1  5  7 14 rank=230
sig=(169= 7,14) sample draw= 0  2  6 13 gap= 2  4  7 14 rank=231
sig=(328=13,17) sample draw= 0  3  6 13 gap= 3  3  7 14 rank=232
sig=(227= 9,20) sample draw= 0  2  9 23 gap= 4  2  7 14 rank=233
sig=(330=13,19) sample draw= 0  1  8 22 gap= 5  1  7 14 rank=234
sig=(143= 6,14) sample draw= 0  1  7 13 gap= 1  6  6 14 rank=235
sig=(161= 7, 6) sample draw= 0  2  7 13 gap= 2  5  6 14 rank=236
sig=(332=13,21) sample draw= 0  3  7 13 gap= 3  4  6 14 rank=237
sig=(329=13,18) sample draw= 0  3  9 23 gap= 4  3  6 14 rank=238
sig=(342=14, 5) sample draw= 0  2  8 22 gap= 5  2  6 14 rank=239
sig=(331=13,20) sample draw= 0  1  7 21 gap= 6  1  6 14 rank=240
sig=(117= 5,14) sample draw= 0  1  8 13 gap= 1  7  5 14 rank=241
sig=(186= 8, 5) sample draw= 0  2  8 13 gap= 2  6  5 14 rank=242
sig=(333=13,22) sample draw= 0  3  8 13 gap= 3  5  5 14 rank=243
sig=(341=14, 4) sample draw= 0  4  8 13 gap= 4  4  5 14 rank=244
sig=(345=14, 8) sample draw= 0  3  8 22 gap= 5  3  5 14 rank=245
sig=(343=14, 6) sample draw= 0  2  7 21 gap= 6  2  5 14 rank=246
sig=(344=14, 7) sample draw= 0  1  6 20 gap= 7  1  5 14 rank=247
sig=( 91= 4,14) sample draw= 0  1  9 13 gap= 1  8  4 14 rank=248
sig=(211= 9, 4) sample draw= 0  2  9 13 gap= 2  7  4 14 rank=249
sig=(334=13,23) sample draw= 0  3  9 13 gap= 3  6  4 14 rank=250
sig=(346=14, 9) sample draw= 0  4  9 13 gap= 4  5  4 14 rank=251
sig=(454=18,13) sample draw= 0  4  8 22 gap= 5  4  4 14 rank=252
sig=(496=20, 3) sample draw= 0  3  7 21 gap= 6  3  4 14 rank=253
sig=(506=20,13) sample draw= 0  2  6 20 gap= 7  2  4 14 rank=254
sig=(476=19, 9) sample draw= 0  1  5 19 gap= 8  1  4 14 rank=255
sig=( 65= 3,14) sample draw= 0  1 10 13 gap= 1  9  3 14 rank=256
sig=(236=10, 3) sample draw= 0  2 10 13 gap= 2  8  3 14 rank=257
sig=(335=13,24) sample draw= 0  3 10 13 gap= 3  7  3 14 rank=258
sig=(347=14,10) sample draw= 0  3 17 21 gap= 4  6  3 14 rank=259
sig=(420=17, 5) sample draw= 0  3 17 22 gap= 5  5  3 14 rank=260
sig=(428=17,13) sample draw= 0  3 17 23 gap= 6  4  3 14 rank=261
sig=(522=21, 3) sample draw= 0  3  6 20 gap= 7  3  3 14 rank=262
sig=(480=19,13) sample draw= 0  2  5 19 gap= 8  2  3 14 rank=263
sig=(451=18,10) sample draw= 0  1  4 18 gap= 9  1  3 14 rank=264
sig=( 39= 2,14) sample draw= 0  1 11 13 gap= 1 10  2 14 rank=265
sig=(261=11, 2) sample draw= 0  2 11 13 gap= 2  9  2 14 rank=266
sig=(336=13,25) sample draw= 0  2 16 19 gap= 3  8  2 14 rank=267
sig=(348=14,11) sample draw= 0  2 16 20 gap= 4  7  2 14 rank=268
sig=(402=16,13) sample draw= 0  2 16 21 gap= 5  6  2 14 rank=269
sig=(498=20, 5) sample draw= 0  2 16 22 gap= 6  5  2 14 rank=270
sig=(523=21, 4) sample draw= 0  2 16 23 gap= 7  4  2 14 rank=271
sig=(548=22, 3) sample draw= 0  2 16 24 gap= 8  3  2 14 rank=272
sig=(573=23, 2) sample draw= 0  2  4 18 gap= 9  2  2 14 rank=273
sig=(598=24, 1) sample draw= 0  1  3 17 gap=10  1  2 14 rank=274
sig=( 13= 1,14) sample draw= 0  1 12 13 gap= 1 11  1 14 rank=275
sig=(248=10,15) sample draw= 0  1 15 17 gap= 2 10  1 14 rank=276
sig=(286=12, 1) sample draw= 0  1 15 18 gap= 3  9  1 14 rank=277
sig=(337=13,26) sample draw= 0  1 15 19 gap= 4  8  1 14 rank=278
sig=(349=14,12) sample draw= 0  1 15 20 gap= 5  7  1 14 rank=279
sig=(376=15,13) sample draw= 0  1 15 21 gap= 6  6  1 14 rank=280
sig=(664=26,15) sample draw= 0  1 15 22 gap= 7  5  1 14 rank=281
sig=(672=26,23) sample draw= 0  1 15 23 gap= 8  4  1 14 rank=282
sig=(574=23, 3) sample draw= 0  1 15 24 gap= 9  3  1 14 rank=283
sig=(599=24, 2) sample draw= 0  1 15 25 gap=10  2  1 14 rank=284
sig=(639=25,16) sample draw= 0  1  2 16 gap=11  1  1 14 rank=285
sig=( 12= 1,13) sample draw= 0  1  2 14 gap= 1  1 12 13 rank=286
sig=( 62= 3,11) sample draw= 0  1  3 14 gap= 1  2 11 13 rank=287
sig=( 37= 2,12) sample draw= 0  1 12 25 gap= 2  1 11 13 rank=288
sig=( 87= 4,10) sample draw= 0  1  4 14 gap= 1  3 10 13 rank=289
sig=(246=10,13) sample draw= 0  2  4 14 gap= 2  2 10 13 rank=290
sig=(249=10,16) sample draw= 0  1 11 24 gap= 3  1 10 13 rank=291
sig=(663=26,14) sample draw= 0  1  5 14 gap= 1  4  9 13 rank=292
sig=(220= 9,13) sample draw= 0  2  5 14 gap= 2  3  9 13 rank=293
sig=(272=11,13) sample draw= 0  2 11 24 gap= 3  2  9 13 rank=294
sig=(251=10,18) sample draw= 0  1 10 23 gap= 4  1  9 13 rank=295
sig=(137= 6, 8) sample draw= 0  1  6 14 gap= 1  5  8 13 rank=296
sig=(637=25,14) sample draw= 0  2  6 14 gap= 2  4  8 13 rank=297
sig=(314=13, 3) sample draw= 0  3  6 14 gap= 3  3  8 13 rank=298
sig=(252=10,19) sample draw= 0  2 10 23 gap= 4  2  8 13 rank=299
sig=(316=13, 5) sample draw= 0  1  9 22 gap= 5  1  8 13 rank=300
sig=(162= 7, 7) sample draw= 0  1  7 14 gap= 1  6  7 13 rank=301
sig=(168= 7,13) sample draw= 0  2  7 14 gap= 2  5  7 13 rank=302
sig=(318=13, 7) sample draw= 0  3  7 14 gap= 3  4  7 13 rank=303
sig=(315=13, 4) sample draw= 0  3 10 23 gap= 4  3  7 13 rank=304
sig=(355=14,18) sample draw= 0  2  9 22 gap= 5  2  7 13 rank=305
sig=(317=13, 6) sample draw= 0  1  8 21 gap= 6  1  7 13 rank=306
sig=(142= 6,13) sample draw= 0  1  8 14 gap= 1  7  6 13 rank=307
sig=(187= 8, 6) sample draw= 0  2  8 14 gap= 2  6  6 13 rank=308
sig=(319=13, 8) sample draw= 0  3  8 14 gap= 3  5  6 13 rank=309
sig=(354=14,17) sample draw= 0  4  8 14 gap= 4  4  6 13 rank=310
sig=(358=14,21) sample draw= 0  3  9 22 gap= 5  3  6 13 rank=311
sig=(356=14,19) sample draw= 0  2  8 21 gap= 6  2  6 13 rank=312
sig=(357=14,20) sample draw= 0  1  7 20 gap= 7  1  6 13 rank=313
sig=(116= 5,13) sample draw= 0  1  9 14 gap= 1  8  5 13 rank=314
sig=(212= 9, 5) sample draw= 0  2  9 14 gap= 2  7  5 13 rank=315
sig=(320=13, 9) sample draw= 0  3  9 14 gap= 3  6  5 13 rank=316
sig=(359=14,22) sample draw= 0  4  9 14 gap= 4  5  5 13 rank=317
sig=(445=18, 4) sample draw= 0  4  9 22 gap= 5  4  5 13 rank=318
sig=(455=18,14) sample draw= 0  3  8 21 gap= 6  3  5 13 rank=319
sig=(495=20, 2) sample draw= 0  2  7 20 gap= 7  2  5 13 rank=320
sig=(481=19,14) sample draw= 0  1  6 19 gap= 8  1  5 13 rank=321
sig=( 90= 4,13) sample draw= 0  1 10 14 gap= 1  9  4 13 rank=322
sig=(237=10, 4) sample draw= 0  2 10 14 gap= 2  8  4 13 rank=323
sig=(321=13,10) sample draw= 0  3 10 14 gap= 3  7  4 13 rank=324
sig=(360=14,23) sample draw= 0  4 10 14 gap= 4  6  4 13 rank=325
sig=(429=17,14) sample draw= 0  4 17 22 gap= 5  5  4 13 rank=326
sig=(471=19, 4) sample draw= 0  4  8 21 gap= 6  4  4 13 rank=327
sig=(422=17, 7) sample draw= 0  3  7 20 gap= 7  3  4 13 rank=328
sig=(521=21, 2) sample draw= 0  2  6 19 gap= 8  2  4 13 rank=329
sig=(546=22, 1) sample draw= 0  1  5 18 gap= 9  1  4 13 rank=330
sig=( 64= 3,13) sample draw= 0  1 11 14 gap= 1 10  3 13 rank=331
sig=(262=11, 3) sample draw= 0  2 11 14 gap= 2  9  3 13 rank=332
sig=(322=13,11) sample draw= 0  3 11 14 gap= 3  8  3 13 rank=333
sig=(361=14,24) sample draw= 0  3 16 20 gap= 4  7  3 13 rank=334
sig=(403=16,14) sample draw= 0  3 16 21 gap= 5  6  3 13 rank=335
sig=(472=19, 5) sample draw= 0  3 16 22 gap= 6  5  3 13 rank=336
sig=(497=20, 4) sample draw= 0  3 16 23 gap= 7  4  3 13 rank=337
sig=(478=19,11) sample draw= 0  3  6 19 gap= 8  3  3 13 rank=338
sig=(547=22, 2) sample draw= 0  2  5 18 gap= 9  2  3 13 rank=339
sig=(572=23, 1) sample draw= 0  1  4 17 gap=10  1  3 13 rank=340
sig=( 38= 2,13) sample draw= 0  1 12 14 gap= 1 11  2 13 rank=341
sig=(287=12, 2) sample draw= 0  2 12 14 gap= 2 10  2 13 rank=342
sig=(323=13,12) sample draw= 0  2 15 18 gap= 3  9  2 13 rank=343
sig=(362=14,25) sample draw= 0  2 15 19 gap= 4  8  2 13 rank=344
sig=(377=15,14) sample draw= 0  2 15 20 gap= 5  7  2 13 rank=345
sig=(473=19, 6) sample draw= 0  2 15 21 gap= 6  6  2 13 rank=346
sig=(513=20,20) sample draw= 0  2 15 22 gap= 7  5  2 13 rank=347
sig=(577=23, 6) sample draw= 0  2 15 23 gap= 8  4  2 13 rank=348
sig=(563=22,18) sample draw= 0  2 15 24 gap= 9  3  2 13 rank=349
sig=(588=23,17) sample draw= 0  2  4 17 gap=10  2  2 13 rank=350
sig=(613=24,16) sample draw= 0  1  3 16 gap=11  1  2 13 rank=351
sig=(299=12,14) sample draw= 0  1 13 14 gap= 1 12  1 13 rank=352
sig=(273=11,14) sample draw= 0  1 14 16 gap= 2 11  1 13 rank=353
sig=(312=13, 1) sample draw= 0  1 14 17 gap= 3 10  1 13 rank=354
sig=(324=13,13) sample draw= 0  1 14 18 gap= 4  9  1 13 rank=355
sig=(351=14,14) sample draw= 0  1 14 19 gap= 5  8  1 13 rank=356
sig=(363=14,26) sample draw= 0  1 14 20 gap= 6  7  1 13 rank=357
sig=(499=20, 6) sample draw= 0  1 14 21 gap= 7  6  1 13 rank=358
sig=(524=21, 5) sample draw= 0  1 14 22 gap= 8  5  1 13 rank=359
sig=(549=22, 4) sample draw= 0  1 14 23 gap= 9  4  1 13 rank=360
sig=(601=24, 4) sample draw= 0  1 14 24 gap=10  3  1 13 rank=361
sig=(626=25, 3) sample draw= 0  1 14 25 gap=11  2  1 13 rank=362
sig=(638=25,15) sample draw= 0  1  2 15 gap=12  1  1 13 rank=363
sig=( 63= 3,12) sample draw= 0  1  3 15 gap= 1  2 12 12 rank=364
sig=(288=12, 3) sample draw= 0  1 13 25 gap= 2  1 12 12 rank=365
sig=( 88= 4,11) sample draw= 0  1  4 15 gap= 1  3 11 12 rank=366
sig=(271=11,12) sample draw= 0  2  4 15 gap= 2  2 11 12 rank=367
sig=(274=11,15) sample draw= 0  1 12 24 gap= 3  1 11 12 rank=368
sig=(113= 5,10) sample draw= 0  1  5 15 gap= 1  4 10 12 rank=369
sig=(245=10,12) sample draw= 0  2  5 15 gap= 2  3 10 12 rank=370
sig=(290=12, 5) sample draw= 0  2 12 24 gap= 3  2 10 12 rank=371
sig=(276=11,17) sample draw= 0  1 11 23 gap= 4  1 10 12 rank=372
sig=(138= 6, 9) sample draw= 0  1  6 15 gap= 1  5  9 12 rank=373
sig=(219= 9,12) sample draw= 0  2  6 15 gap= 2  4  9 12 rank=374
sig=(291=12, 6) sample draw= 0  3  6 15 gap= 3  3  9 12 rank=375
sig=(277=11,18) sample draw= 0  2 11 23 gap= 4  2  9 12 rank=376
sig=(380=15,17) sample draw= 0  1 10 22 gap= 5  1  9 12 rank=377
sig=(163= 7, 8) sample draw= 0  1  7 15 gap= 1  6  8 12 rank=378
sig=(193= 8,12) sample draw= 0  2  7 15 gap= 2  5  8 12 rank=379
sig=(292=12, 7) sample draw= 0  3  7 15 gap= 3  4  8 12 rank=380
sig=(289=12, 4) sample draw= 0  3 11 23 gap= 4  3  8 12 rank=381
sig=(382=15,19) sample draw= 0  2 10 22 gap= 5  2  8 12 rank=382
sig=(381=15,18) sample draw= 0  1  9 21 gap= 6  1  8 12 rank=383
sig=(167= 7,12) sample draw= 0  1  8 15 gap= 1  7  7 12 rank=384
sig=(188= 8, 7) sample draw= 0  2  8 15 gap= 2  6  7 12 rank=385
sig=(293=12, 8) sample draw= 0  3  8 15 gap= 3  5  7 12 rank=386
sig=(379=15,16) sample draw= 0  4  8 15 gap= 4  4  7 12 rank=387
sig=(253=10,20) sample draw= 0  3 10 22 gap= 5  3  7 12 rank=388
sig=(443=18, 2) sample draw= 0  2  9 21 gap= 6  2  7 12 rank=389
sig=(468=19, 1) sample draw= 0  1  8 20 gap= 7  1  7 12 rank=390
sig=(141= 6,12) sample draw= 0  1  9 15 gap= 1  8  6 12 rank=391
sig=(213= 9, 6) sample draw= 0  2  9 15 gap= 2  7  6 12 rank=392
sig=(294=12, 9) sample draw= 0  3  9 15 gap= 3  6  6 12 rank=393
sig=(384=15,21) sample draw= 0  4  9 15 gap= 4  5  6 12 rank=394
sig=(419=17, 4) sample draw= 0  4 10 22 gap= 5  4  6 12 rank=395
sig=(444=18, 3) sample draw= 0  3  9 21 gap= 6  3  6 12 rank=396
sig=(456=18,15) sample draw= 0  2  8 20 gap= 7  2  6 12 rank=397
sig=(482=19,15) sample draw= 0  1  7 19 gap= 8  1  6 12 rank=398
sig=(115= 5,12) sample draw= 0  1 10 15 gap= 1  9  5 12 rank=399
sig=(238=10, 5) sample draw= 0  2 10 15 gap= 2  8  5 12 rank=400
sig=(295=12,10) sample draw= 0  3 10 15 gap= 3  7  5 12 rank=401
sig=(385=15,22) sample draw= 0  4 10 15 gap= 4  6  5 12 rank=402
sig=(430=17,15) sample draw= 0  5 10 15 gap= 5  5  5 12 rank=403
sig=(462=18,21) sample draw= 0  4  9 21 gap= 6  4  5 12 rank=404
sig=(470=19, 3) sample draw= 0  3  8 20 gap= 7  3  5 12 rank=405
sig=(512=20,19) sample draw= 0  2  7 19 gap= 8  2  5 12 rank=406
sig=(520=21, 1) sample draw= 0  1  6 18 gap= 9  1  5 12 rank=407
sig=( 89= 4,12) sample draw= 0  1 11 15 gap= 1 10  4 12 rank=408
sig=(263=11, 4) sample draw= 0  2 11 15 gap= 2  9  4 12 rank=409
sig=(296=12,11) sample draw= 0  3 11 15 gap= 3  8  4 12 rank=410
sig=(386=15,23) sample draw= 0  4 11 15 gap= 4  7  4 12 rank=411
sig=(404=16,15) sample draw= 0  4 16 21 gap= 5  6  4 12 rank=412
sig=(530=21,11) sample draw= 0  4 16 22 gap= 6  5  4 12 rank=413
sig=(487=19,20) sample draw= 0  4  8 20 gap= 7  4  4 12 rank=414
sig=(587=23,16) sample draw= 0  3  7 19 gap= 8  3  4 12 rank=415
sig=(537=21,18) sample draw= 0  2  6 18 gap= 9  2  4 12 rank=416
sig=(562=22,17) sample draw= 0  1  5 17 gap=10  1  4 12 rank=417
sig=(297=12,12) sample draw= 0  1 12 15 gap= 1 11  3 12 rank=418
sig=(302=12,17) sample draw= 0  2 12 15 gap= 2 10  3 12 rank=419
sig=(366=15, 3) sample draw= 0  3 12 15 gap= 3  9  3 12 rank=420
sig=(378=15,15) sample draw= 0  3 15 19 gap= 4  8  3 12 rank=421
sig=(387=15,24) sample draw= 0  3 15 20 gap= 5  7  3 12 rank=422
sig=(528=21, 9) sample draw= 0  3 15 21 gap= 6  6  3 12 rank=423
sig=(508=20,15) sample draw= 0  3 15 22 gap= 7  5  3 12 rank=424
sig=(578=23, 7) sample draw= 0  3 15 23 gap= 8  4  3 12 rank=425
sig=(603=24, 6) sample draw= 0  3  6 18 gap= 9  3  3 12 rank=426
sig=(612=24,15) sample draw= 0  2  5 17 gap=10  2  3 12 rank=427
sig=(623=24,26) sample draw= 0  1  4 16 gap=11  1  3 12 rank=428
sig=(298=12,13) sample draw= 0  1 13 15 gap= 1 12  2 12 rank=429
sig=(313=13, 2) sample draw= 0  2 13 15 gap= 2 11  2 12 rank=430
sig=(340=14, 3) sample draw= 0  2 14 17 gap= 3 10  2 12 rank=431
sig=(352=14,15) sample draw= 0  2 14 18 gap= 4  9  2 12 rank=432
sig=(388=15,25) sample draw= 0  2 14 19 gap= 5  8  2 12 rank=433
sig=(514=20,21) sample draw= 0  2 14 20 gap= 6  7  2 12 rank=434
sig=(527=21, 8) sample draw= 0  2 14 21 gap= 7  6  2 12 rank=435
sig=(552=22, 7) sample draw= 0  2 14 22 gap= 8  5  2 12 rank=436
sig=(589=23,18) sample draw= 0  2 14 23 gap= 9  4  2 12 rank=437
sig=(602=24, 5) sample draw= 0  2 14 24 gap=10  3  2 12 rank=438
sig=(627=25, 4) sample draw= 0  2  4 16 gap=11  2  2 12 rank=439
sig=(326=13,15) sample draw= 0  1 13 16 gap= 3 11  1 12 rank=440
sig=(338=14, 1) sample draw= 0  1 13 17 gap= 4 10  1 12 rank=441
sig=(389=15,26) sample draw= 0  1 13 18 gap= 5  9  1 12 rank=442
sig=(488=19,21) sample draw= 0  1 13 19 gap= 6  8  1 12 rank=443
sig=(474=19, 7) sample draw= 0  1 13 20 gap= 7  7  1 12 rank=444
sig=(526=21, 7) sample draw= 0  1 13 21 gap= 8  6  1 12 rank=445
sig=(551=22, 6) sample draw= 0  1 13 22 gap= 9  5  1 12 rank=446
sig=(576=23, 5) sample draw= 0  1 13 23 gap=10  4  1 12 rank=447
sig=(662=26,13) sample draw= 0  1 13 24 gap=11  3  1 12 rank=448
sig=(114= 5,11) sample draw= 0  1  5 16 gap= 1  4 11 11 rank=449
sig=(264=11, 5) sample draw= 0  2  5 16 gap= 2  3 11 11 rank=450
sig=(270=11,11) sample draw= 0  2 13 24 gap= 3  2 11 11 rank=451
sig=(301=12,16) sample draw= 0  1 12 23 gap= 4  1 11 11 rank=452
sig=(139= 6,10) sample draw= 0  1  6 16 gap= 1  5 10 11 rank=453
sig=(244=10,11) sample draw= 0  2  6 16 gap= 2  4 10 11 rank=454
sig=(265=11, 6) sample draw= 0  3  6 16 gap= 3  3 10 11 rank=455
sig=(365=15, 2) sample draw= 0  2 12 23 gap= 4  2 10 11 rank=456
sig=(390=16, 1) sample draw= 0  1 11 22 gap= 5  1 10 11 rank=457
sig=(164= 7, 9) sample draw= 0  1  7 16 gap= 1  6  9 11 rank=458
sig=(218= 9,11) sample draw= 0  2  7 16 gap= 2  5  9 11 rank=459
sig=(266=11, 7) sample draw= 0  3  7 16 gap= 3  4  9 11 rank=460
sig=(407=16,18) sample draw= 0  3 12 23 gap= 4  3  9 11 rank=461
sig=(391=16, 2) sample draw= 0  2 11 22 gap= 5  2  9 11 rank=462
sig=(406=16,17) sample draw= 0  1 10 21 gap= 6  1  9 11 rank=463
sig=(189= 8, 8) sample draw= 0  1  8 16 gap= 1  7  8 11 rank=464
sig=(192= 8,11) sample draw= 0  2  8 16 gap= 2  6  8 11 rank=465
sig=(267=11, 8) sample draw= 0  3  8 16 gap= 3  5  8 11 rank=466
sig=(408=16,19) sample draw= 0  4  8 16 gap= 4  4  8 11 rank=467
sig=(392=16, 3) sample draw= 0  3 11 22 gap= 5  3  8 11 rank=468
sig=(417=17, 2) sample draw= 0  2 10 21 gap= 6  2  8 11 rank=469
sig=(442=18, 1) sample draw= 0  1  9 20 gap= 7  1  8 11 rank=470
sig=(166= 7,11) sample draw= 0  1  9 16 gap= 1  8  7 11 rank=471
sig=(214= 9, 7) sample draw= 0  2  9 16 gap= 2  7  7 11 rank=472
sig=(268=11, 9) sample draw= 0  3  9 16 gap= 3  6  7 11 rank=473
sig=(409=16,20) sample draw= 0  4  9 16 gap= 4  5  7 11 rank=474
sig=(405=16,16) sample draw= 0  4 11 22 gap= 5  4  7 11 rank=475
sig=(418=17, 3) sample draw= 0  3 10 21 gap= 6  3  7 11 rank=476
sig=(457=18,16) sample draw= 0  2  9 20 gap= 7  2  7 11 rank=477
sig=(483=19,16) sample draw= 0  1  8 19 gap= 8  1  7 11 rank=478
sig=(140= 6,11) sample draw= 0  1 10 16 gap= 1  9  6 11 rank=479
sig=(239=10, 6) sample draw= 0  2 10 16 gap= 2  8  6 11 rank=480
sig=(269=11,10) sample draw= 0  3 10 16 gap= 3  7  6 11 rank=481
sig=(410=16,21) sample draw= 0  4 10 16 gap= 4  6  6 11 rank=482
sig=(411=16,22) sample draw= 0  5 10 16 gap= 5  5  6 11 rank=483
sig=(431=17,16) sample draw= 0  4 10 21 gap= 6  4  6 11 rank=484
sig=(461=18,20) sample draw= 0  3  9 20 gap= 7  3  6 11 rank=485
sig=(469=19, 2) sample draw= 0  2  8 19 gap= 8  2  6 11 rank=486
sig=(494=20, 1) sample draw= 0  1  7 18 gap= 9  1  6 11 rank=487
sig=(441=17,26) sample draw= 0  1 11 16 gap= 1 10  5 11 rank=488
sig=(466=18,25) sample draw= 0  2 11 16 gap= 2  9  5 11 rank=489
sig=(491=19,24) sample draw= 0  3 11 16 gap= 3  8  5 11 rank=490
sig=(516=20,23) sample draw= 0  4 11 16 gap= 4  7  5 11 rank=491
sig=(541=21,22) sample draw= 0  5 11 16 gap= 5  6  5 11 rank=492
sig=(436=17,21) sample draw= 0  5 10 21 gap= 6  5  5 11 rank=493
sig=(509=20,16) sample draw= 0  4  9 20 gap= 7  4  5 11 rank=494
sig=(486=19,19) sample draw= 0  3  8 19 gap= 8  3  5 11 rank=495
sig=(511=20,18) sample draw= 0  2  7 18 gap= 9  2  5 11 rank=496
sig=(536=21,17) sample draw= 0  1  6 17 gap=10  1  5 11 rank=497
sig=(364=15, 1) sample draw= 0  1 12 16 gap= 1 11  4 11 rank=498
sig=(412=16,23) sample draw= 0  2 12 16 gap= 2 10  4 11 rank=499
sig=(465=18,24) sample draw= 0  3 12 16 gap= 3  9  4 11 rank=500
sig=(490=19,23) sample draw= 0  4 12 16 gap= 4  8  4 11 rank=501
sig=(561=22,16) sample draw= 0  4 15 20 gap= 5  7  4 11 rank=502
sig=(529=21,10) sample draw= 0  4 15 21 gap= 6  6  4 11 rank=503
sig=(554=22, 9) sample draw= 0  4 15 22 gap= 7  5  4 11 rank=504
sig=(579=23, 8) sample draw= 0  4  8 19 gap= 8  4  4 11 rank=505
sig=(586=23,15) sample draw= 0  3  7 18 gap= 9  3  4 11 rank=506
sig=(596=23,25) sample draw= 0  2  6 17 gap=10  2  4 11 rank=507
sig=(327=13,16) sample draw= 0  2 13 16 gap= 2 11  3 11 rank=508
sig=(353=14,16) sample draw= 0  3 13 16 gap= 3 10  3 11 rank=509
sig=(413=16,24) sample draw= 0  3 14 18 gap= 4  9  3 11 rank=510
sig=(489=19,22) sample draw= 0  3 14 19 gap= 5  8  3 11 rank=511
sig=(532=21,13) sample draw= 0  3 14 20 gap= 6  7  3 11 rank=512
sig=(539=21,20) sample draw= 0  3 14 21 gap= 7  6  3 11 rank=513
sig=(553=22, 8) sample draw= 0  3 14 22 gap= 8  5  3 11 rank=514
sig=(611=24,14) sample draw= 0  3 14 23 gap= 9  4  3 11 rank=515
sig=(614=24,17) sample draw= 0  3  6 17 gap=10  3  3 11 rank=516
sig=(339=14, 2) sample draw= 0  2 13 17 gap= 4 10  2 11 rank=517
sig=(414=16,25) sample draw= 0  2 13 18 gap= 5  9  2 11 rank=518
sig=(533=21,14) sample draw= 0  2 13 19 gap= 6  8  2 11 rank=519
sig=(636=25,13) sample draw= 0  2 13 20 gap= 7  7  2 11 rank=520
sig=(644=25,21) sample draw= 0  2 13 21 gap= 8  6  2 11 rank=521
sig=(645=25,22) sample draw= 0  2 13 22 gap= 9  5  2 11 rank=522
sig=(646=25,23) sample draw= 0  2 13 23 gap=10  4  2 11 rank=523
sig=(415=16,26) sample draw= 0  1 12 17 gap= 5 10  1 11 rank=524
sig=(534=21,15) sample draw= 0  1 12 18 gap= 6  9  1 11 rank=525
sig=(661=26,12) sample draw= 0  1 12 19 gap= 7  8  1 11 rank=526
sig=(501=20, 8) sample draw= 0  1 12 20 gap= 8  7  1 11 rank=527
sig=(670=26,21) sample draw= 0  1 12 21 gap= 9  6  1 11 rank=528
sig=(671=26,22) sample draw= 0  1 12 22 gap=10  5  1 11 rank=529
sig=(165= 7,10) sample draw= 0  1  7 17 gap= 1  6 10 10 rank=530
sig=(240=10, 7) sample draw= 0  2  7 17 gap= 2  5 10 10 rank=531
sig=(243=10,10) sample draw= 0  3  7 17 gap= 3  4 10 10 rank=532
sig=(432=17,17) sample draw= 0  3 13 23 gap= 4  3 10 10 rank=533
sig=(435=17,20) sample draw= 0  2 12 22 gap= 5  2 10 10 rank=534
sig=(510=20,17) sample draw= 0  1 11 21 gap= 6  1 10 10 rank=535
sig=(190= 8, 9) sample draw= 0  1  8 17 gap= 1  7  9 10 rank=536
sig=(217= 9,10) sample draw= 0  2  8 17 gap= 2  6  9 10 rank=537
sig=(241=10, 8) sample draw= 0  3  8 17 gap= 3  5  9 10 rank=538
sig=(433=17,18) sample draw= 0  4  8 17 gap= 4  4  9 10 rank=539
sig=(460=18,19) sample draw= 0  3 12 22 gap= 5  3  9 10 rank=540
sig=(484=19,17) sample draw= 0  2 11 21 gap= 6  2  9 10 rank=541
sig=(416=17, 1) sample draw= 0  1 10 20 gap= 7  1  9 10 rank=542
sig=(191= 8,10) sample draw= 0  1  9 17 gap= 1  8  8 10 rank=543
sig=(215= 9, 8) sample draw= 0  2  9 17 gap= 2  7  8 10 rank=544
sig=(242=10, 9) sample draw= 0  3  9 17 gap= 3  6  8 10 rank=545
sig=(434=17,19) sample draw= 0  4  9 17 gap= 4  5  8 10 rank=546
sig=(458=18,17) sample draw= 0  4 12 22 gap= 5  4  8 10 rank=547
sig=(485=19,18) sample draw= 0  3 11 21 gap= 6  3  8 10 rank=548
sig=(492=19,25) sample draw= 0  2 10 20 gap= 7  2  8 10 rank=549
sig=(493=19,26) sample draw= 0  1  9 19 gap= 8  1  8 10 rank=550
sig=(467=18,26) sample draw= 0  1 10 17 gap= 1  9  7 10 rank=551
sig=(633=25,10) sample draw= 0  2 10 17 gap= 2  8  7 10 rank=552
sig=(517=20,24) sample draw= 0  3 10 17 gap= 3  7  7 10 rank=553
sig=(542=21,23) sample draw= 0  4 10 17 gap= 4  6  7 10 rank=554
sig=(555=22,10) sample draw= 0  5 10 17 gap= 5  5  7 10 rank=555
sig=(582=23,11) sample draw= 0  4 11 21 gap= 6  4  7 10 rank=556
sig=(607=24,10) sample draw= 0  3 10 20 gap= 7  3  7 10 rank=557
sig=(518=20,25) sample draw= 0  2  9 19 gap= 8  2  7 10 rank=558
sig=(519=20,26) sample draw= 0  1  8 18 gap= 9  1  7 10 rank=559
sig=(535=21,16) sample draw= 0  1 11 17 gap= 1 10  6 10 rank=560
sig=(634=25,11) sample draw= 0  2 11 17 gap= 2  9  6 10 rank=561
sig=(608=24,11) sample draw= 0  3 11 17 gap= 3  8  6 10 rank=562
sig=(171= 7,16) sample draw= 0  4 11 17 gap= 4  7  6 10 rank=563
sig=(531=21,12) sample draw= 0  5 11 17 gap= 5  6  6 10 rank=564
sig=(556=22,11) sample draw= 0  5 11 21 gap= 6  5  6 10 rank=565
sig=(581=23,10) sample draw= 0  4 10 20 gap= 7  4  6 10 rank=566
sig=(543=21,24) sample draw= 0  3  9 19 gap= 8  3  6 10 rank=567
sig=(544=21,25) sample draw= 0  2  8 18 gap= 9  2  6 10 rank=568
sig=(437=17,22) sample draw= 0  2 12 17 gap= 2 10  5 10 rank=569
sig=(560=22,15) sample draw= 0  3 12 17 gap= 3  9  5 10 rank=570
sig=(564=22,19) sample draw= 0  4 12 17 gap= 4  8  5 10 rank=571
sig=(557=22,12) sample draw= 0  5 12 17 gap= 5  7  5 10 rank=572
sig=(540=21,21) sample draw= 0  5 15 21 gap= 6  6  5 10 rank=573
sig=(565=22,20) sample draw= 0  5 10 20 gap= 7  5  5 10 rank=574
sig=(568=22,23) sample draw= 0  4  9 19 gap= 8  4  5 10 rank=575
sig=(569=22,24) sample draw= 0  3  8 18 gap= 9  3  5 10 rank=576
sig=(438=17,23) sample draw= 0  3 13 17 gap= 3 10  4 10 rank=577
sig=(464=18,23) sample draw= 0  4 13 17 gap= 4  9  4 10 rank=578
sig=(558=22,13) sample draw= 0  4 14 19 gap= 5  8  4 10 rank=579
sig=(585=23,14) sample draw= 0  4 14 20 gap= 6  7  4 10 rank=580
sig=(592=23,21) sample draw= 0  4 14 21 gap= 7  6  4 10 rank=581
sig=(593=23,22) sample draw= 0  4 14 22 gap= 8  5  4 10 rank=582
sig=(594=23,23) sample draw= 0  4  8 18 gap= 9  4  4 10 rank=583
sig=(439=17,24) sample draw= 0  3 13 18 gap= 5  9  3 10 rank=584
sig=(610=24,13) sample draw= 0  3 13 19 gap= 6  8  3 10 rank=585
sig=(617=24,20) sample draw= 0  3 13 20 gap= 7  7  3 10 rank=586
sig=(618=24,21) sample draw= 0  3 13 21 gap= 8  6  3 10 rank=587
sig=(619=24,22) sample draw= 0  3 13 22 gap= 9  5  3 10 rank=588
sig=(440=17,25) sample draw= 0  2 12 18 gap= 6  9  2 10 rank=589
sig=(635=25,12) sample draw= 0  2 12 19 gap= 7  8  2 10 rank=590
sig=(643=25,20) sample draw= 0  2 12 20 gap= 8  7  2 10 rank=591
sig=( 44= 2,19) sample draw= 0  2 12 21 gap= 9  6  2 10 rank=592
sig=(660=26,11) sample draw= 0  1 11 18 gap= 7  9  1 10 rank=593
sig=(668=26,19) sample draw= 0  1 11 19 gap= 8  8  1 10 rank=594
sig=(669=26,20) sample draw= 0  1 11 20 gap= 9  7  1 10 rank=595
sig=(216= 9, 9) sample draw= 0  1  9 18 gap= 1  8  9  9 rank=596
sig=(459=18,18) sample draw= 0  2  9 18 gap= 2  7  9  9 rank=597
sig=(606=24, 9) sample draw= 0  3  9 18 gap= 3  6  9  9 rank=598
sig=(463=18,22) sample draw= 0  4  9 18 gap= 4  5  9  9 rank=599
sig=(584=23,13) sample draw= 0  4 13 22 gap= 5  4  9  9 rank=600
sig=(609=24,12) sample draw= 0  3 12 21 gap= 6  3  9  9 rank=601
sig=( 43= 2,18) sample draw= 0  2 11 20 gap= 7  2  9  9 rank=602
sig=(659=26,10) sample draw= 0  1 10 19 gap= 8  1  9  9 rank=603
sig=(667=26,18) sample draw= 0  1 10 18 gap= 1  9  8  9 rank=604
sig=(641=25,18) sample draw= 0  2 10 18 gap= 2  8  8  9 rank=605
sig=(615=24,18) sample draw= 0  3 10 18 gap= 3  7  8  9 rank=606
sig=( 83= 4, 6) sample draw= 0  4 10 18 gap= 4  6  8  9 rank=607
sig=(567=22,22) sample draw= 0  5 10 18 gap= 5  5  8  9 rank=608
sig=(583=23,12) sample draw= 0  4 12 21 gap= 6  4  8  9 rank=609
sig=( 68= 3,17) sample draw= 0  3 11 20 gap= 7  3  8  9 rank=610
sig=(642=25,19) sample draw= 0  2 10 19 gap= 8  2  8  9 rank=611
sig=( 34= 2, 9) sample draw= 0  2 11 18 gap= 2  9  7  9 rank=612
sig=( 59= 3, 8) sample draw= 0  3 11 18 gap= 3  8  7  9 rank=613
sig=(279=11,20) sample draw= 0  4 11 18 gap= 4  7  7  9 rank=614
sig=(109= 5, 6) sample draw= 0  5 11 18 gap= 5  6  7  9 rank=615
sig=(566=22,21) sample draw= 0  5 12 21 gap= 6  5  7  9 rank=616
sig=(591=23,20) sample draw= 0  4 11 20 gap= 7  4  7  9 rank=617
sig=(616=24,19) sample draw= 0  3 10 19 gap= 8  3  7  9 rank=618
sig=( 60= 3, 9) sample draw= 0  3 12 18 gap= 3  9  6  9 rank=619
sig=(196= 8,15) sample draw= 0  4 12 18 gap= 4  8  6  9 rank=620
sig=(170= 7,15) sample draw= 0  5 12 18 gap= 5  7  6  9 rank=621
sig=(135= 6, 6) sample draw= 0  6 12 18 gap= 6  6  6  9 rank=622
sig=(145= 6,16) sample draw= 0  5 11 20 gap= 7  5  6  9 rank=623
sig=(590=23,19) sample draw= 0  4 10 19 gap= 8  4  6  9 rank=624
sig=(559=22,14) sample draw= 0  4 13 18 gap= 4  9  5  9 rank=625
sig=(112= 5, 9) sample draw= 0  5 13 18 gap= 5  8  5  9 rank=626
sig=(505=20,12) sample draw= 0  5 14 20 gap= 6  7  5  9 rank=627
sig=(134= 6, 5) sample draw= 0  5 14 21 gap= 7  6  5  9 rank=628
sig=(108= 5, 5) sample draw= 0  5 10 19 gap= 8  5  5  9 rank=629
sig=(479=19,12) sample draw= 0  4 13 19 gap= 6  8  4  9 rank=630
sig=(159= 7, 4) sample draw= 0  4 13 20 gap= 7  7  4  9 rank=631
sig=( 94= 4,17) sample draw= 0  4 13 21 gap= 8  6  4  9 rank=632
sig=(283=11,24) sample draw= 0  3 12 19 gap= 7  8  3  9 rank=633
sig=(158= 7, 3) sample draw= 0  3 12 20 gap= 8  7  3  9 rank=634
sig=( 42= 2,17) sample draw= 0  2 11 19 gap= 8  8  2  9 rank=635
sig=(197= 8,16) sample draw= 0  3 11 19 gap= 3  8  8  8 rank=636
sig=(393=16, 4) sample draw= 0  4 11 19 gap= 4  7  8  8 rank=637
sig=(394=16, 5) sample draw= 0  5 11 19 gap= 5  6  8  8 rank=638
sig=(281=11,22) sample draw= 0  5 13 21 gap= 6  5  8  8 rank=639
sig=(282=11,23) sample draw= 0  4 12 20 gap= 7  4  8  8 rank=640
sig=( 85= 4, 8) sample draw= 0  4 12 19 gap= 4  8  7  8 rank=641
sig=(515=20,22) sample draw= 0  5 12 19 gap= 5  7  7  8 rank=642
sig=(144= 6,15) sample draw= 0  6 12 19 gap= 6  6  7  8 rank=643
sig=(110= 5, 7) sample draw= 0  5 12 20 gap= 7  5  7  8 rank=644
sig=(194= 8,13) sample draw= 0  5 13 19 gap= 5  8  6  8 rank=645
sig=(538=21,19) sample draw= 0  6 13 19 gap= 6  7  6  8 rank=646
sig=(383=15,20) sample draw= 0  6 12 20 gap= 7  6  6  8 rank=647
sig=(307=12,22) sample draw= 0  5 13 20 gap= 7  7  5  8 rank=648
sig=(507=20,14) sample draw= 0  6 13 20 gap= 6  7  7  7 rank=649
650 gaps printed
n_sigs=650, n_gps=650, tot_gps=650
1939.75some comments on the program and output for 27,4HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Mon May 08 1995 14:0531
I modified the program as above, to order the gaps as Yoder did, namely
with highest number on right, and highest first.

Although we didn't get a perfect main diagonal, notice how 612 out of 650
signatures were instantly fillable ("singles") by just taking the first
available signature.  However, I think the record is just as good if we
order the gaps other ways.

In the "sig=" column, let me exaplain with an example.  Consider draw

	0 1 3 4

(That's the third entry shown in the output) The assistant would announce

	4 3 0

Since 3-4+27, 0-3+27 is 26, 24 the signature is 26, 24.  Then this is converted
to internal form as (26-1)*26+(24-1) to get the internal form 673.


We still haven't thought of anything resembling a closed form.  In other
words, some clever rule sounding something like:

	"If the cards the assistant is handed are spread by gaps a,b,c,d,
	then assistant should announce <insert easily explainable f(a,b,c,d)
	here!>"

Any ideas ?

/Eric