comp.lang.ada
 help / color / mirror / Atom feed
* HELP anyone got this basic solution
@ 1997-04-02  0:00 Reid
  1997-04-02  0:00 ` Michael F Brenner
  0 siblings, 1 reply; 3+ messages in thread
From: Reid @ 1997-04-02  0:00 UTC (permalink / raw)



To whom it may concern,

I need a solution to a basic ada problem..

Does anyone have any suggestions on writing a routine

in ada to sort a poker hand into

simple groupings ie pairs, flush, royal flushes etc

I know it is a simple problem but I Unfortunately  do not have an 
established ada background so I need some help

any suggestions welcome

thankyou

Tim <reid@world.net> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: HELP anyone got this basic solution
  1997-04-02  0:00 HELP anyone got this basic solution Reid
@ 1997-04-02  0:00 ` Michael F Brenner
  1997-04-02  0:00   ` Richard Toy
  0 siblings, 1 reply; 3+ messages in thread
From: Michael F Brenner @ 1997-04-02  0:00 UTC (permalink / raw)



     > Does anyone have any suggestions on writing a routine
     > in ada to sort a poker hand into
     > simple groupings ie pairs, flush, royal flushes etc

Yes. Here is a suggestion. Since Intro to Ada is adequately covered in
a myriad of textbooks, and sorting is adequately covered in, for example,
Knuth, The Art of Computer Programming, Volume 3, Addison Wesley, it can
be presumed that your question is how to recognize the hands in a unique
way. In particular, you are asking for a recognition scheme applicable to
other circumstances, above and beyond what might be taught in an intro
to programming class. For the intro to programming class you would just
make a data representation for the cards and use some procedures, IF 
statements, and LOOP statements to hack a game. However, you probably have
an application you cannot disclose, for an unnamed agency, for example,
recognition of intelligence signals at the listening post or the creation
of more effiecient scheduling algorithms for moving the train cars between
trains in the train yards. Actually, the solution given here also applies
to certain robot scheduling problems, the false coin problem, categorical
shape recognition, consonental metathesis (interchange) in linguistic
evolution according to the Grimm theory, and cache estimates for the 
intermediate results of sort runs in computers with insufficient RAM to
do a full population bucketed hash code algorithm. My suggestion is this.
Present each simple grouping as an algebraic word in a group whose
alphabet you can take to be the 13 numerical indices (including the royal
cards) in three dimensional ordered pairs with the 4 suits together 
with (union) the 22 trumps as the second dimension, and the enumeration
of the groupings as the third dimension, with the relationships represented by 
a certain number of interchanges (<a,b,c><d,e,f>=<d,e,f><a,b,c>), 
knots (<a,b,c><d,e,f><a,b,c>=<d,e,f><a,b,c><d,e,f>) representing the coding
of the simple groupings. The each of the groupings is just a conjugacy
class! That means by using the Baumslag theorem you can not only identify
these conjugacy classes in the general pattern recognition case, but you
can also avoid those kinds of groupings which would lead to the co-NP
conjugate minimal normalization blowup, which is intractible. That way,
your code could double as a poker game, an intelligence data handling system,
a vizualization tool, and a resolver of a number of knotty (pardon the pun)
braid-like scheduling problems. Assistance in doing this can be gotten
from various 1990s group theory texts, and from the Magnus archive at
City University of New York which has placed a lot of stuff like this
on line on the net. 

There are a couple of things to watch out for: in the general case, you will
need as many triply linked lists as you have relationships in the presentation,
and you will need to handle internal scheduling of the Cayley graph
collapses using still further data structures, however, this can be done 
with available public domain group-theoretic software available from two
universities, or you can download the Ada version from the net of the
word problem solver. The hard part is to generate test cases that cover
all possible knots. To do this, I recommend a Tietze tranformation generator 
(TTG). Use the TTG in two ways: first, to generate random Tietze 
transformations, and second, to test specifically constructed examples based
on published common groups, counterexamples, and one example for each knot.
Finally, if you have enough computer power, you can use the TTG to generate
a test case for every possible word up to a given length, identifying its
conjugacy class, and tabulating the results graphically. Doing this in
various groups usually results in a better understanding of the structure
of the group. But the first step is to recognize that there is such a group
of which your simple groupings are just the conjugacy classes, and then
take off from there. 





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: HELP anyone got this basic solution
  1997-04-02  0:00 ` Michael F Brenner
@ 1997-04-02  0:00   ` Richard Toy
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Toy @ 1997-04-02  0:00 UTC (permalink / raw)



Michael F Brenner wrote:
> 
>      > Does anyone have any suggestions on writing a routine
>      > in ada to sort a poker hand into
>      > simple groupings ie pairs, flush, royal flushes etc
> 
> Yes. Here is a suggestion. Since Intro to Ada is adequately covered in

Big SNIP !!

Things are obviously quite at "The MITRE Corporation, Bedford Mass"  !!




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-04-02  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-02  0:00 HELP anyone got this basic solution Reid
1997-04-02  0:00 ` Michael F Brenner
1997-04-02  0:00   ` Richard Toy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox