Page 1 of 1

Problem 679

Posted: Wed Apr 01, 2020 5:36 am
by phileinSophos
I am having an issue with the problem 769 link : https://projecteuler.net/problem=679


The value for f(n) when n = 15, as suggested in the problem statement is 72863 but the total number of words that I am getting is 73313 after performing the suggested operations like generating a word of length 15 form given 4 letters, eliminating the duplicates and confirming that the given keywords occur only once in the given word.

Re: Problem 679

Posted: Wed Apr 01, 2020 9:13 am
by v6ph1
Have you checked overlapping occurances?
"arearea"

Re: Problem 679

Posted: Wed Apr 01, 2020 12:44 pm
by DJohn
I don't know what you mean by "eliminating the duplicates". What duplicates?

If I
  • List all 15-letter words
  • Count the number of occurrences of each keyword in each word, including overlapping occurrences as v6ph1 points out
  • Delete the words that don't have exactly one occurrence of each keyword
then I'm left with 72863 words. If that's the process you're following, and you get a different number, then you've got a bug in your code.