# Extending Fagin s algorithm for more users based on multidimensional B-tree

Save this PDF as:

Size: px
Start display at page:

Download "Extending Fagin s algorithm for more users based on multidimensional B-tree"

## Transcription

1 Extending Fagin s algorithm for more users based on multidimensional B-tree Matúš Ondreička and Jaroslav Pokorný Charles University, Faculty of Mathematics and Physics, Prague Abstract. We discuss the issue of searching the best K objects in more attributes for more users. Every user prefers objects in different ways. User preferences are modelled locally with a fuzzy function and globally with an aggregation function. Also, we discuss the issue of searching the best K objects without accessing all objects. We deal with the use of local preferences when computing Fagin s algorithms. We created a new model of lists for Fagin s algorithms based on B + -trees. Furthermore, we use a multidimensional B-tree (MDB-tree)for searching the best K objects. We developed an MD-algorithm, which can effectively find the best K objects in a MDB-tree in accordance with user s preferences and without accessing all the objects. We show that MD-algorithm achieves better results in the number of accessed objects than Fagin s algorithms. 1 Introduction Nowadays, there exist big amounts of data in different databases describing real world objects. Following this data, users try to find objects which they need. Every object has its own properties given by a set of attributes. Based on values of these attributes, users then decide which of the objects is more or less suitable for them. Well-known examples cover internet shopping (cameras, mobile phones, etc.), even from various sources, choosing a hotel, flat, job, etc. Another example concerns multimedia repositories having multiple types of attributes, where unlike the relational model, user may want a set of objects with a grade of match [5]. We deal with finding the best K objects from the set of objects X, which have m attributes A 1,..., A m. Making it possible to find the best K objects from the set of objects X, it must be possible to judge which objects are better or worse for a user U. Every user prefers objects with own preferences, which are modelled locally by means of a fuzzy function and globally by means of an aggregation function [8]. The problem of searching the best K object according to values of different attributes in the same time is indicated as a top-k problem. In the paper we discuss the problem of finding the best K objects via Fagin s algorithms [3] without accessing all the objects. We deal with using local preferences when computing the algorithms, which assume that the set X is stored in m lists [3]. We describe a new model of the lists based on B + -trees [1], which

2 2 M. Ondreička and J. Pokorný supports the use of local preferences [2]. Moreover, it is possible to update these lists easily and quickly. The main contribution of the paper is use of a multidimensional B-tree (MDB-tree) [7] for searching the best K objects. It is not possible to use Fagin s algorithms directly in an MDB-tree. We developed an MD-algorithm for top-k problem, which can find the best K objects in MDB-tree effectively, in accordance to user s preferences without accessing all the objects. MDB-tree allows to index set of objects X by more attributes in one data structure. MDB-tree also makes updating quite easy. The use of B + -trees and MDB-tree allows to dynamise the environment while solving a top-k problem. Moreover, these tree structures are independent from user s preferences; i.e. they are common for all users. We will show advantages of MD-algorithm in time complexity in comparison to the rest of considered algorithms. A background concerning modelling user preferences is contained in Section 2. Section 3 is devoted to explaining principles of Fagin s algorithms. Sections 4 and 5 present use of B + -trees and MDB-trees, respectively, for approaching the top-k problem. In Section 6 we present the results of the tests and compare MDalgorithm with Fagin s algorithms. Finally, Section 7 provides some suggestions for a future work. 2 Model of user preferences When modelling user s preferences, we differentiate between local preferences and global preferences. When searching for the best K objects, a user U chooses user s preferences, which determine propriety of the object x X in dependence with its m values of attributes a x 1,..., a x m. In accordance to user U preferences, it is possible to find the best K object for this user. Local preferences reflect how the object is preferred according to only i-th attribute A i, i = 1,..., m. If attribute A i is of numeric type, then it is possible to apply a fuzzy function for this attribute. In this work, a fuzzy function is understood as a mapping f i : R i [0, 1], which maps the domain dom(a i ) R i into [0, 1] interval. Local preferences of user U for the attributes A 1,..., A m are represented by user s fuzzy functions denoted as f U 1 (x),..., f U m(x), respectively. In this case, a user s fuzzy function has a scheme f U i (x) : a x i [0, 1], where i = 1,..., m, which maps every object x X according to the value of its i-th attribute a x i into interval [0, 1]. For the worst object x X, fi U (x)=0 holds and for the best one, fi U (x)=1. Comparing f i U (x 1) and fi U (x 2) of two objects x 1 and x 2, it is possible to decide which of them is suitable for the user U according to the value of i-th attribute. When fi U (x 1) > fi U (x 2), then x 1 is more suitable. When fi U (x 1) = fi U (x 2), then x 1 and x 2 are equally suitable. We can understand the fuzzy function fi U as a new order of dom(a i ). Particular values of attributes a x i do not affect this. For descending order of objects X according to i-th attribute A i, only the course of fuzzy function fi U (x) is used.

3 Extending Fagin s algorithm for more users based on MDB-tree 3 Fig. 1. Ordering interpretation of fuzzy function. Figure 1 shows the arranging interpretation of user s fuzzy functions f1 U (x), f2 U (x), and f3 U (x). So f1 U (x) originates order of objects x 2, x 3, x 1, x 4, for f2 U (x) order of objects x 3, x 2, x 4, x 1, and for f3 U (x) order of objects x 3, x 4, x 2, x 1. Global preferences express how the user U prefers objects from X according to all attributes A 1,..., A m. On the set of objects X, we consider as aggregation with m variables p 1,..., p m specified 1,..., p m ) : [0, 1] m [0, 1]. For the user U with his user fuzzy functions f1 U,..., fm, U a user rating U originates by means of substitution of p i = fi U (x), i = 1,..., m. Then, for every x U (x) U (x),..., fm(x)). U U (x) it is possible to evaluate global rating of each object x X. Also U (x) = 1 stands for the best object U (x) = 0 for the worst one. U (x 1 ) U (x 2 ) of two objects x 1 and x 2 it is possible to judge which one is better for the user U. With aggregation function, a user U can define the mutual relations of the attributes. For example, we can use arithmetic U (x) = (p p m )/m. By choosing the right type of representation of aggregate function, it is possible to define attributes which are of interest for the user U, or which are not. For implementation of user s influence to the aggregate function, it is possible to use weighted average, where weights u 1,..., u m of single attributes A 1,..., A m determine how the user prefers single = u 1 p u m p m u u m. When the user does not care about i-th attribute A i when rating the objects, he can then put 0 into the aggregate function, i.e. u i = 0. In this work we used functions f U 1,..., f U m U to model user preferences. Every object x X has its own special global a measure of pertinence for the user U. In this way it is possible to find the best K objects for the user U. When there is more objects with the same rating as rating of the best K-th object, a random object is chosen. 3 Top-k problem The easiest solution of how to find the best K objects for the user U is the basic algorithm. For every object x X the values of all m attributes are read and

