male(dicky). male(randy). male(mike). male(don). male(elmer). female(anne). female(rosie). female(esther). female(mildred). female(greatgramma). male(blair). male(god). female(god). parent(don,randy). parent(don,mike). parent(don,anne). parent(rosie,randy). parent(rosie,mike). parent(rosie,anne). parent(elmer,don). parent(mildred,don). parent(esther,rosie). parent(esther,dicky). parent(greatgramma,esther). parent(randy,blair). male(mel). male(teo). parent(melsr,mel). parent(melsr,teo). american(anne). american(X) :- ancestor(X,anne). american(X) :- ancestor(anne,X). relation(X,Y) :- ancestor(A,X), ancestor(A,Y). father(X,Y) :- male(X),parent(X,Y). father(god, _) :- male(god). mother(X,Y) :- female(X),parent(X,Y). son(X,Y) :- male(X),parent(Y,X). daughter(X,Y) :- female(X),parent(Y,X). grandfather(X,Y) :- male(X),parent(X,Somebody),parent(Somebody,Y). aunt(X,Y) :- female(X),sister(X,Mom),mother(Mom,Y). aunt(X,Y) :- female(X),sister(X,Dad),father(Dad,Y). sister(X,Y) :- female(X),parent(Par,X),parent(Par,Y), X \= Y. uncle(X,Y) :- brother(X,Par),parent(Par,Y). cousin(X,Y) :- uncle(Unc , X),father(Unc,Y). ancestor(X,Y) :- parent(X,Y). ancestor(X,Y) :- parent(X,Somebody),ancestor(Somebody,Y). brother(X,Y) :- male(X),parent(Somebody,X),parent(Somebody,Y), X \= Y.
4. [201 Use Prolog (e.g., SWI-Prolog) to create a knowledge base for the family tree of...
C++ Create an application that searches a file of male and female first names. A link to the file is provided on the class webpage. "FirstNames2015.txt" is a list of the most popular baby names in the United States and was provided by the Social Security Administration. Each line in the file contains a boy's name and a girl's name. The file is space-delimited, meaning that the space character is used to separate the boy name from the girl name....