From: Maaartin on
On Apr 28, 12:57 am, "J.D." <degolyer...(a)yahoo.com> wrote:
> On Apr 27, 6:37 pm, Maaartin <grajc...(a)seznam.cz> wrote:
>
> > I think so. Neither in my output procedure nor in bury the position of
> > a card depends on the card itself (it always depends on another card),
> > so there;s no self-justifying card, right?
>
> Hmmm, let me see.

I think, you understood everything correctly, but I mixed two things
together in my posting.

1. The position of the last input letter is known (17), which is bad.
2. As a countermeasure, something like bury should be applied. Bury
moves some cards in a position depending on another card, which is
good.

So mg_shuffle1 suffers from the weakness you've found, but applying
bury afterwards helps.

> 1) find_shuffle results in the first instance being on the top of the
> deck,
> 2) bury moves that instance to the bottom of the deck,
> 3) results in the second instance at the top of the deck, and the
> first instance is no longer at a determinate position.
> Er, (3) should start out with "the second find_shuffle results in the
> second instance..."
>
> It seems like the find_shuffle + bury + find_shuffle step should
> result in an instance being in a determinate position (the top of the
> deck).

Right. And this is bad, the following deal moves it to position 17,
which is still bad (unless the output procedure get used). Final bury
is a remedy.

> Maybe I am misunderstanding your algorithm... (in which case
> please correct me before I spend a lot of time doing something wrong
> by hand)

You've got it right, just have a look at the output I provided.

> Are these the versions you guys want tested? Is there something else
> you want tested? Also, do you have suggestions for messages to test
> the functions with?

In my previous post, I wrote that mg_shuffle1 places the last input
letter on a fixed position, which may be a weakness, unless handled
properly. In case your test can find it out, insert some
postprocessing, I'd suggest three buries, they don't take much time.
From: J.D. on
On Apr 27, 7:10 pm, Maaartin <grajc...(a)seznam.cz> wrote:
> On Apr 28, 12:57 am, "J.D." <degolyer...(a)yahoo.com> wrote:
>
> > On Apr 27, 6:37 pm, Maaartin <grajc...(a)seznam.cz> wrote:
>
> > > I think so. Neither in my output procedure nor in bury the position of
> > > a card depends on the card itself (it always depends on another card),
> > > so there;s no self-justifying card, right?
>
> > Hmmm, let me see.
>
> I think, you understood everything correctly, but I mixed two things
> together in my posting.
>
> 1. The position of the last input letter is known (17), which is bad.
> 2. As a countermeasure, something like bury should be applied. Bury
> moves some cards in a position depending on another card, which is
> good.
>
> So mg_shuffle1 suffers from the weakness you've found, but applying
> bury afterwards helps.
>
> > 1) find_shuffle results in the first instance being on the top of the
> > deck,
> > 2) bury moves that instance to the bottom of the deck,
> > 3) results in the second instance at the top of the deck, and the
> > first instance is no longer at a determinate position.
> > Er, (3) should start out with "the second find_shuffle results in the
> > second instance..."
>
> > It seems like the find_shuffle + bury + find_shuffle step should
> > result in an instance being in a determinate position (the top of the
> > deck).
>
> Right. And this is bad, the following deal moves it to position 17,
> which is still bad (unless the output procedure get used). Final bury
> is a remedy.
>
> > Maybe I am misunderstanding your algorithm... (in which case
> > please correct me before I spend a lot of time doing something wrong
> > by hand)
>
> You've got it right, just have a look at the output I provided.
>
> > Are these the versions you guys want tested?  Is there something else
> > you want tested?  Also, do you have suggestions for messages to test
> > the functions with?
>
> In my previous post, I wrote that mg_shuffle1 places the last input
> letter on a fixed position, which may be a weakness, unless handled
> properly. In case your test can find it out, insert some
> postprocessing, I'd suggest three buries, they don't take much time.