4 4 M. Ondreička and J. Pokorný the global U (x) is calculated. Then K objects with the highest U (x) are chosen. Basic algorithm must read all m values of attributes of all the objects from the set X; this means making X m accesses. During the search e.g. for the best K = 10 objects, it is not effective to search in hundred thousands of objects. 3.1 Fagin s algorithms In [3], Fagin et al. describe top-k algorithms, which solve top-k problem without searching in all objects. Fagin s algorithms can find the best K objects with regard to existing aggregate without making X m accesses. Fagin s algorithms assume that the objects from the set X are, together with values their m attributes A 1,..., A m, stored in m lists L 1,..., L m, where i-th list L i contain pairs (x, a x i ). Lists L 1,..., L m are sorted in descending order according to the values of attributes a x 1,..., a x m of objects x X. The aggregate must be monotone according to the ordering in lists. Then Fagin s algorithms find the best K objects correctly without searching all objects [3]. Function f with m variables is monotone according to all variables when i {1,..., m} : p i q i f(p 1,..., p m ) f(q 1,..., q m ) holds. Monotone function f can be, according to all variables, nonincreasing or nondecreasing. Lists L 1,..., L m are sorted in descending order according to the values of attributes of objects. For the right functionality of Fagin s algorithm it is needed to use this nondecreasing aggregate (e.g. arithmetic or weighted average). To the objects which are stored as (x, a x i ) in the lists, it is possible to access by two different methods. Direct access allows in the i-th list L i directly get the object x regardless of the position of the pair (x, a x i ) in the list L i. Sequential access allows the use of the objects in the list step by step from the top to the bottom by single pairs (x, a x i ). According to the way of accessing to the lists L 1,..., L m, two main algorithms TA (threshold algorithm) and NRA (no random access) are showed in [3]. Algorithm NRA uses the objects in the lists L 1,..., L m from the top to the bottom during the sequential accessing. It gets pairs (x, a x i ) in the decreasing order according to the values a x i. For these objects x X algorithm NRA does not know all the values of its attributes; therefore, it counts the worst rating W (x) and the best rating B(x) of the objects x. The monotonicity then implies W B(x). Then it is possible to guess the value of not yet seen objects from the lists L 1,..., L m and algorithm NRA can stop earlier than it comes to the end of all the lists. Algorithm TA needs to access the lists L 1,..., L m sequentially and also directly. With the sequential access, TA searches the lists L 1,..., L m from the top to the bottom and gets pairs (x, a x i ). For every object x obtained by a direct access to the other lists the algorithm gets the missing values of attributes of the

5 Extending Fagin s algorithm for more users based on MDB-tree 5 Fig. 2. Lists of two users with different preferences. object x. TA uses the list T K, in which it keeps the best actual K objects ordered according to their value. During the run of TA a threshold is counted, which is calculated by means of inserting the last seen attributes values a LAST 1,..., a LAST m in the lists L 1,..., L m, respectively, at the sequential access to the aggregate LAST 1,..., a LAST m ). When K-th object of the list T K has higher value than threshold, TA stops and returns the list T K as the best K objects. TA can finish before it comes to the end of all the lists. 3.2 Multi-user solution Original Fagin s algorithms offer the possibility of rating objects only globally with an aggregate find the best K object for the user U only according to his global preference. For the multi-user solution with support local preferences, it is necessary that every i-th list L i contains pairs (x, fi U (x)) in descending order by fi U (x) before the algorithm computation. However, every user U prefers objects x X locally with different fuzzy functions f1 U (x),..., fm(x). U For finding the best K objects for the user U, it would be needed to create descending ordered lists L 1,..., L m according to preferences f1 U,..., fm U always before the start of Fagin s algorithm. For a different user, different lists L 1,..., L m will be needed to be created again. For example, in Figure 2 three descending ordered lists L 1, L 2, L 3 of two users U 1 and U 2, who prefer objects with different fuzzy functions locally, are shown. User U 1 prefers objects x 1, x 2, x 3 with f U 1 1, f U 1 2, f U 1 3 and user U 2 with f U 2 1, f U 2 2, f U 2 3. Before the start of finding, it is necessary to get all the values of attributes of all objects x X and evaluate values f U 1 (x),..., f U m(x). In this case it is meaningless to use Fagin s algorithm, which is trying to find the best K objects without making X m accesses. 4 Fagin s lists based on B + -tree The problem of creating lists according to user s preferences before starting Fagin s algorithm is possible to solve by the use of B + -trees. In B + -tree [1], the

6 6 M. Ondreička and J. Pokorný objects from X are indexed according to the values of only one attribute. We use a variant of the B + -tree, whose leaf nodes are linked in two directions. Every leaf node of B + -tree contains pointer to its left and right neighbor. Let the objects of the set X be indexed in the B + -tree according to the values of attribute A. Every object x X is indexed by the key k dom(a), a value of which is equal to a value of attribute a x of object x, i.e. k = a x. For a key k, in general, more objects with the same A attribute value can exist in X. Therefore, we use the object array. In the object array, objects with the same value of the key k, are stored. For every the key k there is a pointer to this object array. 4.1 A list modelling with B + -tree Fagin s algorithm needs during its computation a sequential accessing the lists L 1,..., L m. From each i-th list L i it is needed sequentially to get objects x X in the descending order according to fi U (x), i.e. the pairs (x, f i U (x)). Therefore it is not necessary to get the whole list before starting the algorithm. Since the leaf nodes of the B + -tree are linked, it is possible to cross the B + - tree through the leaf level and to get all the keys. In this case, the B + -tree is traversed top to bottom only one time (starting at the root). With the pointers to the object arrays it is possible to get objects from X ordered according to the value of A attribute. When we cross the leaf level from left to the right, it is possible to get sequentially pairs (x, a x ) in ascending order according to a x and from the right to the left vice versa. When the user s fuzzy function f U is monotone on its domain, then for getting the pairs from the B + -tree using users preference f U the following holds: 1. Let the f U be nondecreasing. Thus a x a y f U (x) f U (y) holds for any two objects x, y X. Then by crossing the leaf level of the B + -tree from the right to the left it is possible to get the pairs (x, f U (x)) of the list L in the descending order according to the user s preference f U. 2. Let the f U be nonincreasing. Thus a x a y f U (x) f U (y) holds for any two objects x, y X. Then by crossing the leaf level of the B + -tree form the left to the right it is possible to get the pairs (x, f U (x)) of the list L in the ascending order according to the user s preference f U. During getting the object x from the B + -tree, we get the pair (x, a x ), then f U (x) is calculated and the pair(x, f U (x)) is formatted. These pairs of the list L are evaluated according to f U, and contain local user preference. For getting objects from the B + -tree we use the term way. A way is an oriented line segment, which follows crossing the leaf level of B + -tree during getting the objects. Every way w has its beginning w beg, end w end, and direction (to the left or to the right). Then, we get the objects, pairs (x, a x ), with attribute values w beg a x w end (w beg a x w end ) according to a direction of w. In general, f U is not monotone in its domain and for getting pairs of list L according to f U we can t use only one way. The domain of definition f U can be divided into continuous intervals I 1,..., I n, that f U is monotone on every of

