For every node v, nodePre)gue(v) = 1 For each edge e, weight(e

13 12 11 10 writes 1
Paper: DB 2
Paper: DB 3
Paper: DB 4
Paper: DB writes 9
Author: John 5
Assump?on: For every node v, nodePre?gue(v) = 1 For each edge e, weight(e) = 1.0 8
writes 7
6 Author: James Example • 
• 
• 
• 
• 
• 
• 
• 
Given: Q = {DB, John, James}, d_{max} = 8, \mu=0.5 Ini$aliza$on: S1={v1, v2, v3, v4}; S2= {v5}; S3={v6}; S = S1 union S2 union S3 = {v1,v2,v3,v4,v5,v6} Qin ={v1,v2,v3,v4,v5,v6}; Xin={}; Qout={}; Xout = {} For every u \in S: –  P_{v1} = … =P_{v6} = {} –  depth_{v1}= … = depth_{v6} = 0 For every u \in S, for every keyword ?, set sp_{v,?} –  sp_{v1,t1} = sp_{v1,t2}= sp_{v1,t3} = … = sp_{v6,t1} = sp_{v6,t2} = sp_{v6,t3} = null? ∞ (Should be null instead of ∞) For every u \in S, for every keyword ?, set dist_{v,?} –  dist_{v1,t1} = 0 dist_{v1,t2}= dist_{v1,t3} = ∞ –  dist_{v2,t1} = 0 dist_{v2,t2}= dist_{v2,t3} = ∞ –  dist_{v3,t1} = 0 dist_{v3,t2}= dist_{v3,t3} = ∞ –  dist_{v4,t1} = 0 dist_{v4,t2}= dist_{v4,t3} = ∞ –  dist_{v5,t1} = ∞, dist_{v5,t2}= 0, dist_{v5,t3} = ∞ –  dist_{v6,t1} = ∞, dist_{v6,t2}=∞, dist_{v6,t3} = 0 Ac?va?on (the algorithm did not men?on this, but this is very important) –  a_{u,i} = nodePre?gue(u)/|Si| if u \in Si; otherwise 0; (page 7) –  a_u = sum_{i} a_{u,i} (page 8) –  a_{v1} = 1/4 since a_{v1,t1} = 1/4, a_{v1,t2} = 0; a_{v1,t3} = 0 –  a_{v2} = 1/4 since a_{v2,t1} = 1/4, a_{v2,t2} = 0; a_{v2,t3} = 0 –  a_{v3} = 1/4 since a_{v3,t1} = 1/4, a_{v3,t2} = 0; a_{v3,t3} = 0 –  a_{v4} = 1/4 since a_{v4,t1} = 1/4, a_{v4,t2} = 0; a_{v4,t3} = 0 –  a_{v5} = 1 since a_{v5,t1} = 0, a_{v5,t2} = 1; a_{v5,t3} = 0 –  a_{v6} = 1 since a_{v6,t1} = 0, a_{v6,t2} = 0; a_{v6,t3} = 1 • 
Given: Q = {DB, John, James}, d_{max} = 8, \mu=0.5 • 
• 
• 
• 
• 
• 
• 
Now: Qin ={v1(a=1/4),v2(a=1/4),v3(a=1/4),v4(a=1/4), v5(a=1),v6(a=1)}; Qout={}; Case Qin has node with highest ac$va$on (Line 6) Either v5 or v6 is ok. We break ?e and randomly choose v5. Line 7: Pop v = v5, Qin ={v1,v2,v3,v4, v6}; Xin={v5}; Line 8: Check Is-­‐complete(v5), return false (because dist_{v5,t1} = ∞, dist_{v5,t2}= 0, dist_{v5,t3} = ∞) Line 9: depth_{v5} = 0 < d_{max} = 8, get incoming[v5]= {v9} , then execute lines 10-­‐14 Line 11: Execute EXPLOREEDGE(u=v9,v=v5), loop for each keyword ? –  Keyword t1: v9 does not have a bejer path to t1 via v5(detail: a func?on f check this), do nothing –  Keyword t2: •  Line 2-­‐3: v9 has a bejer path to t2 via v5 (detail: check this), sp_{v9,t2} = v5, dist_{v9,t2} = 1+dist_{v5,t2}=1, •  Line 4: Ajach(v9, t2): (1) since v9 does not exist in Qin, did not update v9’s priority; (2) since dist_{v9,t2} is updated, propagate this dist to all its reached-­‐ancestors {v4}, change dist_{v4,t2} = 1 +dist{v9,t2} = 1+1 = 2; •  Line 5: Is-­‐complete (v9) return false; •  Line 6-­‐7: v5 spreads ac?va?on to v9 from t2, a_{v9,t2} = \mu * a_{v5,2}/1 = 0.5*1.0 = 0.5 •  Line 9: Ac?vate(v9, t2): (1) since v9 does not exist in Qin, did not update its priority; (2) since a_
{v9,t2} is updated, propagate this ac?va?on to all its reached-­‐ancestors {v4}, i.e., a_{v4,t2} = \mu *a_{v9,t2} = 0.5*0.5 = 0.25 –  Keyword t3: v9 does not have a bejer path to t1 via v5(detail: check this), do nothing Line 12: add u (= v9) to Qin, Qin = {v1,v2,v3,v4, v6, v9(depth=1, a=0.5)} Line 14: add v (= v5) to Qout, Qout = {v5} • 
• 
• 
Given: Q = {DB, John, James}, d_{max} = 8, \mu=0.5 • 
• 
• 
• 
• 
• 
• 
Now: Qin ={v1(a=1/4),v2(a=1/4),v3(a=1/4),v4(a=1/4), v6(a=1), v9(depth=1,a=0.5)}; Qout={v5(a=1)}; Case Qin has node v6 (a=1) with highest ac$va$on (Line 6) Line 7: Pop v= v6, Qin ={v1,v2,v3,v4, v9}; Xin={v5, v6}; Line 8: Check Is-­‐complete(v6), return false; Line 9: Depth_{v6} = 0 < d_{max} = 8, execute lines 10-­‐14. Incoming[v6]= {v7,v8} , Line 11: Execute EXPLOREEDGE(u=v7,v=v6) , loop for each keyword ? –  Keyword 1: v7 does not have a bejer path to t1 via v6(detail: check this), do nothing –  Keyword 2: v7 does not have a bejer path to t2 via v6(detail: check this), do nothing –  Keyword 3: •  Line 2-­‐3: v7 has a bejer path to t3 via v6 (detail: check this), sp_{v7,t3} = v6, dist_{v7,t3} = 1, •  Line 4: Ajach(v7, t3): (1) since v7 does not exist in Qin, did not update its priority; (2) since dist_{v7,t3} is updated, propagate this dist to all its reached-­‐ancestors, which is an empty set. •  Line 5: Is-­‐complete (v7) return false; •  Line 6-­‐7: v6 spreads ac?va?on to v7 from t3, a_{v7,t3} = \mu*a_{v6,t3}/1 = 0.5*1.0 = 0.5 •  Line 8: Ac?vate(v7, t3): (1) since v7 does not exist in Qin, did not update its priority; since a_
{v7,t3} is updated, propagate this ac?va?on to all its reached-­‐ancestors, which is an empty set. •  Line 12: add u (= v7) to Qin, Qin = {v1,v2,v3,v4, v9(depth=1,a=0.5), v7(dep=1,a=0.5)} Line 14: add v (= v6) to Qout, Qout = {v5, v6} • 
• 
Line 11: Execute EXPLOREEDGE(u=v8,v=v6) with similar steps … Line 12: Qin = {v1,v2,v3,v4, v9(depth=1), v7(dep=1), v8(dep=1)}, Do not update Qout • 
Given: Q = {DB, John, James}, d_{max} = 8, \mu=0.5 • 
Now: Qin ={v1(a=1/4),v2(a=1/4),v3(a=1/4),v4(a=1/4), v9(depth=1,a=0.5), v7(dep=1,a=0.5),v8
(dep=1,a=0.5}; Qout={v5(a=1),v6(a=1)}; Case Qout has nodes v5(a=1), v6 (a=1) with highest ac$va$on (Line 15) Line 16-­‐17: pop u = v5, Qout ={v6}; Xout={v5}; Line 18: Check Is-­‐complete(v5), return false (because dist_{v5,t1} = ∞, dist_{v5,t2}= 0, dist_{v5,t3} = ∞) Line 19: depth_{v5} = 0 < d_{max} = 8, outgoing[v5] ={}, stop this loop. • 
• 
• 
• 
• 
• 
• 
• 
• 
Now: Qin ={v1(a=1/4),v2(a=1/4),v3(a=1/4),v4(a=1/4), v9(depth=1,a=0.5), v7(dep=1,a=0.5),v8
(dep=1,a=0.5}; Qout={v6(a=1)}; Case Qout has node v6 (a=1) with highest ac$va$on (Line 15) Line 16-­‐17: pop u = v6, Qout ={}; Xout={v5, v6}; Line 18: Check Is-­‐complete(v6), return false; Line 19: depth_{v6} = 0 < d_{max} = 8, outgoing[v6] ={}, , stop this loop. • 
Given: Q = {DB, John, James}, d_{max} = 8, \mu=0.5 • 
Now: Qin ={v1(a=1/4),v2(a=1/4),v3(a=1/4),v4(a=1/4), v9(depth=1,a=0.5), v7(dep=1,a=0.5),v8
(dep=1,a=0.5}; Qout={}; Case Qin has node v9 (a=0.5) with highest ac$va$on (Line 6) Line 7: Pop v=v9, Qin ={v1,v2,v3,v4, v7,v8}; Xin={v5, v6, v9}; Line 8: Check Is-­‐complete(v9), return false (dist_{v9,t1} = dist_{v9,t3} = ∞; dist_{v9,t2} = 1} Line 9: depth_{v9} = 1 < d_{max} = 8, Incoming[v9]= {v4} , execute lines 10-­‐14. Line 11: Execute EXPLOREEDGE(u=v4,v=v9), loop for each keyword ? –  Keyword t1: v4 does not have a bejer path to t1 via v9 (detail: check this since dist_{v9,t1}=∞), do nothing –  Keyword t2: •  Line 2-­‐3: v4 has a bejer path to t2 via v9 (detail: check this, since dist_{v9,t2} = 1), sp_{v4,t2} = v9, dist_{v4,t2} = 1+dist_{v9,t2} = 1+1=2, •  Line 4: Ajach(v4, t2): (1) since v4 exists in Qin, update its priority a(v4) (Shall this be distance instead of ac?va?on? ); (2) since dist_{v4,t2} is updated, propagate this dist to all its reached-­‐
ancestors = {}. •  Line 5: Is-­‐complete (v4) return false; (dist_{v4,t1}=0, dist_{v4,t2}=2, dist_{v4,t3}=∞) •  Line 6-­‐7: v9 spreads ac?va?on to v4 from t2, a_{v4,t2} = \mu*a_{v9,t2}/1 = 0.5*0.5 = 0.25 •  Line 8: Ac?vate(v4, t2): (1) since v4 exists in Qin, Update its priority a_{v4}=a_{v4,t1}+a_
{v4,t2}+a_{v4,t3}=0.25+0.25+0=0.5; (2) since a_{v4,t2} is updated, propagate this ac?va?on to all its reached-­‐ancestors = {}. –  Keyword t3: v4 does not have a bejer path to t3 via v9(detail: check this, dist_{v9,t3} = ∞), do nothing Line 12: u (= v4) is already in Qin, no need to update Qin: Qin = {v1,v2,v3,v4(1=0.5), v7(dep=1), v8(dep=1)} Line 14: add v (= v9) to Qout, Qout = {v9} • 
• 
• 
• 
• 
• 
• 
• 
Given: Q = {DB, John, James}, d_{max} = 8, \mu=0.5 • 
• 
• 
• 
• 
• 
Now: Qin ={v1(a=1/4),v2(a=1/4),v3(a=1/4),v4(a=0.5), v7(dep=1,a=0.5),v8(dep=1,a=0.5}; Qout={v9
(depth=1,a=0.5)}; Case Qin has nodes v4,v7,v8 with highest ac$va$on 0.5 (Line 6) Line 7: Pop v=v4, (break ?e) Qin ={v1,v2,v3, v7,v8}; Xin={v5, v6, v9, v4}; Line 8: Check Is-­‐complete(v4), return false (dist_{v4,t1} = 0; dist_{v4,t2} = 2; dist_{v4,t3} = ∞} Line 9: depth_{v4} = 0 < d_{max} = 8,iIncoming[v4]= {v10}, execute lines 10-­‐14., Line 11: Execute EXPLOREEDGE(u=v10,v=v4), loop for each keyword ?, omijed the detailed process • 
• 
Line 12: add u (= v10) o Qin: Qin = {v1,v2,v3,v4, v7(dep=1), v8(dep=1), v10} Line 14: add v (= v4) to Qout, Qout = {v9, v4} • 
• 
• 
• 
• 
• 
Now: Qin ={v1(a=1/4),v2(a=1/4),v3(a=1/4), v7(dep=1,a=0.5),v8(dep=1,a=0.5), v10}; Qout={v9,v4}; Case Qout has node v9, v4 with highest ac$va$on 0.5 (Line 15) Line 16-­‐17: pop u = v9, Qout ={v4}; Xout={v5, v6, v9}; Line 18: Check Is-­‐complete(v9), return false; Line 19: depth_{v9} = 1 < d_{max} = 8, outgoing[v9] ={v5} execute lines 20-­‐23. Line 21: Execute EXPLOREEDGE(u=v9,v=v5), loop for each keyword ?, omijed the detailed process –  Update dist_{v9,t1}, etc. Line 22: Since v5 is in Xout, no need to add it to Xout • 
• 
• 
• 
• 
• 
• 
• 
• 
• 
Now: Qin ={v1(a=1/4),v2(a=1/4),v3(a=1/4), v7(dep=1,a=0.5),v8(dep=1,a=0.5), v10}; Qout={v4}; Case Qout has node v4 with highest ac$va$on (Line 15) Line 16-­‐17: pop u = v4, Qout ={}; Xout={v5, v6, v9, v4}; Line 18: Check Is-­‐complete(v4), return false; Line 19: depth_{v4} = 0 < d_{max} = 8, outgoing[v4] ={v9,v8}, execute lines 20-­‐23. Line 21: Execute EXPLOREEDGE(u=v4,v=v9), loop for each keyword ?, –  No update Line 22: Since v=v9 is in Xout, No nee to add v9 to Qout Line 21: Execute EXPLOREEDGE(u=v4,v=v8), loop for each keyword ?, –  Update dist_{v4,t3} = 2, sp_{v4,t3} = v8 –  Line 5: Is_complete(v4) = true; EMIT (v4) Line 22: Since v=v8 is NOT in Xout, add v8 to Qout: Qout = {v8}