[QUIZ] Word Loop (#149)

> Looks like mississippi is ambiguous, what about

I don't see how this works with 90 degree turns in a clockwise
direction, as mentioned earlier in this thread.

I get 5 possible solutions for Mississippi. Some solutions could be
considered redundant though.

Is the task rather to find possible loops (5 solutions) or letters at
possible intersections (3 solutions)?

thomas.

Quoth Shot (Piotr Szotkowski):

*Counter*-clockwise? Ah, right, you must be on the other hemisphere…

-- SCNR, Shot

My bad :D.

···

--
Konrad Meyer <konrad@tylerc.org> http://konrad.sobertillnoon.com/

They're not. They're not even necessarily context-free anymore (although
in this case it still is --- since the backreference can only ever match
something of finite length, we can enumerate all possibilities as
seperate rules in a CFG).

--Ken

···

On Mon, 10 Dec 2007 19:50:09 -0500, Michal Suchanek wrote:

On 11/12/2007, Joe <qbproger@gmail.com> wrote:

/(.*?)(.)(.(?:..)+?)\2(.*)/i

break it up:
(.*?) looks for a non-greedy string of anything (.) any character
(.(?:..)+?) non-greedy matching of an odd number of characters. I'm
not sure what the ?: adds to the regular expression. I got this: "(?: )
     grouping without backreferences" from here:
Ruby | zenspider.com | by ryan davis

Yes, makes sense. This group would not be used in the match result.

\2 matches the any character from before

I wonder if these are still regular epxpressions with those
backreferences.

--
Ken (Chanoch) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/

Ah, I see it now. Sorry. The letters didn't line up for me correctly in the previous message.

You are right, that works too.

James Edward Gray II

···

On Dec 8, 2007, at 11:10 AM, Eugene Kalenkovich wrote:

"James Gray" <james@grayproductions.net> wrote in message
news:853F208B-1F25-4509-BCB5-0A6C18DBCA33@grayproductions.net...

On Dec 7, 2007, at 11:40 PM, Eugene Kalenkovich wrote:

Hmm..
Looks like mississippi is ambiguous, what about

I
P
I
MISS
SI

?

I don't see how this works with 90 degree turns in a clockwise
direction, as mentioned earlier in this thread.

Of course, I'm never one to discourage experimentation.

James Edward Gray II

         I
         P
         >
         P
         >
         I
         >
M -> I -> S -> S
         > >
         S <- I

The task is to draw one of the possible loops.

James Edward Gray II

···

On Dec 8, 2007, at 12:15 PM, tho_mica_l wrote:

Looks like mississippi is ambiguous, what about

I don't see how this works with 90 degree turns in a clockwise
direction, as mentioned earlier in this thread.

I get 5 possible solutions for Mississippi. Some solutions could be
considered redundant though.

Is the task rather to find possible loops (5 solutions) or letters at
possible intersections (3 solutions)?

James Gray wrote:

···

On Dec 8, 2007, at 11:10 AM, Eugene Kalenkovich wrote:

"James Gray" <james@grayproductions.net> wrote in message
news:853F208B-1F25-4509-BCB5-0A6C18DBCA33@grayproductions.net...

On Dec 7, 2007, at 11:40 PM, Eugene Kalenkovich wrote:

Hmm..
Looks like mississippi is ambiguous, what about

I
P
I
MISS
SI

?

I don't see how this works with 90 degree turns in a clockwise
direction, as mentioned earlier in this thread.

Of course, I'm never one to discourage experimentation.

James Edward Gray II

         I
         P
         >
         P
         >
         I
         >
M -> I -> S -> S
         > >
         S <- I

Ah, I see it now. Sorry. The letters didn't line up for me correctly in the previous message.

You are right, that works too.

James Edward Gray II

When I read it clockwise I see M I S S I S I I P P I
Am I reading it wrong or is there a little mistake?

JP

It wasn't aligned perfectly for me. The | bar coming up from the S needed to move one space right to line up.

James Edward Gray II

···

On Dec 10, 2007, at 2:31 AM, Juraj Plavcan wrote:

James Gray wrote:

On Dec 8, 2007, at 11:10 AM, Eugene Kalenkovich wrote:

"James Gray" <james@grayproductions.net> wrote in message
news:853F208B-1F25-4509-BCB5-0A6C18DBCA33@grayproductions.net...

On Dec 7, 2007, at 11:40 PM, Eugene Kalenkovich wrote:

Hmm..
Looks like mississippi is ambiguous, what about

I
P
I
MISS
SI

?

I don't see how this works with 90 degree turns in a clockwise
direction, as mentioned earlier in this thread.

Of course, I'm never one to discourage experimentation.

James Edward Gray II

        I
        P
        >
        P
        >
        I
        >
M -> I -> S -> S
        > >
        S <- I

Ah, I see it now. Sorry. The letters didn't line up for me correctly in the previous message.

You are right, that works too.

James Edward Gray II

When I read it clockwise I see M I S S I S I I P P I
Am I reading it wrong or is there a little mistake?

Hard specs coming!

Loop of
-"Entitlements" should be:

me
Ent
lti
_s_

-"Arbeitsberichten" ('work reports' in German dative) should be:
____ch_
Arbeits
____reb
_____n_

-"Gesundheitsdienste" ('medical service' in German) should be:
_it_
Gesu
_hdn
__i_
_te_
_sn_

(I'm not quite sure about this one, since it could involve an infinite
loop with the 4 last letters)

Have fun!

PS: you can also use
"satisfactoriamente"
"indefinidamente"
for spanich specs.

···

On 10/12/2007, Juraj Plavcan <yamess@gmail.com> wrote:

James Gray wrote:
> On Dec 8, 2007, at 11:10 AM, Eugene Kalenkovich wrote:
>
>> "James Gray" <james@grayproductions.net> wrote in message
>> news:853F208B-1F25-4509-BCB5-0A6C18DBCA33@grayproductions.net...
>>> On Dec 7, 2007, at 11:40 PM, Eugene Kalenkovich wrote:
>>>
>>>>
>>>> Hmm..
>>>> Looks like mississippi is ambiguous, what about
>>>>
>>>> I
>>>> P
>>>> P
>>>> I
>>>> MISS
>>>> SI
>>>>
>>>> ?
>>>
>>> I don't see how this works with 90 degree turns in a clockwise
>>> direction, as mentioned earlier in this thread.
>>>
>>> Of course, I'm never one to discourage experimentation.
>>>
>>> James Edward Gray II
>>>
>>>
>>
>> I
>> P
>> >
>> P
>> >
>> I
>> >
>> M -> I -> S -> S
>> > >
>> S <- I
>
> Ah, I see it now. Sorry. The letters didn't line up for me correctly
> in the previous message.
>
> You are right, that works too.
>
> James Edward Gray II
>
>
When I read it clockwise I see M I S S I S I I P P I
Am I reading it wrong or is there a little mistake?

JP

I'm not sure what you mean by "should". My solution found six
solutions all of which have three overlaps. I don't know if there's a
reason to favor one over the others. Perhaps you could favor those
rectangles that have the fewest unused cells, in which case the third
below would be best.

ment
elti
..s.

emen
ltit
...s

men
est
lti

me.
ent
lti
.s.

ments
elti.

ents
m.i.
elt.

Eric

···

On Dec 10, 10:38 am, Eric DUMINIL <eric.dumi...@gmail.com> wrote:

Hard specs coming!

Loop of
-"Entitlements" should be:

me
Ent
lti
_s_

====

Are you interested in on-site Ruby training that's been highly
reviewed by former students? http://LearnRuby.com

Hi!

Sorry, I still hadn't seen your solution when I wrote those specs.
Impressive stuff!
I was just a bit disappointed by the fact that the quiz seemed to
propose only basic "u-turn words", and I wanted to find something
juicier.
I sure found it with your results!

To be sure we're talking about the same problem, I was taking into
account the fact a knot-word should still be readable if you know
that:

-the first letter is the only uppercase one in the knot
-the first direction is rightwards
-as long as you can go on reading in one direction, you should
-once you cannot go further, try to turn right
-if you can turn right, keep on reading!
-if you cannot turn either, the word is complete

I suppose that nobody could guess that
Chee
nir

actually is "chincherinchee".

Taking this readability into account, the only possible knot for
"Entitlements" is:

me
Ent
lti
_s_

Eric AsWell

···

On 10/12/2007, Eric I. <rubytraining@gmail.com> wrote:

On Dec 10, 10:38 am, Eric DUMINIL <eric.dumi...@gmail.com> wrote:
> Hard specs coming!
>
> Loop of
> -"Entitlements" should be:
>
> me
> Ent
> lti
> _s_

I'm not sure what you mean by "should". My solution found six
solutions all of which have three overlaps. I don't know if there's a
reason to favor one over the others. Perhaps you could favor those
rectangles that have the fewest unused cells, in which case the third
below would be best.

ment
elti
..s.

emen
ltit
...s

men
est
lti

me.
ent
lti
.s.

ments
elti.

ents
m.i.
elt.

Eric

====

Are you interested in on-site Ruby training that's been highly
reviewed by former students? http://LearnRuby.com