**3.3.1 Time complexity**

Our method applies to a tree structure. Users send their requests to one of the nodes and the request moves in the tree paths for the proper resource to be found. The consumed time includes the required time for computations and communications.

The computation time would be the time consumed in every node to compare the query bitmap with local bitmaps. So, we can calculate the number of nodes visited in resource discovery in our tree for computation time.

The latter would be the time lost between nodes to send a query. Here we can also calculate the number of links. The number of links and visited nodes in resource discovery would be in the same order in tree paths, so both times are supposed the same. One of these times would be larger depending on the network conditions and type of nodes. Because most nodes in the grid environment are of good computation power, but are located in distant intervals in various networks, in the following we assume the communication time through a link is larger than the computation time in a node.

In Our method like (Chang & Hu, 2010), the worst case in the resource discovery is the number of visited links from a leaf node upward to the root then downward to another leaf node. Therefore, the time complexity for our method will be O (logn m) in the worst case.