7 Extending Fagin s algorithm for more users based on MDB-tree 7 Fig. 3. Creating ways according to progress of fuzzy function. these intervals. According to the intervals I 1,..., I n it is possible to create the ways w 1,..., w n, that every way w i has its begin and end border points of interval I i. The direction of the way w i is to the left, when f U is nondecreasing on the interval I i, or to the right, when it is f U nonincreasing there. Then ways w 1,..., w n specify how to cross the leaf level of the B + -tree during getting objects according to the users preference f U. For example, in Figure 3, the course of the fuzzy function originated five ways w 1,..., w 5. When there are more ways w 1,..., w n, for each way B + -tree is traversed top to bottom only one time and then crossed only through the leaf level. On every way ther can exist (first) object x X with different value f U (x) [0, 1]. Objects from the particular ways have to be obtained in overall descending order by f U (x) as pairs (x, f U (x)) of the list L. Consequently, during getting the pairs from the B + -tree along more various ways it is needed to access all the ways concurrently. For example, in Figure 3 we show a fuzzy function, serving to get objects according to ways w 1,..., w 5 from the B + -tree. We get objects x K, x M, x N, x G, x H, x F, x T, x S, x E, x C, x Q, x U, x R, x D, x Y. Next procedures describe getting pairs (x, f U (x)) from the B + -tree. Input: BplusTree B + -tree, FuzzyFunction f U ; begin activateways(b + -tree, f U ); while(exist at least one active way)do getratedobject(b + -tree, f U ); endwhile; end.

8 8 M. Ondreička and J. Pokorný procedure activateways(bplustree B + -tree, FuzzyFunction f U ); 1. According to the course of f U create ways w 1,..., w n, mark them as active; 2. According to all the ways w 1,..., w n, try to get objects x 1,..., x n in B + -tree. The ways which were not successful in this process are marked as inactive. 3. Recalculate f U (x j ) of each gained object x j (from active way w j ); end; procedure getratedobject(bplustree B + -tree, FuzzyFunction f U ); 1. When there is not active way, it is not possible to return any pair; 2. From active ways choose object x j with the highest value f U (x j ). Create the pair (x j, f U (x j )) and delete object x j from the way w j ; 3. When is possible, according to the way w j get next object x j in the B+ -tree and recalculate its f U (x j ). Otherwise, if next gained object has value of attribute after the wj end, mark w j as an inactive way; 4. Return the pair (x j, f U (x j )); end; 4.2 Application of the model in Fagin s algorithms We suppose that the objects from X have m values attributes. Then Fagin s algorithms need access sequentially to m lists L 1,..., L m during a computation. We use as the lists m of B + -trees B 1,..., B m. In B + -tree B i all objects are indexed by values of i-th attribute A i. It is needed to create m of B + -trees before the first run of TA or NRA. Afterwards this structure is common for all users. A particular user U only specifies his local preferences with fuzzy functions f1 U,..., fm U and global preferences with U. Then the algorithm sequentially gets pairs (x, fi U (x)) from B+ -trees B 1,..., B m according to peferences of user U, find best K object for user U. Then it is running again for each new user s preferences or for preferences of next user. Algorithm TA also uses the direct access to the lists L 1,..., L m, where for object x it is needed to get its unknown value a x i from L i. B + -trees are not able to operate this, because it is not possible to get directly the value. A realization of direct access can use, for example, an associative array. 5 Application of multidimensional B-tree This section concerns the use of MDB-tree [7] to the solving top-k problem for more users, because MDB-tree is composed of B + -trees, which we can use for obtaining pairs (x, f U i (x)) by user s local preferences f U 1,..., f U m. MDB-tree allows to index set of objects X by attributes A 1,..., A m, m > 1, in one data structure. In this case, MDB-tree has m levels and values of one attribute are stored in each level. We use a variant of MDB-tree, nodes of which are B + -trees. i-th level of MDB-tree is composed from B + -trees containing key values from dom(a i ). Analogically to B + -trees, we introduce the object array. In the object array, we store objects with the same values of all the m attributes

9 Extending Fagin s algorithm for more users based on MDB-tree 9 Fig. 4. Set of eleven objects with values of three attributes stored in MDB-tree. a 1,..., a m. We use the mark ρ(k) for the pointer of the key k in B + -tree. If k i is the key in B + -tree and this B + -tree is in m-th level of MDB-tree, then ρ(k i ) refers to object array, i.e. (i = m). If this B + -tree is in i-th level of MDB-tree and i < m, then ρ(k i ) refers to B + -tree in the next level of MDB-tree. For the explicit identification of B + -tree in MDB-tree we use the order of keys, which is called tree identifier in this paper. An identifier of B + -tree in i-th level is (k 1,..., k i 1 ). Tree identifier of B + -tree in the first level is ( ). For example, in Figure 4, (k 1, k 2 ) = (1.0, 0.0) is the identifier of B + -tree at the third level, which contains keys 0.0, 0.7 and refers to objects x F, x G, x H. 5.1 Search of MDB-tree Getting all objects from MDB-tree is possible with procedure searchmdbtree, which recursively searches MDB-tree in depth-first search. Input: MDBtree MDB-tree; Output: List T; var List T; {temporary list of objects} begin searchmdbtree(mdb-tree, ( )); return T; end. procedure searchmdbtree(mdbtree MDB-tree, Identifier (k 1,..., k i 1 )); while(there is another key in B + -tree)do In B + -tree of MDB-tree with identifier (k 1,..., k i 1 ) chose another key k i with highest value of A i in the B + -tree; if(ρ(k i ) refers to B + -tree)then searchmdbtree(mdb-tree, (k 1,..., k i 1, k i )); if(ρ(k i ) refers to object array)then Append objects from this array to the list T also with theirs attributes values k 1,..., k i 1, k i ; endwhile; end.

10 10 M. Ondreička and J. Pokorný Searching the whole MDB-tree it is possible to find the best K objects according to the aggregate For every new object x from the MDB-tree all its attribute values are known. Thus, it is possible to immediately. Like in TA, we can use the temporary list T K, in which the best actual K objects are stored in descending order according to their Rating of the K-th best object in T K we denote M K. For every new object obtained from MDB-tree the following will be done: var List TK; {temporary list of objects} procedure addratedobject(ratedobject x, int K); if( TK < K )then Insert object x to the list TK to the right place according else > M K )then begin Delete K-th object from the list TK; Insert object x to the list TK on the right place according end; end. This procedure obtains all objects of MDB-tree. On the other hand, Fagin s algorithms can find the best K objects without searching all the objects from X which provides a new motivation for development a more optimal solution of top-k problem based on MDB-tree. One of the very useful properties of NRA algorithm is using the best rating B(x) of objects. In MDB-tree we use the best rating B(S) of B + -tree S. Analogically to NRA algorithm we assume, that aggregate 1,..., p m ) is nondecreasing in all variable p 1,..., p m. Also we assume, that all values of attributes of objects are normalized into [0, 1] interval, i.e. dom(a j ) [0, 1], j = 1,..., m. Definition 1. By the best rating B(S) of B + -tree S with identifier (k 1,..., k i 1 ) in the i-th level of MDB-tree we understand a rating not yet known object x, calculated x 1,..., a x m), where the first i 1 attributes values of object x are k 1,..., k i 1 and values of other attributes are 1, i. e. B(S) 1,..., k i 1, 1,..., 1) For every B + -tree S in MDB-tree there is a uniquely defined subset of X, X S, which we call a set of available objects from S. Getting all objects from X S is possible with procedure searchmdbtree, which starts in S. Let S be the B + - tree of i-th level with identifier (k 1,..., k i 1 ). Then X S contains all the objects x X, for which the values of the first i 1 attributes a x 1,..., a x i 1 are equal to values of k 1,..., k i 1 from identifier of S. For example, in Figure 4, the X S of S with identifier (0.0) contains objects x A, x B, x C, x D. Statement 1. Let S be the B + -tree of MDB-tree. Then x X S B(S). Proof of Statement 1 is straightforward; it follows from the Definition 1.

