Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: Hamming Sequences and Lazy Lists

by Limbic~Region (Chancellor)
on Mar 17, 2005 at 16:55 UTC ( #440438=note: print w/replies, xml ) Need Help??

in reply to Re: Hamming Sequences and Lazy Lists
in thread Hamming Sequences and Lazy Lists

Roy Johnson,
I don't think this is right. It is my understanding that the results should be the multiples of the factors merged minus duplicates. If you change $iterations_to_print = 23 and @arr = (2,3,5), where is 15 in the results for instance? See Re: Hamming Sequences and Lazy Lists for my understanding and implementation of the problem.

Cheers - L~R

Replies are listed 'Best First'.
Re^3: Hamming Sequences and Lazy Lists
by Roy Johnson (Monsignor) on Mar 17, 2005 at 18:01 UTC
    I did not implement Hamming here; only merging of two list iterators. But I have just posted a lazy Hamming solution.

    Caution: Contents may have been coded under pressure.
      Roy Johnson,
      Ok - my mistake. In fact, I completely missed the boat on the entire problem. I was so focused on lazy evaluation that I misunderstood "how do you generate the series of numbers composed of a given list of prime factors, where each can be used an unlimited number of times?" To me, that any positive multiple of any factor was valid.

      Cheers - L~R

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://440438]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2018-04-20 09:15 GMT
Find Nodes?
    Voting Booth?