This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
codeq:prolog:naloge:sister_2 [2015/07/06 19:32] timmy |
codeq:prolog:naloge:sister_2 [2015/07/07 15:58] (current) timotej |
||
---|---|---|---|
Line 12: | Line 12: | ||
Povezave so podane s predikatom '' | Povezave so podane s predikatom '' | ||
- | < | + | |
- | parent(tina, | + | parent(thomas, |
- | parent(thomas, | + | parent(thomas, |
- | parent(thomas, | + | parent(thomas, |
- | parent(thomas, | + | parent(sally, |
- | parent(sally, | + | parent(sally, |
- | parent(sally, | + | parent(andrew, |
- | parent(andrew, | + | parent(jill, |
- | parent(jill, | + | parent(joanne, |
- | parent(joanne, | + | parent(william, |
- | parent(william, | + | parent(william, |
- | parent(william, | + | parent(vanessa, |
- | parent(vanessa, | + | parent(patrick, |
- | parent(patrick, | + | parent(patricia, |
- | parent(patricia, | + | parent(john, |
- | parent(john, | + | parent(john, |
- | parent(john, | + | |
+ | parent(frank, | ||
+ | parent(estelle, | ||
+ | parent(morty, | ||
+ | parent(helen, | ||
+ | parent(jerry, | ||
+ | parent(elaine, | ||
+ | parent(elaine, | ||
+ | parent(george, | ||
+ | | ||
+ | parent(margaret, | ||
+ | parent(margaret, | ||
+ | parent(ana, | ||
+ | parent(aleksandr, | ||
+ | parent(nevia, | ||
+ | parent(aleksander, | ||
+ | parent(nevia, | ||
+ | parent(aleksander, | ||
+ | | ||
- | parent(frank, | + | ====== Rešitev ====== |
- | parent(estelle, | + | |
- | parent(morty, | + | |
- | parent(helen, | + | |
- | parent(jerry, | + | |
- | parent(elaine, | + | |
- | parent(elaine, | + | |
- | parent(george, | + | |
- | parent(margaret,nevia). | + | sister(X, Y) :- |
- | parent(margaret,alessandro). | + | parent(Z, X), |
- | parent(ana,aleksander). | + | parent(Z, Y), |
- | parent(aleksandr,aleksander). | + | |
- | parent(nevia,luana). | + | X \== Y. |
- | parent(aleksander, | + | |
- | parent(nevia,daniela). | + | |
- | parent(aleksander, | + | |
- | + | ||
- | male(william). | + | |
- | male(thomas). | + | |
- | male(jeffrey). | + | |
- | male(andrew). | + | |
- | male(steve). | + | |
- | male(patrick). | + | |
- | male(john). | + | |
- | male(michael). | + | |
- | male(frank). | + | |
- | male(george). | + | |
- | male(morty). | + | |
- | male(jerry). | + | |
- | male(kramer). | + | |
- | male(aleksandr). | + | |
- | male(alessandro). | + | |
- | male(aleksander). | + | |
- | + | ||
- | female(tina). | + | |
- | female(sally). | + | |
- | female(melanie). | + | |
- | female(joanne). | + | |
- | female(jill). | + | |
- | female(vanessa). | + | |
- | female(patricia). | + | |
- | female(susan). | + | |
- | female(michelle). | + | |
- | female(estelle). | + | |
- | female(helen). | + | |
- | female(elaine). | + | |
- | female(anna). | + | |
- | female(margaret). | + | |
- | female(ana). | + | |
- | female(nevia). | + | |
- | female(luana). | + | |
- | female(daniela). | + | |
- | </ | + | |
====== Namigi ====== | ====== Namigi ====== | ||
- | ^ Testni primeri | + | ^ # ^ Namig ^ |
- | | nex(sister(vanessa, | + | | 1 | '' |
- | | nex(sister(vanessa, | + | | 2 | '' |
- | | nex(sister(andrew, | + | | 3 | '' |
+ | | 4 | '' | ||
{{: | {{: | ||
+ | |||
+ | ====== Testni primeri ====== | ||
+ | |||
+ | ex(sister(sally, | ||
+ | ex(sister(melanie, | ||
+ | ex(sister(luana, | ||
+ | ex(sister(daniela, | ||
+ | | ||
+ | ===== #1 ===== | ||
+ | |||
+ | nex(sister(vanessa, | ||
+ | nex(sister(elaine, | ||
+ | nex(sister(sally, | ||
+ | |||
+ | ===== #2 ===== | ||
+ | |||
+ | nex(sister(andrew, | ||
+ | nex(sister(patrick, | ||
+ | nex(sister(michael, | ||
+ | | ||
+ | ===== #3 ===== | ||
+ | |||
+ | nex(sister(vanessa, | ||
+ | nex(sister(sally, | ||
+ | nex(sister(daniela, |