So that is three buries at the very end, just prior to outputting the
digest?

Also, am I right in understanding that your deal function is fixed
instead of being dependent on the input?
From: Maaartin on
On Apr 28, 1:31 am, "J.D." <degolyer...(a)yahoo.com> wrote:
> So that is three buries at the very end, just prior to outputting the
> digest?

Right.

Actually, I'd prefer to use my output procedure, but this is more
work. Moreover, it can be applied to all three algorithms, so let it
out for now.

> Also, am I right in understanding that your deal function is fixed
> instead of being dependent on the input?

Right. I want to make it as simple as possible, so it's fixed.
From: J.D. on
On Apr 27, 7:34 pm, Maaartin <grajc...(a)seznam.cz> wrote:
> On Apr 28, 1:31 am, "J.D." <degolyer...(a)yahoo.com> wrote:
>
> > So that is three buries at the very end, just prior to outputting the
> > digest?
>
> Right.
>
> Actually, I'd prefer to use my output procedure, but this is more
> work. Moreover, it can be applied to all three algorithms, so let it
> out for now.
>
> > Also, am I right in understanding that your deal function is fixed
> > instead of being dependent on the input?
>
> Right. I want to make it as simple as possible, so it's fixed.

OK, so let me write out in English my understanding of your
algorithm. And you can correct me if I make a mistake:

To absorb the nth letter from the message:
"Shuffle"
1) Find the first instance of that letter (are the instances the same
as in my algorithm above?);
2) Take all cards before that instance and move them to the end;
"Bury"
3) Interpret the instance (now at the top) as a number*, and put it
aside;
4) Count off N cards from the top (where N = number from step 3) and
put them at the end;
5) Put the set-aside instance at the end;
"Shuffle Again"
6) Find the next instance of the letter;
7) Take all cards above that instance and move them to the end;
"Deal"
8) er...the deal step is a little confusing...
"Output or next letter"
9) If the absorbed letter is NOT the last of the message then return
to the first step and absorb the next letter of the message;
otherwise, repeat "bury" process 3 times and output the result as the
digest.
From: Maaartin on
On Apr 28, 1:51 am, "J.D." <degolyer...(a)yahoo.com> wrote:
> OK, so let me write out in English my understanding of your
> algorithm. And you can correct me if I make a mistake:
>
> To absorb the nth letter from the message:
> "Shuffle"
> 1) Find the first instance of that letter (are the instances the same
> as in my algorithm above?);

It doesn't matter, but with the correspondence defined by card_view
they are.

> 2) Take all cards before that instance and move them to the end;

Right.

> "Bury"
> 3) Interpret the instance (now at the top) as a number*,
> and put it aside;
> 4) Count off N cards from the top (where N = number from step 3) and
> put them at the end;
> 5) Put the set-aside instance at the end;

Right. In case the program makes the interpretation in step 3
differently, I'll change it.

> "Shuffle Again"
> 6) Find the next instance of the letter;
> 7) Take all cards above that instance and move them to the end;

In my program, the step 6 is exactly the same as step 1, so it may be
the same instance. This may be a feature or a bug, let's formulate it
as
Do step 1 and step 2 again.

> "Deal"
> 8) er...the deal step is a little confusing...

It's very simple: Assume you hold all cards in your hand and there are
two initally empty decks on the table.
- Take 1 uppermost card from your hand, put it on the left deck.
- Take 2 uppermost cards from your hand, put them on the right deck.
- Repeat as long as you have cards in your hand (take less cards if
not enough present).
- Put the left deck on the right one, take all cards in your hand
again.

I'll check if this corresponds with the program exactly (but again,
minor differences are unimportant).

> "Output or next letter"
> 9) If the absorbed letter is NOT the last of the message then return
> to the first step and absorb the next letter of the message;
> otherwise, repeat "bury" process 3 times and output the result as the
> digest.

Right.
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Prev: Dynamic Hill cipher
Next: PE Scrambler