Talk About Network

Google





Programming > Assembly Language > Re: I pee in th...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 58 of 65 Topic 5073 of 5194
Post > Topic >>

Re: I pee in the open

by "Rod Pemberton" <do_not_have@[EMAIL PROTECTED] > Jul 21, 2008 at 04:18 AM

"Chuck Crayne" <ccrayne@[EMAIL PROTECTED]
> wrote in message
news:20080720192150.38d2fa30@[EMAIL PROTECTED]
> > How?  Try to generate 1...47,52,51,50,49,48 without an array from some
> > function.  Or, try to generate 1..47,52,51,50,49,48 with an input
> > array of 1...52 from some function.
>
> I'll demonstrate one possible algorithm for the three element string
> ABC, and leave the generalization as an exercise for the reader
>
> Pn Permutation
> 0 ABC
> 1 ACB
> 2 BAC
> 3 BCA
> 4 CAB
> 5 CBA
>
> Divide Pn by two, remembering both the dividend and the
> remainder. The first element in the desired permutation is obtained by
> using the dividend as an [base 0] index into the base string.
>
> Next, remove that element from the string. The second element in the
> desired permutation is obtained by using the remainder as an index
> into the remaining string.
>
> Finally, remove that element from the string. The third element in the
> desired permutation is the remaining string character.
>
> For example, consider the fourth permutation, for which Pn = 3. Three
> divided by two is one with one remaining. Thus the first element is
> ABC[1], the second element is AC[1], and the third element is A[0].
>
> The reverse function is almost as easy. Starting with BCA, B's index in
> the base string is 1, as is C's index after removing B. Thus Pn = 2*1
> +1.
>
> QED

QED for length 3!  But for length 4, some of the div indexes will exceed
the
string length...  (Um, maybe?...)

RP
 




 65 Posts in Topic:
I pee in the open
Evenbit <nbaker2328@[E  2008-07-09 16:53:06 
Re: popen
"Rod Pemberton"  2008-07-09 20:56:51 
Re: popen
Evenbit <nbaker2328@[E  2008-07-09 19:58:21 
Re: popen
"Rod Pemberton"  2008-07-11 02:52:12 
Re: popen
Frank Kotler <fbkotler  2008-07-13 00:30:59 
Re: popen
"Wolfgang Kern"  2008-07-13 12:26:35 
Re: I pee in the open
Frank Kotler <fbkotler  2008-07-10 02:28:37 
Re: popen
"Rod Pemberton"  2008-07-10 06:21:23 
Re: I pee in the open
dickey <dickey@[EMAIL   2008-07-10 12:28:50 
Re: I pee in the open
Evenbit <nbaker2328@[E  2008-07-10 22:40:17 
Re: popen
"Rod Pemberton"  2008-07-11 02:51:50 
Re: popen
"Wolfgang Kern"  2008-07-11 10:20:05 
Re: popen
Frank Kotler <fbkotler  2008-07-13 00:02:24 
Re: I pee in the open
Frank Kotler <fbkotler  2008-07-12 23:29:49 
Re: I pee in the open
Evenbit <nbaker2328@[E  2008-07-10 22:46:01 
Re: popen
Evenbit <nbaker2328@[E  2008-07-10 23:04:28 
Re: popen
"Rod Pemberton"  2008-07-11 02:52:30 
Re: I pee in the open
dickey <dickey@[EMAIL   2008-07-11 04:29:55 
Re: popen
Evenbit <nbaker2328@[E  2008-07-11 10:26:00 
Re: popen
"Rod Pemberton"  2008-07-12 04:30:09 
Re: I pee in the open
Evenbit <nbaker2328@[E  2008-07-11 11:07:14 
Re: popen
Evenbit <nbaker2328@[E  2008-07-11 22:50:36 
Re: popen
"Wolfgang Kern"  2008-07-12 10:12:07 
Re: popen
Evenbit <nbaker2328@[E  2008-07-11 23:40:34 
Re: popen
"Rod Pemberton"  2008-07-12 04:30:18 
Re: popen
Evenbit <nbaker2328@[E  2008-07-12 06:04:15 
Re: popen
"Rod Pemberton"  2008-07-12 12:17:53 
Re: I pee in the open
Robert Redelmeier <red  2008-07-12 14:38:08 
Re: popen
Evenbit <nbaker2328@[E  2008-07-12 17:23:12 
Re: I pee in the open
Evenbit <nbaker2328@[E  2008-07-12 17:50:34 
Re: I pee in the open
Robert Redelmeier <red  2008-07-13 15:28:01 
Re: I pee in the open
Evenbit <nbaker2328@[E  2008-07-12 23:18:34 
Re: I pee in the open
Robert Redelmeier <red  2008-07-13 15:43:23 
Re: I pee in the open
Herbert Kleebauer <kle  2008-07-13 10:55:11 
Re: I pee in the open
Frank Kotler <fbkotler  2008-07-13 11:13:18 
Re: I pee in the open
Herbert Kleebauer <kle  2008-07-13 23:14:26 
Re: I pee in the open
Frank Kotler <fbkotler  2008-07-14 16:58:07 
Re: I pee in the open
Herbert Kleebauer <kle  2008-07-15 03:26:44 
Re: I pee in the open
"Wolfgang Kern"  2008-07-15 11:14:58 
Re: I pee in the open
"rio" <a@[EM  2008-07-15 14:01:18 
Re: I pee in the open
Herbert Kleebauer <kle  2008-07-25 21:19:28 
Re: I pee in the open
Herbert Kleebauer <kle  2008-07-28 21:27:18 
Re: I pee in the open
Evenbit <nbaker2328@[E  2008-07-13 12:21:39 
Re: I pee in the open
Evenbit <nbaker2328@[E  2008-07-13 12:29:56 
Re: I pee in the open
Chuck Crayne <ccrayne@  2008-07-13 15:52:23 
Re: I pee in the open
"Rod Pemberton"  2008-07-14 03:57:23 
Re: I pee in the open
Chuck Crayne <ccrayne@  2008-07-14 13:52:24 
Re: I pee in the open
Chuck Crayne <ccrayne@  2008-07-14 14:18:56 
Re: I pee in the open
Evenbit <nbaker2328@[E  2008-07-15 15:59:33 
Re: I pee in the open
"Rod Pemberton"  2008-07-16 02:25:36 
Re: I pee in the open
Robert Redelmeier <red  2008-07-16 13:08:26 
Re: I pee in the open
Chuck Crayne <ccrayne@  2008-07-15 19:04:35 
Re: I pee in the open
Chuck Crayne <ccrayne@  2008-07-19 13:07:45 
Re: I pee in the open
"Rod Pemberton"  2008-07-19 18:50:56 
Re: I pee in the open
Chuck Crayne <ccrayne@  2008-07-19 20:00:51 
Re: I pee in the open
"Rod Pemberton"  2008-07-20 14:46:04 
Re: I pee in the open
Chuck Crayne <ccrayne@  2008-07-20 19:21:50 
Re: I pee in the open
"Rod Pemberton"  2008-07-21 04:18:17 
Re: I pee in the open
Chuck Crayne <ccrayne@  2008-07-20 21:06:28 
Re: I pee in the open
Robert Redelmeier <red  2008-07-22 23:18:19 
Re: I pee in the open
Chuck Crayne <ccrayne@  2008-07-21 13:19:49 
Re: I pee in the open
"Rod Pemberton"  2008-07-21 19:49:34 
Re: I pee in the open
"Rod Pemberton"  2008-07-22 17:53:28 
Re: I pee in the open
Chuck Crayne <ccrayne@  2008-07-21 20:53:52 
Re: I pee in the open
NathanCBaker@[EMAIL PROTE  2008-08-02 10:41:43 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 16:02:04 PST 2009.