Research Article

Frequent-Pattern-Based Broadcast Scheduling for Conflict Avoidance in Multichannel Data Dissemination Systems

Algorithm 3

Functions used for the construction of the FP-tree’s accelerating branch.
1: Function
   Input: an FP-tree and a sorted set of queries (clients)
   Output: a final FP-tree
2:  let a temporary pointer ;
3:  create a temporary list and a temporary node ;
4:  for each query in do
5:   for each requested data in do
6:    ;
7:    ;
8:    .add ;
9:    if.slot .slot then
10:     delete the path of in ;
11:     break;
12:    end
13:   end
14:   .clear();
15:  end
16:  return;
17: end
18: Function
   Input: an FP-tree , the parent node , and a new data item
   Output: an added node
19:  create a new node with data item ;
20:  if has children then
21:   if has a child with then
22:    return;
23:   else
24:    create an empty node ;
25:    .addChild();
26:    let a temporary pointer ;
27:    while.isOverload(.slot+1) do
28:     create an empty node ;
29:     .addChild();
30:     ;
31:    end
32:    create a new node with data item ;
33:    .addChild();
34:   end
35:  else
36:   create a new node with data item ;
37:   .addChild()
38:  end
39:  return;
40: end
41: Function
   Input: an FP-tree and a search node
   Output: a result node within the search range
42:  int the number of ’s ancestors which are empty;
43:  int.slot +1;
44:  int.slot ;
45:  fortodo
46:    if find a node that has the same data as does at level of then
47:     delete the path that contains and all the empty connected ancestors of ;
48:     return;
49:    end
50:  end
51:  return;
52: end