11 Extending Fagin s algorithm for more users based on MDB-tree 11 During getting objects from MDB-tree the procedure searchmdbtree starts in B + -tree S in i-th level with identifier (k 1,..., k i 1 ). In S we get step by step keys k i dom(a i ), with which we can access other parts of MDB-tree, from where we get another objects. When the ρ(k i ) refers to S with identifier (k 1,..., k i 1, k i ), the procedure searchmdbtree should start there. By Statement 1, we would get objects x X S with B(S). When the list T K already contains K objects, it is possible to decide if it is desirable to continue with the new key to the other parts of MDB-tree. Statement 2. Let p be the key in B + -tree S with identifier (k 1,..., k i 1 ) chosen in a run of procedure searchmdbtree. The ρ(p) refers to B + -tree P with identifier (k 1,..., k i 1, p) in the next level of MDB-tree. Let M K be the rating of the K-th best object in T K. Then B(P ) M K x X P M K. Proof. When the ρ(p) refers to P, by Statement 1, x X P B(P ) holds. If list T K already contains K objects, the M K value is known. B(P ) M K implies x X P B(P ) M K. Consequence. When the ρ(p) refers to P with identifier (k 1,..., k i 1, p) and at the same time B(P ) M K holds, none of objects from X P is not going to have better evaluation than K-th object from T K. So it not meaningful to get objects from P, it is not necessary to start procedure searchmdbtree (in B + -tree P ). Notice 1. Let p be the key in B + -tree S chosen in a while cycle in run of procedure searchmdbtree. Let q be the key chosen in next its while cycle. Because the keys are gained from S in descending order, then p q holds. Notice 2. Let S be the B + -tree with identifier (k 1,..., k i 1 ) in i-th level of MDB-tree. p and q are the keys gained from S, the pointers ρ(p) and ρ(q) refer to B + -trees P and Q, respectively, in the next level of MDB-tree or to object arrays P and Q (S is in the last level of MDB-tree, i = m). Then p 1,..., k i 1, p, 1,..., 1,..., k i 1, q, 1,..., 1) B(P ) B(Q). Statement 3. Let the keys from the B + -tree S with the identifier (k 1,..., k i 1 ) be the keys obtained one by one by a run of procedure searchmdbtree. The pointer ρ(p) refers to B + -tree P in the next level or to the object array P. Let M K be the rating of the K-th best object in T K. If B(P ) M K holds, then the procedure searchmdbtree(mdb-tree, (k 1,..., k i 1 )) can stop in S. Proof. Since the keys are gained from S in descending order, by Notice 1, for each next key q gained q p holds. The pointers ρ(p) and ρ(q) refer to B + -trees P and Q, respectively, in the next level of MDB-tree or they refer to the object arrays P and Q. By Notice 2 B(P ) B(Q) holds. By Statement 2, for all of the objects x X Q we B(Q) B(P ) M K, and M K. For all next keys q p obtained from S it is not necessary to access B + -tree Q (or the object array Q) by the procedure searchmdbtree(mdb-tree, (k 1,..., k i 1, q)), because no such object x X Q can not get in T K. It means that it is not necessary to obtain another keys from B + -tree S.

12 12 M. Ondreička and J. Pokorný 5.2 MD-algorithm for top-k problem Using the previous statements results in an MD-algorithm, which is able to find in MDB-tree K best objects with respect to a monotone aggregate without getting all the objects. Input: MDBtree MDB-tree, int K; Output: List TK; var List TK; {temporary list of objects} begin findtopk(mdb-tree, ( K); return TK; end. procedure findtopk(mdbtree MDB-tree, Identifier (k 1,..., k i 1 ), int K); while(there is next key in B + -tree)do {with identifier (k 1,..., k i 1 )} k i = getnextkey(mdb-tree, (k 1,..., k i 1 )); {ρ(k i ) refers to B + -tree P or it refers to the object array P } if( TK = K and B(P ) M K )then return; if(p is B + -tree)then findtopk(mdb-tree, (k 1,..., k i 1, k i K); if( P is object array)then while(there is the next object x in P )do if( TK < K )then insert object x to TK to the right place according else > M K )then begin Delete K-th object from the list TK; Insert object x to the list TK on the right place according end; endwhile; endwhile; end. procedure getnextkey(mdbtree MDB-tree, Identifier (k 1,..., k i 1 )); In B + -tree of MDB-tree with identifier (k 1,..., k i 1 ) chose the next key k i with next highest value of A i in that B + -tree; return k i ; end. 5.3 Multi-user solution MD-algorithm does not solve the problem of the local use preferences. It finds the K best objects only with respect to a monotone aggregate function. According to use of the model of the user preferences, the values of attributes could be

13 Extending Fagin s algorithm for more users based on MDB-tree 13 rated locally according the users fuzzy functions f1 U,..., fm. U After that we can calculate the global rating of x by user aggregate U. We use the lists based on B + -tree for gaining the keys from B + -trees. It is possible to obtain the keys from B + -tree with the help of the fuzzy function f U in descending order. The A i values of objects x X are in MDB-tree stored (as keys) in B + -trees in i-th level of MDB-tree. This justifies why in each B + -tree of i-th level we use user fuzzy function fi U to obtain required pairs. Thus we obtain the pairs (k, fi U (k)) from each B+ -tree in i-th level of MDB-tree in descending order by fi U (k). During the calculation of global rating of x the procedure directly substitutes values of keys k i rated by fuzzy functions fi U (k i) into aggregate It results into a global user rating U (x) U (f1 U (k 1 ),..., fm(k U m )). Analogically, we calculate the best rating of B + -tree S of i-th level, B(S) U (k 1 ),..., fi 1 U (k i 1), 1,..., 1). It is possible to use application of the local user preferences directly in MDalgorithm by finding the K best objects in MDB-tree. The following procedure getnextkey changes the original MD-algorithm. procedure getnextkey(mdbtree MDB-tree, Identifier (k 1,..., k i 1 ), FuzzyFunction f U i ); In B + -tree of MDB-tree with identifier (k 1,..., k i 1 ) chose the next key k i with next highest value of i-th user fuzzy function f U i (k i) in that B + -tree.; return k i ; end. Fig. 5. Example of finding top three objects in MDB-tree.

