Jump to content

-factor notation


Recommended Posts

At least we should stop using the enter button so much (it is 2 bytes).

Only on Windows. Maybe BBO would consider switching to a Unix server, so that if anyone does wastefully use a newline the damage will be reduced by 50%?

The forums seem to be running on a linux server already.

 

Using a - to separate the length/no. of spots is obviously wasteful. For compactness, I propose using it for sequences instead, i.e. AKQJ2 can obviously be written more compactly as A-J2. Even better would be to assign new letters to certain honor combinations, e.g. replace any KQ with M (this combination is called "Marriage" in German) and you can write it just as well as AMJ2. Or even H2 (H for honors). I'm sure you can think of more, e.g. F ("Finesse") for AQ, etc.

Link to comment
Share on other sites

You only need 96 bits to write an entire deal, 2 extra for vulnerability and 2 extra for dealer. That's 12.5 bytes, so you still have 4 bits left (since we only use bytes anyway) to select which hands you want of that deal. Why waste so many bytes on writing a single hand? 13 bytes is enough to show full deals, 1 hand, any 2 hands, or even any 3 hands.

How does one write a deal in 96 bits? Surely you need 102 - I assume you're doing the sensible thing which is to specify, using 2 bits per card (giving the cards a predefined order), the hand in which the card appears. After the 51st card we know where the 52nd one belongs by process of elimination. But if we come down to 50 cards and two hands with 12 we can't place the remaining two - or in your case we have 48 cards but (unless the current distribution is 13 13 13 9) no idea which hand the remaining cards belong in.

 

We may rarely get some minor compression opportunities when one hand holds all the small clubs or whatever the last cards are :)

 

As for the OP - it might be better to specify the number of cards as people are used to reading/saying holdings like "ace-king fifth", etc. So AK5 should mean AKxxx, and zeroes can (of course) be omitted.

 

But you might confuse AK5 with the actual holding of the ace, king and five, I suppose - so what about AK-5. And then you notice that it's only worth doing that if you hold enough spotcards anyway, so you wouldn't write AK-3, but AKx. AK-4 or AKxx both use the same number of characters so it's a matter of choice, which is always nice to have (except when writing parsers for files/strings :))

 

ahydra

Link to comment
Share on other sites

Chthonic just emailed me, he says you guys are all wrong.

 

He would show this spade suit (AK952) like this...

 

1100010001001

 

A void would be

 

0000000000000

 

He says if humans have trouble reading 1100010001001 it is 1001db49269 in hexadecimal. He finally make a huge concession to me because of my stupidity, and told me that this could be written as 6281.

 

He said he stores all the information about hands in binary form and can't figure out why we donot. !3 bit math is childs play, he says. But he says we humans can dummy it down to 4 bit math

  • 0000 is no honor this is the SAME AS 0 in decimal he said.
  • 0001 is the JACK, he said this is 1 in decimal, and as a memory tool (he thinks we need many), jacks are usually worth 1 point
  • 0010 is the Queen, he said this is 2 in decimal, and asked me if I knew how many points the queen usually counts, I could swear I heard him laughing
  • 0011 is three, and shows the Q and the Jack. This happens to be three in decimal.2+1, 2+! he kept saying as if that made any sense to me
  • 0100 is the King. This is Four in declmal, and in Zar points, the king is worth "four points" he explained. Does that help you he asked?
  • 0101 is King plus Jack, and cool thing, this is 5, just as in Zar points!
  • 0110 is King plus queen, which works out to 6 to be six in decimal, and six in ZAR points.
  • 0111 is all the royal family: KQJ, and is 7 in decimal, as it is in ZAR points
  • 1000 is the ACE, this is 8 in decimal and is where Zar goes wrong.
  • 1001 is AJ, and 9 in decimal
  • 1010 is AQ, and is 10 in decimal
  • 1011 is AQJ and is 11 in decimal
  • 1100 is AK and is 12 in decimal
  • 1101 is AKJ and is 13 in decimal
  • 1110 is AKQ and is 14 in decimal
  • 1111 is AKQJ and is 15 in decimal

