Another assignment 2 problem.


R. Clayton (rclayton@monmouth.edu)
(no date)


I input the line "hello" ten times to solaris-oc and it went into an infinite
loop.

  Ah; my guess is that you didn't wait long enough. Any file of ten strings
  will take a long time:

    $ date ; ./gen-strings -c6 | ./solaris-oc > /dev/null ; date
    Mon Feb 23 15:04:54 EST 2004
    Mon Feb 23 15:04:55 EST 2004

    $ date ; ./gen-strings -c7 | ./solaris-oc > /dev/null ; date
    Mon Feb 23 15:05:00 EST 2004
    Mon Feb 23 15:05:02 EST 2004

    $ date ; ./gen-strings -c8 | ./solaris-oc > /dev/null ; date
    Mon Feb 23 15:05:09 EST 2004
    Mon Feb 23 15:05:21 EST 2004

    $ date ; ./gen-strings -c9 | ./solaris-oc > /dev/null ; date
    Mon Feb 23 15:05:27 EST 2004
    Mon Feb 23 15:07:47 EST 2004

    $ date ; ./gen-strings -c10 | ./solaris-oc > /dev/null ; date
    Mon Feb 23 15:10:59 EST 2004
    Mon Feb 23 15:31:17 EST 2004

  That's 20 minutes for an input with 10 strings.

It was the same case when I tested with another input file that had different
combinations of the character 'a' in each line. And this seems to be
consistent. Could it be an issue with the input stream?

  No, it's an issue with my algorithm, which is expensive for even small input
  sets. I was working on a better algorithm over the weekend, but it turns out
  my idea was bad and needed more work, which I haven't had time to do (your
  third programming assignment's coming up; not to mention your second test).



This archive was generated by hypermail 2.0b3 on Mon May 03 2004 - 17:00:06 EDT