14 14 M. Ondreička and J. Pokorný The next example, in Figure 5, illustrates how MD-algorithm finds for three best objects in MDB-tree, with respect to the preference of one concrete user U. The local preferences of user U express the objects according to three attributes as it is shown on left side in Figure 5. For the illustration, we assume that the user U for the determination of the attribute weights has used the aggregate 1, a 2, a 3 ) = a 1 + a 2 + a 3, i. e. rating of ideal object is 3. At the beginning procedure findtopk is starting in B + -tree at the first level. After the procedure stops the list T K contains three best objects for the user U, even in descending U (x R ) = U (x H ) = 2.4 U (x G ) = 2.3. For illustration, that MD-algorithm is able to find K best objects in MDBtree without visiting all objects in MDB-tree, the objects, which did not have received by MD-algorithm during its calculation, are highlighted in Figure 5. 6 Implementation and Experiments We have implemented top-k algorithms TA, NRA, and MD-algorithm using lists based on B + -trees [6]. The implementation has been developed in Java. The main research point has been to estimate the number of accesses into data structures during calculation of algorithms. The needed data structures have been created in memory (not on disk). Is was sufficient solution, because in memory it is possible to calculate easily the numbers of accesses by the simple modifications of the algorithms. Objects from X with their m attributes values are stored in these data structures. Obtaining one attribute value of one object we conceive as one access into data structures. For testing there have been used three sets of objects with 5 attributes values with normal, regular, and exponential distribution of attributes values. As user s local preferences we used fuzzy functions whose course was based on f(x) = x, as the aggregate function an arithmetic average has been used. In this paper, we use these simple user s preference, because every user can to prefer objects differently, and it is not posible to show there all dependences. Figure 6 shows resuts of tests for normal and regular distribution. Fig. 6. Distribution of the attributes values.

15 Extending Fagin s algorithm for more users based on MDB-tree 15 Fig. 7. The number of obtained objects and computation time of algorithms. The best of results have been achieved with MD-algorithm for the set of objects with the regular distribution of the attributes values. Searching for the best object needed approximately 10 times less accesses than algorithms TA and NRA. For algorithms TA and MD-algorithm it is possible to determine also the number of obtained objects from associated data structures. Figure 7 illustrates the results of this comparison. The most significant difference in the rate of the objects obtained by the algorithms TA and MD-algorithm has occurred for regular distribution of the attributes values. For choosing the best objects, MDalgorithm has needed more than 400 times less objects than the algorithm TA. Testing has shown that the NRA algorithm is slower. While TA algorithm and MD-algorithm with K = 1024 we achieved time less than 1s. The calculation of the algorithm has taken several minutes. This fact has been caused by often re-calculation of W (x) and B(x) rating of the objects. Figure 7 illustrates the times of rate for algorithms TA and MD. We can conclude with a hypothesis that MD-algorithm is more suitable in the case of regular distribution of the attributes values. Moreover, MD-algorithm achieves much better results than other tested algorithms for K best objects just if K is very little. Concerning other associated results, in [6] we discovered that MD-algorithm has the best results, when the objects stored in MDB-tree are distributed regularly. When attributes of objects have different size of their domains, it is better for MD-algorithm to build MDB-tree with smaller domains in its higher levels and atributes with bigger domains in its lower levels. Then MD-algorithm can to decide early, that it is not necessary to obtain next keys from some B + -tree in higher level of MDB-tree. In [6] we were testing Fagins s algoritms and MDalgoritm also for real data (flats for rent). Because this set of objects has more atributes with different size of domains, it was posible to build regular MDB-tree. MD-algorithm achieves also much better results than other tested algorithms for suitable user s preferences and small K (K < 30). We think, that MD-algorithm is more suitable as Fagins s algoritms just for real data. This results confirms the original idea of MDB-trees [7], which was developed for range queries and for minimalizaion number of accesses into data structures.

16 16 M. Ondreička and J. Pokorný 7 Conclusion We implemented top-k algorithms TA, NRA and MD-algorithm with support of user s preferences. Results of MD-algorithm have shown to be comparable with those obtained by Fagin s algorithms. An ideal solution of top-k problem would be to implement Fagin s algorithms with indexes based on B + -trees directly in a RDBMS or to implement MDalgorithm with an MDB-tree together. Because of a support of the local users preferences this solution would require to implement indexes with the help of B + -trees in the way to be able easily obtain pairs (x, fi U (x)) while computing Fagin s algorithms or MD-algorithm. In [4] the authors describle heuristics for Fagin s algorithms. Similarly, a motivation for future research could be to develop some heuristics for MD-algorithm, which improve performance parameters of MD-algorithm. For example, we it is possible to monitor a distribution of the key values in nodes for a selected set of objects stored in MDB-tree, etc. A combination of MD-algorithm with Fagin s algorithms might be also interesting. For example, in distributed systems we can find some best objects on two different servers by Fagin s algorithms and based on these results to find K best objects by MD-algorithm. 8 Acknowledgments This research has been partially supported by the National Program of Research, Information Society Project No. 1ET References 1. Bayer, R., McCreight, E.: Organization and Maintenance of Large Ordered Indices, Acta Informatica, Vol. 1, Fasc. 3, 1972 pp Eckhardt, A., Pokorný, J., Vojtáš, P.: A system recommending top-k objects for multiple users preference. In Proc. of 2007 IEEE International Conference on Fuzzy Systems, July 24-26, 2007, London, England, pp Fagin, R., Lotem, A., Naor, M.: Optimal aggregation algorithms for middleware. Journal of Computer and System Sciences 66 (2003), pp Gurský, P., Lencses, R., Vojtáš, P.: Algorithms for user dependent integration of ranked distributed information. Proceedings of TED Conference on e-government (TCGOV 2005), Pages , Chaudhuri, S., Gravano, L., Marian, M.: Optimizing Top-k Selection Queries over Multimedia Repositories. IEEE Trans. On Knowledge and Data Engineering, August 2004 (Vol. 16, No. 8) pp Ondreička, M.: Extending Fagin s algorithm for more users. Master s thesis, Charles University, Faculty of Mathematics and Physics, Prague, 2008, (in Slovak). 7. Scheuerman, P., Ouksel, M.: Multidimensional B-trees for associative searching in database systems. Information systems, Vol. 34, No. 2, Vojtáš, P.: Chapter 17 Fuzzy logic aggregation for semantic web search for the best (top-k) answer, Capturing Intelligence, Volume 1, 2006, Pages

### Symbol Tables. Introduction

Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The

### Chapter 13: Query Processing. Basic Steps in Query Processing

Chapter 13: Query Processing! Overview! Measures of Query Cost! Selection Operation! Sorting! Join Operation! Other Operations! Evaluation of Expressions 13.1 Basic Steps in Query Processing 1. Parsing

### Fast Sequential Summation Algorithms Using Augmented Data Structures

Fast Sequential Summation Algorithms Using Augmented Data Structures Vadim Stadnik vadim.stadnik@gmail.com Abstract This paper provides an introduction to the design of augmented data structures that offer

### A Review And Evaluations Of Shortest Path Algorithms

A Review And Evaluations Of Shortest Path Algorithms Kairanbay Magzhan, Hajar Mat Jani Abstract: Nowadays, in computer networks, the routing is based on the shortest path problem. This will help in minimizing

### 1 2-3 Trees: The Basics

CS10: Data Structures and Object-Oriented Design (Fall 2013) November 1, 2013: 2-3 Trees: Inserting and Deleting Scribes: CS 10 Teaching Team Lecture Summary In this class, we investigated 2-3 Trees in

### B-Trees. Algorithms and data structures for external memory as opposed to the main memory B-Trees. B -trees

B-Trees Algorithms and data structures for external memory as opposed to the main memory B-Trees Previous Lectures Height balanced binary search trees: AVL trees, red-black trees. Multiway search trees:

### A Load Balancing Algorithm based on the Variation Trend of Entropy in Homogeneous Cluster

, pp.11-20 http://dx.doi.org/10.14257/ ijgdc.2014.7.2.02 A Load Balancing Algorithm based on the Variation Trend of Entropy in Homogeneous Cluster Kehe Wu 1, Long Chen 2, Shichao Ye 2 and Yi Li 2 1 Beijing

