Research Article

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

Algorithm 2

Functions used for the FP-tree’s backbone construction.
1: Function
   Input: a sorted set of queries (clients) ;
   Output: a basic FP-tree ;
2:  create a empty FP-tree and the root of ;
3:  set into a query table ;
4:  let .first()
5:  let a temporary pointer ;
6:   for each requested data in do;
7:    ;
8:  end;
9:  update ;
10:  while contains any unhandled required data do
11:    the query with the maximum number of unhandled data items in ;
12:   for each unhandled requested data in do;
13:     find the other queries which also needs data and then choose one of the handled data nodes whose slot is maximum in
14:    ;
15:   end;
16:   update ;
17:  end;
18:  return;
19: end;
20: Function
   Input: an FP-tree , the parent node , and a new data item ;
   Output: an added node ;
21:  create a new node with data item
22:  if has children then
23:   create an empty node ;
24:   .addChild();
25:   let a temporary pointer ;
26:   while.isOverload(.slot+1) do
27:    create an empty node ;
28:    .addChild();
29:    ;
30:   end;
31:   .addChild();
32:  else
33:   .addChild();
34  end;
35:  return;
36: end;