design a geonelogy with this heptatic structure...
you have to watch the video to know what's the question
\[\\\text{the rules for the challenge}\\\bullet\text{the number of words must be divisible by 7} \\\bullet\text{the number of letters must be divisible by 7} \\\bullet\text{the number of vowels and consonants must be divisible by 7 } \]
is this possible to compute
only this three,for interest sake
interesting, should be trivial to compute wid oly 3 constraints
are there any rules for words ? (must have one vowel, thats all eh ?)
yes but it seems the more constraints the more difficult the smaller the probability the less triviality
lets try to implement and see
okay ???
i am taking words from /usr/share/dict/words
|dw:1376468926474:dw|but this is very difficult cos we need to make 7 trees
|dw:1376469169915:dw|
now it meets the first constraint
number theory is a must i guess
a name can have multiple words i would assume. gimme some time, il get u the tree satisfying the 3 constraints picking words from dictionary
how long will your tree be,is it just one trees or 7 trees(generation)
yeah lets be specific, geneology trees are not binary i think. so... we can simply have 1 generation also ?
okay,lets take 1 probably the simplest sake
complex
this is too much,but the person gave the answer later wich is satisfying all the conditions http://www.biblegateway.com/passage/?search=Matthew+1&version=NIV
3 constraints turns out to be simple, more constraints it becomes extremely complex for sure. pfa one tree satisfying the 3 constraints
using above tree, we can generate multiple other trees that satisfy the given 3 constraints. would like to judge the complexity when we add all other constraints listed in the video... wil try it once i get some time... nice problem, thanks for sharing :)
its a pleasure,thank you for your time
what program is that and can you -if possible paste the code needed to run that program 'shell'
``` #!/tools/cfr/bin/perl my @dict_words = `cat /usr/share/dict/words`; chomp(@dict_words); #my @words = qw /jonaskk Aalborg Aandahl Aaqbiye Aaronic aaronic /; my @words = qw /ganeshh Aalborg Aandahl Aaqbiye Aaronic aaronic /; foreach my $word (@dict_words) { push(@words, $word) if (((length $word) == 7) && ($word !~ /[,-]/) && (&satisfies($word))); last if $#words == 6; } sub satisfies { my $test = shift; my $words = join "", @words; $words = $words . $test; my $vowels = $words; $vowels =~ s/[^aeiouAEIOU]//g; my $consonents = $words; $consonents =~ s/[\daeiouAEIOU]//g; my $length = length $words; my $length_vowels = length $vowels; my $length_consonents = length $consonents; if(($length_vowels % 7 == 0)&&($length_consonents %7 ==0)){ print "Letters ($length) : $words \n"; print "Vowels ($length_vowels) : $vowels \n"; print "Consonants ($length_consonents) : $consonents \n"; return 1; } return 0; } my $first = shift(@words); print "$first\n>>>>"; print join "\n>>>>", @words; print "\n"; ```
familiar wid perl ? thats just quick dirty code i had to write... u wud understand i hope... but if we want to add remaining constraints we have to write it bit organized..
Join our real-time social learning platform and learn together with your friends!