From Graham Cooper@21:1/5 to All on Fri Feb 24 05:18:58 2023
niece(P K)
... sister( P S )
... son( S K )
it works on a small example
but it finds
SISTER TOM BARON .. 1st
then BACKTRACKS and tries again and finds
SISTER TOM MARY
and almost solves it
SON MARY MICKY
neice tom
neice - tom -
--------------------------
QUERY: neice tom
1*neice * happy ------- tom * P ------- *
2*neice * neice ------- tom * P ------- * K
Head-2 neice P K
P := tom
gotTail-sister P S
Tail-2 neice P K
P == tom
intail QUERY: sister tom S
1*sister * happy ------- tom * P ------- *
2*sister * neice ------- tom * P ------- * K
3*sister * friendoffriend ------- tom * A ------- * B
4*sister * pretty ------- tom * gaga ------- *
5*sister * rich ------- tom * gaga ------- *
6*sister * match6 ------- tom * ------- *
7*sister * sister ------- tom * tom ------- * baron
inans
ANSWER:7
1 t:sister q:sister
2 t:tom q:P
P :== tom
3 t:baron q:S
S :== baron
S == baron
intail QUERY: daughter baron K
1*daughter * happy ------- baron * P ------- *
2*daughter * neice ------- baron * P ------- * K
3*daughter * friendoffriend ------- baron * A ------- * B
4*daughter * pretty ------- baron * gaga ------- *
5*daughter * rich ------- baron * gaga ------- *
6*daughter * match6 ------- baron * ------- *
7*daughter * sister ------- baron * tom ------- * baron
8*daughter * sister ------- baron * tom ------- * mary
9*daughter * daughter ------- baron * mary ------- * micky
10*daughter * son ------- baron * mary ------- * tom
11*daughter * son ------- baron * mary ------- * will
P == tom
S == baron
intail QUERY: sister tom baron
9*sister * daughter ------- tom * mary ------- baron * micky
10*sister * son ------- tom * mary ------- baron * tom
11*sister * son ------- tom * mary ------- baron * will