[VicPiMakers Projects] Jims challenge in google sheets + a bit of javascript in google apps

George Bowden gtbowdeng at gmail.com
Tue Oct 20 11:30:27 EDT 2020


Hi Michelle
We are looking for the simplest deterministic rule to generate the output
from the input.

This is like those "what's the next number in the sequence" quizzes.  So
the following is a rule that can generate a conforming output:
"take the first number x, move right x times, print it 3 times, increment
x, move right x times, print it one fewer times, print "#repeats, list"
So there are multiple correct answers. But Greg's answer has the advantage
that it can be applied to any list of numbers, even  an empty list, and it
is built from relationships between numbers, not constants like mine.  He
just needs to print ", #repeats, list" at the end of his output.

It depends on whether one applies
<https://edenpapers.com/blog/inductive-and-deductive-reasoning-and-their-alternatives-essay/>


   - deductive,
   - inductive,
   - abductive,
   - reductive,
   - fallacious,
   - legal, or
   - Trump reasoning (just to kick the discussion off ).  Lives depend on
   it.


On Tue, Oct 20, 2020 at 7:24 AM Michelle Wiboltt <
michellewiboltt at outlook.com> wrote:

> Couldn’t it be interpreted in a myriad of ways and not just with the
> repeaters? I mean, in this scenario isn’t it deterministic as to total
> output? Where’s the choice? Why not every 2nd then every 5th repeater be
> counted or some such thing?
>
> Here’s what I’m thinking...I’m going to the mall (input) once at the mall
> the output determines that I will visit 5 departments in the mall (as
> illustrated in example above) but wait...I may visit 3 or 6 or 1 so, it’s
> determining an untrue/not necessarily accurate effect/causal relations,
> right?
>
> Does this make sense?
> m
>
> ------------------------------
> *From:* Projects <projects-bounces at vicpimakers.ca> on behalf of Greg H <
> greg.horie at gmail.com>
> *Sent:* Tuesday, October 20, 2020 5:52:08 AM
> *To:* Talk about Raspberry Pi / embeded projects <projects at vicpimakers.ca>
> *Subject:* Re: [VicPiMakers Projects] Jims challenge in google sheets + a
> bit of javascript in google apps
>
>
> > Test Input: 72,111,63,85,61,56,118,121,61,69,63,61
>
> > Output #5: 5,61,61,61,63,63, (#repeats, list)
>
> Here's how I interpret this. Given a list of integers, find all the values
> that repeat. Total the number of repeat values. This total is the first
> field in the output. Then sort the repeat values and join them as a
> comma-delimited list to the output.
>
> In the example we find that 61 repeats 3 times and 63 repeats 2 times. 3 +
> 2 = 5.
>
> Output Format:  <total>,<comma-delimited list of sorted repeats>
> Hence:  5,61,61,61,63,63
>
> Note - The last comma in the example output is distracting, so I removed
> it.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vicpimakers.ca/pipermail/projects_vicpimakers.ca/attachments/20201020/ed5e1cd1/attachment.htm>


More information about the Projects mailing list