### HETEROGENEITY-AWARE SHORTEST PATH ROUTING:

HETEROGENEITY-AWARE SHORTEST PATH ROUTING: FLOW HOLDING TIME, USER DEMAND AND NETWORK STATE S.-C. YANG,X.SU AND G. DE VECIANA Department of Electrical and Computer Engineering University of Texas, Austin,

### Previous Lectures. B-Trees. External storage. Two types of memory. B-trees. Main principles

B-Trees Algorithms and data structures for external memory as opposed to the main memory B-Trees Previous Lectures Height balanced binary search trees: AVL trees, red-black trees. Multiway search trees:

### Electronic Document Management Using Inverted Files System

EPJ Web of Conferences 68, 0 00 04 (2014) DOI: 10.1051/ epjconf/ 20146800004 C Owned by the authors, published by EDP Sciences, 2014 Electronic Document Management Using Inverted Files System Derwin Suhartono,

### AS-2261 M.Sc.(First Semester) Examination-2013 Paper -fourth Subject-Data structure with algorithm

AS-2261 M.Sc.(First Semester) Examination-2013 Paper -fourth Subject-Data structure with algorithm Time: Three Hours] [Maximum Marks: 60 Note Attempts all the questions. All carry equal marks Section A

### 12 Abstract Data Types

12 Abstract Data Types 12.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define the concept of an abstract data type (ADT).

### Big Data and Scripting. Part 4: Memory Hierarchies

1, Big Data and Scripting Part 4: Memory Hierarchies 2, Model and Definitions memory size: M machine words total storage (on disk) of N elements (N is very large) disk size unlimited (for our considerations)

### recursion, O(n), linked lists 6/14

recursion, O(n), linked lists 6/14 recursion reducing the amount of data to process and processing a smaller amount of data example: process one item in a list, recursively process the rest of the list

### VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY

ACADEMIC YEAR: 0 7 VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 0 0 SEMESTER: ODD BRANCH: MCA YEAR: I SEMESTER: I SUBJECT CODE AND NAME: MC70 Problem Solving and Programming NAME OF THE FACULTY

### A Virtual Machine Searching Method in Networks using a Vector Space Model and Routing Table Tree Architecture

A Virtual Machine Searching Method in Networks using a Vector Space Model and Routing Table Tree Architecture Hyeon seok O, Namgi Kim1, Byoung-Dai Lee dept. of Computer Science. Kyonggi University, Suwon,

### Data Warehousing und Data Mining

Data Warehousing und Data Mining Multidimensionale Indexstrukturen Ulf Leser Wissensmanagement in der Bioinformatik Content of this Lecture Multidimensional Indexing Grid-Files Kd-trees Ulf Leser: Data

### Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

Tutorial#1 Q 1:- Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2:- What is a Data Type? Differentiate

### CSE 326: Data Structures B-Trees and B+ Trees

Announcements (4//08) CSE 26: Data Structures B-Trees and B+ Trees Brian Curless Spring 2008 Midterm on Friday Special office hour: 4:-5: Thursday in Jaech Gallery (6 th floor of CSE building) This is

### 1 if 1 x 0 1 if 0 x 1

Chapter 3 Continuity In this chapter we begin by defining the fundamental notion of continuity for real valued functions of a single real variable. When trying to decide whether a given function is or

### Research on Task Planning Based on Activity Period in Manufacturing Grid

Research on Task Planning Based on Activity Period in Manufacturing Grid He Yu an, Yu Tao, Hu Da chao Abstract In manufacturing grid (MG), activities of the manufacturing task need to be planed after the

### Lecture Notes on Binary Search Trees

Lecture Notes on Binary Search Trees 15-122: Principles of Imperative Computation Frank Pfenning André Platzer Lecture 17 October 23, 2014 1 Introduction In this lecture, we will continue considering associative

### Data storage Tree indexes

Data storage Tree indexes Rasmus Pagh February 7 lecture 1 Access paths For many database queries and updates, only a small fraction of the data needs to be accessed. Extreme examples are looking or updating

### Efficient Data Structures for Decision Diagrams

Artificial Intelligence Laboratory Efficient Data Structures for Decision Diagrams Master Thesis Nacereddine Ouaret Professor: Supervisors: Boi Faltings Thomas Léauté Radoslaw Szymanek Contents Introduction...

### Performance Evaluation of Natural and Surrogate Key Database Architectures

Performance Evaluation of Natural and Surrogate Key Database Architectures Sebastian Link 1, Ivan Luković 2, Pavle ogin *)1 1 Victoria University of Wellington, Wellington, P.O. Box 600, New Zealand sebastian.link@vuw.ac.nz

### International Journal of Software and Web Sciences (IJSWS) www.iasir.net

International Association of Scientific Innovation and Research (IASIR) (An Association Unifying the Sciences, Engineering, and Applied Research) ISSN (Print): 2279-0063 ISSN (Online): 2279-0071 International

### TREE BASIC TERMINOLOGIES

TREE Trees are very flexible, versatile and powerful non-liner data structure that can be used to represent data items possessing hierarchical relationship between the grand father and his children and

### Binary Search Trees CMPSC 122

Binary Search Trees CMPSC 122 Note: This notes packet has significant overlap with the first set of trees notes I do in CMPSC 360, but goes into much greater depth on turning BSTs into pseudocode than

### 2.3 Scheduling jobs on identical parallel machines

2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

### PES Institute of Technology-BSC QUESTION BANK

PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions

### 13 Infinite Sets. 13.1 Injections, Surjections, and Bijections. mcs-ftl 2010/9/8 0:40 page 379 #385

mcs-ftl 2010/9/8 0:40 page 379 #385 13 Infinite Sets So you might be wondering how much is there to say about an infinite set other than, well, it has an infinite number of elements. Of course, an infinite

### DATABASE DESIGN - 1DL400

DATABASE DESIGN - 1DL400 Spring 2015 A course on modern database systems!! http://www.it.uu.se/research/group/udbl/kurser/dbii_vt15/ Kjell Orsborn! Uppsala Database Laboratory! Department of Information

### QuickDB Yet YetAnother Database Management System?

QuickDB Yet YetAnother Database Management System? Radim Bača, Peter Chovanec, Michal Krátký, and Petr Lukáš Radim Bača, Peter Chovanec, Michal Krátký, and Petr Lukáš Department of Computer Science, FEECS,

### Vector storage and access; algorithms in GIS. This is lecture 6

Vector storage and access; algorithms in GIS This is lecture 6 Vector data storage and access Vectors are built from points, line and areas. (x,y) Surface: (x,y,z) Vector data access Access to vector

### The Application of Association Rule Mining in CRM Based on Formal Concept Analysis

The Application of Association Rule Mining in CRM Based on Formal Concept Analysis HongSheng Xu * and Lan Wang College of Information Technology, Luoyang Normal University, Luoyang, 471022, China xhs_ls@sina.com

### Lecture 12 Doubly Linked Lists (with Recursion)

Lecture 12 Doubly Linked Lists (with Recursion) In this lecture Introduction to Doubly linked lists What is recursion? Designing a node of a DLL Recursion and Linked Lists o Finding a node in a LL (recursively)

### Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb

Binary Search Trees Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 27 1 Properties of Binary Search Trees 2 Basic BST operations The worst-case time complexity of BST operations

### A Tool for Searching the Semantic Web for Supplies Matching Demands

A Tool for Searching the Semantic Web for Supplies Matching Demands Zuzana Halanová, Pavol Návrat, Viera Rozinajová Abstract: We propose a model of searching semantic web that allows incorporating data

### A Searching Strategy to Adopt Multi-Join Queries Based on Top-K Query Model

A Searching Strategy to Adopt Multi-Join Queries Based on Top-K Query Model 1 M.Naveena, 2 S.Sangeetha, 1 M.E-CSE, 2 AP-CSE V.S.B. Engineering College, Karur, Tamilnadu, India. 1 naveenaskrn@gmail.com,

### Application. Outline. 3-1 Polynomial Functions 3-2 Finding Rational Zeros of. Polynomial. 3-3 Approximating Real Zeros of.

Polynomial and Rational Functions Outline 3-1 Polynomial Functions 3-2 Finding Rational Zeros of Polynomials 3-3 Approximating Real Zeros of Polynomials 3-4 Rational Functions Chapter 3 Group Activity:

### Persistent Binary Search Trees

Persistent Binary Search Trees Datastructures, UvA. May 30, 2008 0440949, Andreas van Cranenburgh Abstract A persistent binary tree allows access to all previous versions of the tree. This paper presents

### Intelligent Agents Serving Based On The Society Information

Intelligent Agents Serving Based On The Society Information Sanem SARIEL Istanbul Technical University, Computer Engineering Department, Istanbul, TURKEY sariel@cs.itu.edu.tr B. Tevfik AKGUN Yildiz Technical

### Algorithms and Data Structures

Algorithms and Data Structures Part 2: Data Structures PD Dr. rer. nat. habil. Ralf-Peter Mundani Computation in Engineering (CiE) Summer Term 2016 Overview general linked lists stacks queues trees 2 2

### High-performance XML Storage/Retrieval System

UDC 00.5:68.3 High-performance XML Storage/Retrieval System VYasuo Yamane VNobuyuki Igata VIsao Namba (Manuscript received August 8, 000) This paper describes a system that integrates full-text searching

### Optimization of SQL Queries in Main-Memory Databases

Optimization of SQL Queries in Main-Memory Databases Ladislav Vastag and Ján Genči Department of Computers and Informatics Technical University of Košice, Letná 9, 042 00 Košice, Slovakia lvastag@netkosice.sk

### 8. Query Processing. Query Processing & Optimization

ECS-165A WQ 11 136 8. Query Processing Goals: Understand the basic concepts underlying the steps in query processing and optimization and estimating query processing cost; apply query optimization techniques;

### A Comparison of Dictionary Implementations

A Comparison of Dictionary Implementations Mark P Neyer April 10, 2009 1 Introduction A common problem in computer science is the representation of a mapping between two sets. A mapping f : A B is a function

### CSE 5311 Homework 3 Solution

CSE 5311 Homework 3 Solution Problem 15.1-1 Show that equation (15.4) follows from equation (15.3) and the initial condition T (0) = 1. We can verify that T (n) = n is a solution to the given recurrence

### Introduction to Algorithms March 10, 2004 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser Quiz 1.

Introduction to Algorithms March 10, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Quiz 1 Quiz 1 Do not open this quiz booklet until you are directed

### Numbers and Operations in Base 10 and Numbers and Operations Fractions

Numbers and Operations in Base 10 and Numbers As the chart below shows, the Numbers & Operations in Base 10 (NBT) domain of the Common Core State Standards for Mathematics (CCSSM) appears in every grade

### Extend Table Lens for High-Dimensional Data Visualization and Classification Mining

Extend Table Lens for High-Dimensional Data Visualization and Classification Mining CPSC 533c, Information Visualization Course Project, Term 2 2003 Fengdong Du fdu@cs.ubc.ca University of British Columbia

### CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.

Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure

### 10CS35: Data Structures Using C

CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a

### State History Storage in Disk-based Interval Trees

State History Storage in Disk-based Interval Trees Alexandre Montplaisir June 29, 2010 École Polytechnique de Montréal Content Introduction : The concept of State The current method : Checkpoints The proposed

### A binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and:

Binary Search Trees 1 The general binary tree shown in the previous chapter is not terribly useful in practice. The chief use of binary trees is for providing rapid access to data (indexing, if you will)

### Binary Heap Algorithms

CS Data Structures and Algorithms Lecture Slides Wednesday, April 5, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005 2009 Glenn G. Chappell

### The art of fast web: Increasing Database Performance for RESTful Applications

ISSN (Online): 2409-4285 www.ijcsse.org Page: 88-92 The art of fast web: Increasing Database Performance for RESTful Applications Katalina Grigorova 1 and Kaloyan Mironov 2 1, 2 Department of Informatics

### WRITING PROOFS. Christopher Heil Georgia Institute of Technology

WRITING PROOFS Christopher Heil Georgia Institute of Technology A theorem is just a statement of fact A proof of the theorem is a logical explanation of why the theorem is true Many theorems have this

### Analysis of Algorithms I: Binary Search Trees

Analysis of Algorithms I: Binary Search Trees Xi Chen Columbia University Hash table: A data structure that maintains a subset of keys from a universe set U = {0, 1,..., p 1} and supports all three dictionary

### Report on the Train Ticketing System

Report on the Train Ticketing System Author: Zaobo He, Bing Jiang, Zhuojun Duan 1.Introduction... 2 1.1 Intentions... 2 1.2 Background... 2 2. Overview of the Tasks... 3 2.1 Modules of the system... 3

### On line construction of suffix trees 1

(To appear in ALGORITHMICA) On line construction of suffix trees 1 Esko Ukkonen Department of Computer Science, University of Helsinki, P. O. Box 26 (Teollisuuskatu 23), FIN 00014 University of Helsinki,

### An Introduction to Number Theory Prime Numbers and Their Applications.

East Tennessee State University Digital Commons @ East Tennessee State University Electronic Theses and Dissertations 8-2006 An Introduction to Number Theory Prime Numbers and Their Applications. Crystal

### Style Guide For Writing Mathematical Proofs

Style Guide For Writing Mathematical Proofs Adapted by Lindsey Shorser from materials by Adrian Butscher and Charles Shepherd A solution to a math problem is an argument. Therefore, it should be phrased

### Ordered Lists and Binary Trees

Data Structures and Algorithms Ordered Lists and Binary Trees Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science University of San Francisco p.1/62 6-0:

### Lecture Notes on Binary Search Trees

Lecture Notes on Binary Search Trees 15-122: Principles of Imperative Computation Frank Pfenning Lecture 17 March 17, 2010 1 Introduction In the previous two lectures we have seen how to exploit the structure

### Knowledge of searching using linear search. around 15 minutes, can be used within a longer workshop activity

20 Questions Age group: Abilities assumed: Time: Size of group: adult Knowledge of searching using linear search around 5 minutes, can be used within a longer workshop activity anything from 2 to hundreds

### Analysis of Query Optimization Techniques in Databases

Analysis of Query Optimization Techniques in Databases Jyoti Mor M. Tech Student, CSE Dept. Indu Kashyap Assistant Professor, CSE Dept. R. K. Rathy, PhD. Professor, CSE Department ABSTRACT Query optimization

### Query processing. Tore Risch Information Technology Uppsala University

Query processing Tore Risch Information Technology Uppsala University 2011-03-08 What is query processing? A given SQL query is translated by the query processor into a low level program called an execution

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10 Introduction to Discrete Probability Probability theory has its origins in gambling analyzing card games, dice,

### SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89 by Joseph Collison Copyright 2000 by Joseph Collison All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections

### Merkle Hash Trees for Distributed Audit Logs

Merkle Hash Trees for Distributed Audit Logs Subject proposed by Karthikeyan Bhargavan Karthikeyan.Bhargavan@inria.fr April 7, 2015 Modern distributed systems spread their databases across a large number

### Chapter 7: Queues and Deques

Chapter 7: Queues and Deques After the stack, the next simplest data abstraction is the queue. As with the stack, the queue can be visualized with many examples you are already familiar with from everyday

### Properties of sequences Since a sequence is a special kind of function it has analogous properties to functions:

Sequences and Series A sequence is a special kind of function whose domain is N - the set of natural numbers. The range of a sequence is the collection of terms that make up the sequence. Just as the word

### Merge Sort. 2004 Goodrich, Tamassia. Merge Sort 1

Merge Sort 7 2 9 4 2 4 7 9 7 2 2 7 9 4 4 9 7 7 2 2 9 9 4 4 Merge Sort 1 Divide-and-Conquer Divide-and conquer is a general algorithm design paradigm: Divide: divide the input data S in two disjoint subsets

### Section 1.5 Arithmetic in Other Bases

Section Arithmetic in Other Bases Arithmetic in Other Bases The operations of addition, subtraction, multiplication and division are defined for counting numbers independent of the system of numeration

### Predictive Indexing for Fast Search

Predictive Indexing for Fast Search Sharad Goel Yahoo! Research New York, NY 10018 goel@yahoo-inc.com John Langford Yahoo! Research New York, NY 10018 jl@yahoo-inc.com Alex Strehl Yahoo! Research New York,

### Is ETL Becoming Obsolete?

Is ETL Becoming Obsolete? Why a Business-Rules-Driven E-LT Architecture is Better Sunopsis. All rights reserved. The information contained in this document does not constitute a contractual agreement with

### Scheduling Shop Scheduling. Tim Nieberg

Scheduling Shop Scheduling Tim Nieberg Shop models: General Introduction Remark: Consider non preemptive problems with regular objectives Notation Shop Problems: m machines, n jobs 1,..., n operations

### Near Optimal Solutions

Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.

### Heaps & Priority Queues in the C++ STL 2-3 Trees

Heaps & Priority Queues in the C++ STL 2-3 Trees CS 3 Data Structures and Algorithms Lecture Slides Friday, April 7, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks

### A B S T R A C T I. INTRODUCTION

Ameliorated Methodology For The Design Of Project Data Flow Diagram. Mr. Anilkumar Hulsure Department of Information Technology, D.Y.Patil College of Engineering Akurdi, Pune anil.hulsure@gmail.com A B

### Lecture 5 - CPA security, Pseudorandom functions

Lecture 5 - CPA security, Pseudorandom functions Boaz Barak October 2, 2007 Reading Pages 82 93 and 221 225 of KL (sections 3.5, 3.6.1, 3.6.2 and 6.5). See also Goldreich (Vol I) for proof of PRF construction.

### Operations and Algebraic Thinking Represent and solve problems involving multiplication and division.

Performance Assessment Task The Answer is 36 Grade 3 The task challenges a student to use knowledge of operations and their inverses to complete number sentences that equal a given quantity. A student

### Figure 1: Opening a Protos XML Export file in ProM

1 BUSINESS PROCESS REDESIGN WITH PROM For the redesign of business processes the ProM framework has been extended. Most of the redesign functionality is provided by the Redesign Analysis plugin in ProM.

### Outline. File Management Tanenbaum, Chapter 4. Files. File Management. Objectives for a File Management System

Outline File Management Tanenbaum, Chapter 4 Files and directories from the programmer (and user) perspective Files and directory internals the operating system perspective COMP3231 Operating Systems 1

### NODAL ANALYSIS. Circuits Nodal Analysis 1 M H Miller

NODAL ANALYSIS A branch of an electric circuit is a connection between two points in the circuit. In general a simple wire connection, i.e., a 'short-circuit', is not considered a branch since it is known

### PowerTeaching i3: Algebra I Mathematics

PowerTeaching i3: Algebra I Mathematics Alignment to the Common Core State Standards for Mathematics Standards for Mathematical Practice and Standards for Mathematical Content for Algebra I Key Ideas and

### CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A

### Notes on Complexity Theory Last updated: August, 2011. Lecture 1

Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look

### Testing LTL Formula Translation into Büchi Automata

Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland

### Creating, Solving, and Graphing Systems of Linear Equations and Linear Inequalities

Algebra 1, Quarter 2, Unit 2.1 Creating, Solving, and Graphing Systems of Linear Equations and Linear Inequalities Overview Number of instructional days: 15 (1 day = 45 60 minutes) Content to be learned

### A Recommendation Framework Based on the Analytic Network Process and its Application in the Semantic Technology Domain

A Recommendation Framework Based on the Analytic Network Process and its Application in the Semantic Technology Domain Student: Filip Radulovic - fradulovic@fi.upm.es Supervisors: Raúl García-Castro, Asunción

### Fuzzy Multi-Join and Top-K Query Model for Search-As-You-Type in Multiple Tables

Fuzzy Multi-Join and Top-K Query Model for Search-As-You-Type in Multiple Tables 1 M.Naveena, 2 S.Sangeetha 1 M.E-CSE, 2 AP-CSE V.S.B. Engineering College, Karur, Tamilnadu, India. 1 naveenaskrn@gmail.com,

### A Deduplication-based Data Archiving System

2012 International Conference on Image, Vision and Computing (ICIVC 2012) IPCSIT vol. 50 (2012) (2012) IACSIT Press, Singapore DOI: 10.7763/IPCSIT.2012.V50.20 A Deduplication-based Data Archiving System

### IMPLEMENTATION OF NETWORK SECURITY MODEL IN CLOUD COMPUTING USING ENCRYPTION TECHNIQUE

IMPLEMENTATION OF NETWORK SECURITY MODEL IN CLOUD COMPUTING USING ENCRYPTION TECHNIQUE 1 Rajesh L Gaikwad, 2 Dhananjay M Dakhane, 3 Ravindra L Pardhi M.E Student, Associate Professor, Assistant Professor,

### Regions in a circle. 7 points 57 regions

Regions in a circle 1 point 1 region points regions 3 points 4 regions 4 points 8 regions 5 points 16 regions The question is, what is the next picture? How many regions will 6 points give? There's an

### Query Optimization in Teradata Warehouse

Paper Query Optimization in Teradata Warehouse Agnieszka Gosk Abstract The time necessary for data processing is becoming shorter and shorter nowadays. This thesis presents a definition of the active data

### Hash Tables. Computer Science E-119 Harvard Extension School Fall 2012 David G. Sullivan, Ph.D. Data Dictionary Revisited

Hash Tables Computer Science E-119 Harvard Extension School Fall 2012 David G. Sullivan, Ph.D. Data Dictionary Revisited We ve considered several data structures that allow us to store and search for data