If we are willing to accept a second number for total number of non-honors, you get something like:

 

15-3 to show AKQJxxx

 

But he says, if you stick to binary, then wne a card is played, the math is easy, imagine you held 1111 and then you played teh King, what would you have left? Why 1011 of course. Why we humans insist on decimal math is one of many things he can't understand.

Link to comment
Share on other sites

Better would be to have one hex number for AKQJ - i.e. each suit either has the Ace or not, has the King or not, etc. So AKQJ would be represented as 'f', and none of the AKQJ would be represented as 0.

 

So, AKQTxxx Kxx - Qxx could be represented as

 

eT3

42

00

22

 

or as

 

e4

42

00

22

 

depending on whether or not you were interested in tens.

Link to comment
Share on other sites

One could, of course, commandeer the letters from "g" to (or, as they say in Barbarian, through) "v" as extensions to the hexadecimal notation and use base 32 instead. That way, s4 is AKQxxxx and t3 is AKQ10xxx.

 

A fifth theory is held by idiots, but it is doubtful if they know any more about the matter than the others. (Ambrose Bierce, The Devil's Dictionary)

Link to comment
Share on other sites

How does one write a deal in 96 bits?

There are only 53,644,737,765,488,792,839,237,440,000 different bridge deals. Log2 of 53,644,737,765,488,792,839,237,440,000 is about 95.5. Just assign a number to each bridge deal and take the binary expansion of this number.

Ouch :/ Would love to see pseudocode for encoding/decoding those!

 

ahydra

Link to comment
Share on other sites

How does one write a deal in 96 bits?

There are only 53,644,737,765,488,792,839,237,440,000 different bridge deals. Log2 of 53,644,737,765,488,792,839,237,440,000 is about 95.5. Just assign a number to each bridge deal and take the binary expansion of this number.

Ouch :/ Would love to see pseudocode for encoding/decoding those!

 

ahydra

Read this: http://bridge.thomasoandrews.com/impossible/

 

This is how you can easily create a deal generator. You just need a 96-bits randomizer (PRNG or TRNG) and you can generate every single deal... :)

Link to comment
Share on other sites

It is an entertaining thread, but it seems to me that the purpose of the proposal is to save time for, and add convenience to, the person writing the hand at the expense of that of the person reading and decyphering it, where the more admirable objective should be to minimise the mental effort decyphering the hand even if that should be at the expense of a small extra time and effort in writing it.

 

Take this example:

http://forums.bridgebase.com/index.php?sho...ndpost&p=493739

It takes extra effort to determine whether

AQJ94 is

(1) a 5 card suit containing the Ace, Queen, Jack, nine and four, with the four for whatever reason being considered a significant card,

contrasted with

(2) AQJ9xxxx

 

Now I appreciate that option (1) above (the 5 card suit, all cards being significant) would be written as AQJ940, which on this occasion (albeit admittedly perhaps not generally) takes an extra character to describe the suit. And maybe if the notation became standard and "second nature" then the decyphering overhead would diminish.

 

For as long as more than one notation is popular, it needs to be apparent which notation is being used on a given occasion. Explicitly expressing the notation would be tedious. Provided that you are giving the entire hand, it may be obvious from the context, with the hand described being consistent only with one notation in order to have 13 cards (although this does not allow for errors in presenting hands with other than 13 cards - a practice which is rife). But expressing a single suit as AQJ94 is ambiguous as to the notation adopted.

 

I suppose that AQJ9(4) has some merit as it minimises mental decoding effort and saving you the trouble of having to count the "x"s, which is of value both to the poster and to the reader. It may also reduce the instances of typos where extra "x"s are typed (or missed) resulting in a hand posted with other than 13 cards.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...