EXAMENSARBETE INOM TEKNIK, GRUNDNIVÅ, 15 HP STOCKHOLM, SVERIGE 2017

Performance comparison of - based RFID anti-collision in large scale environments

FREDRIK LILJEDAHL

ALEXANDER MANSKE

KTH SKOLAN FÖR DATAVETENSKAP OCH KOMMUNIKATION Performance comparison of tree-based RFID anti-collision algorithms in large scale environments

FREDRIK LILJEDAHL ALEXANDER MANSKE

Bachelor in Date: May 30, 2017 Supervisor: Michael Schliephake Examiner: Örjan Ekeberg Swedish title: Prestationsjämförelse av trädbaserade RFID antikollisionsalgoritmer i storskaliga miljöer School of Computer Science and Communication ii

Abstract

Radio Frequency Identification is taking a larger and larger place in our everyday lives. As the use of RFID and the number of RFID-enabled items increase, the technology is more prone to identification collisions, which leads to difficulties using it. A handful of algorithms to avoid these issues already exist today, but no real comparison regarding their performance in large scale collisions have been done. This report focuses on tree- based algorithms and compares them to one another with the use of an implemented benchmark. A large amount of tests were completed, with a various and diverse size of input . It was shown that algorithms with a dynamic structure or fixed loop implementations perform far better than others and are suitable for further develop- ment and implementation in large scale environments. iii

Sammanfattning

Radio Frequency Identification tar en större och större plats i vår vardag. I takt med att användningen av RFID och antalet RFID-aktiverade produkter ökar, så ökar även risken för att identifikationskollisioner uppstår, vilket leder till komplikationer i användningen av tekniken. En handfull algoritmer för att hantera dessa situationer existerar redan, men ingen riktig jämförelse mellan deras prestationer i storskaliga kollisioner har gjorts. Den- na rapport fokuserar på trädbaserade algoritmer och jämför dem sinsemellan med hjälp av en implementerad testmiljö. En stor mängd tester genomfördes med varierande inda- ta. Det visade sig att algoritmer med dynamisk tillbakahoppande struktur eller de med konstanta slingor presterade mycket bättre än andra och bedömdes därför som passande för vidareutveckling och implementation i storskaliga miljöer.

Contents

Contents v

1 Introduction 1 1.1 Problem statement ...... 1 1.2 Scope of study ...... 2 1.3 Report disposition ...... 2 1.4 Terminology ...... 2

2 Background 4 2.1 RFID ...... 4 2.1.1 Reading ...... 4 2.1.2 Collision ...... 5 2.2 Anti-collision algorithms ...... 5 2.2.1 ALOHA-based algorithms ...... 5 2.2.2 Tree-based algorithms ...... 7 2.2.2.1 Binary search ...... 8 2.2.2.2 Dynamic binary ...... 9 2.2.2.3 Backtracking binary algorithm ...... 10 2.2.2.4 Jumping and dynamic algorithm ...... 11 2.2.2.5 Improved ...... 11

3 Method 13 3.1 Metrics ...... 13 3.2 Test data ...... 14 3.2.1 Structure ...... 14 3.2.2 Generating data ...... 14 3.3 Implementation ...... 14 3.3.1 Code structure ...... 14 3.3.2 Experiment execution ...... 15

4 Results 17 4.1 Benchmarks with a low number of tags ...... 17 4.2 Benchmarks with a high number of tags ...... 20

5 Discussion 24 5.1 Result analysis ...... 24 5.2 Method analysis ...... 25 5.2.1 Source of errors ...... 26

v vi CONTENTS

5.3 Future research ...... 26

6 Conclusion 27

Bibliography 28

A Code 30

B Result data 51 Chapter 1

Introduction

As technology is advancing in a rapid speed and having an even greater impact on our lives for each year that passes by, optimizing and simplifying already existing solutions has become a main focus area for the creators and inventors in the industry. The demand for doing everyday things more efficiently and seamlessly is forcing the current solutions to become better, lighter and simpler. Keys and cards no longer have to be inserted or swiped, libraries do not use pen and paper to keep a record of their items and inventory tracking is almost completely autom- atized. All due to the rising technology of RFID (Radio Frequency Identification). As the technology moves forward, having a greater impact on our lives for each day, the number of RFID tags that we carry around or are bundled together and readers out in the public increases. To this day, readers have trouble identifying a tag if there is a collision, which means it is forced to read multiple tags at once. There are existing algo- rithms to handle these types of cases, but an efficient one is yet to be found. Due to the fact that RFID is a constantly rising technology, with a market worth of US$8.89 Billion in 2014 and an estimated US$18.68 Billion in 2026 [1], an efficient and optimized solution to the problem is needed. To be able to integrate RFID in our lives to a greater extent, collision needs to be handled appropriately. This report will investigate already existing algorithms and test weather or not they can be changed and optimized to fulfill the lack of efficiency that exists today.

1.1 Problem statement

There are not any perfect anti-collision algorithms in RFID environments in use today, therefore all improvements on existing algorithms are appreciated. This study focuses on tree-based algorithms, which work by polling the collided tags with queries in order to distinguish them from one another. This can be done by various methods and is fur- ther presented in Chapter 2. The main subject of this report will be the Improved binary search algorithm presented by Djeddou and Benssalah, which is using a combined with preset loop mechanic to optimize the performance of the handling of the collision. The article presents their algorithm as having better performance than similar tree-based algorithms. In their research study, 16 identification numbers were used and the number of simultaneously read tags were ranging from 2 to 100 [2]. Many practical uses of RFID today have numbers exceeding the ones used in their simulations, for example, a harbor

1 2 CHAPTER 1. INTRODUCTION

with hundreds of containers with each containing tens of thousands of products with individual tags.

• How do well known tree-based anti-collision algorithms perform in large scale en- vironments?

• Does Djeddou’s and Benssalah’s binary search algorithm perform better in large scale environments compared to other known anti-collision algorithms?

1.2 Scope of study

While there are both passive tag collisions and active tag collisions, this study will only focus on passive tags and approaches on handling their collisions. There is also a type of collision caused when several readers to read the same tag called reader colli- sion, but this will not be studied in this report due to the lack of relevance to the prob- lem statement. The metrics used in measuring the performance of algorithms are the number of reader requests and the total amount of transmitted between the reader and tags. RFID col- lision simulations will be used as the method of measuring performance as there is no need for real life RFID systems when using reader requests and bit amount as metrics. The algorithms considered in the study are tree-based algorithms. While ALOHA- based algorithms are important in RFID collision protocols it will not be studied because they are dependant on time as a metric, which will not be measured. Cases when tags enter the reader’s vicinity in the middle of a running anti-collision protocol will not be studied.

1.3 Report disposition

In the following chapter, chapter 2, the theoretical background is presented. It serves the purpose to educate the reader on relevant technology and it presents previous work and research that has been done in the area. The information in chapter 2 is crucial since it will be referred to throughout the report. Chapter 3 includes the methodology of the experiment, explaining the testing envi- ronment and motivation of the approach. This chapter is meant to be thorough, so that the experiments and results can be recreated and verified by someone else. Chapter 4 includes the results obtained and in chapter 5 they are broken down, an- alyzed and discussed. Finally, a conclusion based on the results and discussion is pre- sented in chapter 6, in relevance to the research question.

1.4 Terminology

ALOHA A type of RFID anti-collision algorithm which works by telling each tag in the collision to idle for a randomly selected amount of time.

BSA Binary Search Algorithm, a type of RFID anti-collision algorithm. Distinguishes tags by sending queries to the of tags. CHAPTER 1. INTRODUCTION 3

Collision When multiple tags are being read by a reader during the same time frame and part of their identification number collides.

Collision bits The colliding bit positions of the response the reader receives when colli- sions occur.

DBSA Dynamic Binary Search Algorithm, a type of RFID anti-collision algorithm similar to the Binary Search Algorithm but sends and receives only fragments of queries.

Improved algorithm An unnamed anti-collision algorithm proposed by Khelladi, Djed- dou and Benssalah [2]. Sometimes referred to using the name of the authors and sometimes using the placeholder name Improved algorithm.

Manchester coding A technique used in readers to identify whether or not there exists any collision bits.

Reader Reads and communicates with tags in its operating range by transmitting radio waves.

RFID Radio Frequency Identification.

Tag A chip stored with data that can be read by a RFID reader. Tags mentioned in this report are passive, meaning that they do not have any internal or dedicated power- ing source. Instead, they are powered by the radio energy that is transmitted by the reader to be able to send their specific data. Chapter 2

Background

As mentioned in the introduction, RFID is a rising technology with a very broad spec- trum of usability. As the technology gains popularity among its users, cases where colli- sion occurs increases. Easily explained, the technology is built on a tag and a reader. The reader recognizes when a tag enters its area of range, and acts according to the data stored on it. If the reader recognizes more than one tag at a time, a collision occurs. A further and more in-depth description of what a collision actually is can be found below. This section is meant to provide a better understanding of the different anti-collision techniques that are used today, and each one of the techniques are briefly explained.

2.1 RFID

RFID is a technology built on RF (Radio Frequency). It can transmit data from one object to one another completely wirelessly, with the use of radio waves. The following sections explain how a tag is read and how a collision occurs.

2.1.1 Reading A so called reader is necessary to be able to read tags. The reader sends out a continuous RF wave, and as a tag enters the area of range, data can be read from the tag, given that the tag can be read without any errors such as collisions. The RF wave makes it possible to read the tag even if the line of sight between the reader and the tag is blocked. Readers are operating on different frequencies, depending on what type of reading- technique is used and what purpose it is supposed to serve. In general, lower frequen- cies have a lower range of readability and are slower, whereas higher frequencies have a higher range and are faster [3]. As the data is read by the reader, a connected data processing system can interpret the data further and act accordingly. This allows for different events to be executed based on the data on the tag. Tags can be of various sizes of data, where the most common are 64, 96 and 128 bits. The bit structure depends on the type of tag, however, there is always a number of iden- tification bits which have the possibility to collide in specific scenarios.

4 CHAPTER 2. BACKGROUND 5

2.1.2 Collision A collision occurs when a reader tries to read the identification bits of multiple tags si- multaneously, indicating that more than one tag is in the area of range of the reader. Bits from multiple tags collide, making data unreadable for the reader [4]. Such colli- sions causes the reader to either not work at all or being forced to reinterpret the tags, resulting in loss of speed and a greater power consumption. Different algorithms and protocols have been developed to handle these types of situations, but as stated above, the trade-off is that it might slow down the speed of which the reader can read tags at and/or that tags might be interpreted incorrectly [2]. The reader is aware of that a colli- sion has occurred, but cannot solve it by itself. To solve this problem, various algorithms with different approaches have been developed. However, the search for a completely ef- ficient solution is still in progress. As shown in Figure 2.1, two tags that have been read simultaneously cause a collision since the bits in the second and fourth place differ from each other. This makes the reader unable to distinguish between the tags and eliminates the possibility of handling them separately.

Figure 2.1: Example of a identification bit collision

For clarification, there also exist cases of reader collisions, although, these types of collisions will be left out and the report will focus on tag collisions as explained above.

2.2 Anti-collision algorithms

Different types of algorithms have been developed to cope with the collision problems described above. In general, there are two different approaches, tree-based algorithms and ALOHA-based algorithms [5]. This section will explain the differences between these types and how they might be implemented to avoid collision while trying to maintain a high efficiency.

2.2.1 ALOHA-based algorithms ALOHA-based algorithms manages the access times between tags and receivers. The time for a tag to access the reader is randomized which reduces the number of collisions if multiple tags were to enter the RF area simultaneously. 6 CHAPTER 2. BACKGROUND

When a collision is identified, the tags that were involved receive a random idle du- ration, prompting the tag to resend its data after that period of time. While this might solve some collision issues, a collision-free environment is not guaranteed since the idle time is randomized. As the number of collided tags grow, the weaker the efficiency. More collisions can occur even after idling, which may lead to a network congestion [6], which can cause packet loss or complete blocking of new incoming data. To prevent this sce- nario from happening, a powerful reader with good computation power is preferred. ALOHA is also less vulnerable to man-in-the-middle attacks since the tag data is un- modified throughout the whole process and just being resent at a later stage [5]. The implementations of ALOHA may also differ, and the algorithm is usually clas- sified in three different categories: pure ALOHA, slotted ALOHA and dynamic framed slotted ALOHA (DFSA). Slotted ALOHA is most commonly used in environments where the number of col- liding tags is expected to be relatively low (10-20 tags). Each tag in the collision is aware of that a collision has occurred and is randomly assigned a slot frame where to retry to establish an identification. As seen in Figure 2.2, a few tags causes the results to be good since the probability of a colliding slot assignment is low. When the number of tags in the collision grows, the probability of more slot collisions increase causing the tags to re- slot more times which affects the throughput negatively [7].

Figure 2.2: Slotted ALOHA

The main difference between pure ALOHA and DFSA is that DFSA has a higher identification efficiency due to its ability to dynamically adjust the frame length, yielding a higher throughput. Although, DFSA can be hard to implement since the frame length is dependent on the number of colliding tags, which could be hard to estimate before- hand. CHAPTER 2. BACKGROUND 7

2.2.2 Tree-based algorithms Tree-based algorithms use Manchester coding to identify which bits are conflicting in the identification number of the read tags. Each bit read with Manchester coding is di- vided into two equal intervals. A bit with value 1 is high in the first and low in the second. A bit with value 0 is the opposite with low in first interval and high in sec- ond. When the reader receives a bit signal with high in both the first and second inter- val of a bit, it knows that both a 1 and a 0 has been sent at the same position [8]. When bits differ at one or more indexes they are denoted as collision bits. All bits that are not collision bits have the same value on all tags read. Figure 2.3 shows two tags read by a reader with Manchester coding. Tag A has identification number 0110011 and the tag B has 0111010. The fourth and seventh bit from left to right are colliding when read by the reader and is therefore the collision bits in this read.

Figure 2.3: Manchester Coding

The main idea behind tree-based algorithms is to exhaust all possible identification numbers with the help of a tree. First off, the reader sends out a request for all tags in the reader’s vicinity to respond with their identification number. Then if the reader re- ceives one or more collision bits (otherwise the tag is identified) using Manchester cod- ing, it then chooses the highest collision bit and uses it to divide the identification num- bers into two subsets. One subset contains the tags with 0 at the collision bit position and the other contains tags with 1. Since there are two possible values at the position of a collision bit, there will be at least one tag in each subset. The reader will then handle each subset individually and sends a request for tags to send their identification num- ber only if it has the same bits as the subset in all bits above and including the colli- sion bit position. For example if the second highest bit turns out to be a collision bit and the highest bit is 1, the reader would request first for all tags with identification num- ber with 1 on its highest bit 0 on its second highest bit to respond, and once that subset of tags are identified it does the same request but with a 1 instead of a 0 on its second highest bit (still with 1 as its highest bit as there was no collision there). If there are more than one collision bit the reader repeats the algorithm recursively in a subset until all tags in that subset have been identified [9]. Shown in Figure 2.4 the tags with identifica- tion numbers 0111, 1011, 1110 and 0110 are identified using a collision tree. First off the reader detects a collision bit at the highest bit (bit 4) and it therefore creates two subsets 8 CHAPTER 2. BACKGROUND

with one as 0 in the highest bit and one with 1 in the highest bit. Going down left in the branches is the reader requesting tags with 0 at the collision bit and going down right request tags with 1. Second row to the left shows that both tags with 0 as their highest bit has the same three highest bit and therefore only a collision bit at the lowest bit is de- tected. Second row to the right shows that collision bit is detected at bit 3. In the third row all identification numbers has successfully been when the reader divides each subset into smaller subsets which has no collision bit.

Figure 2.4: Collision tree

2.2.2.1 Binary search algorithm A binary search anti-collision algorithm is, unlike the ALOHA-based algorithm, a deter- ministic algorithm. It is the most widely used anti-collision algorithm today. The idea behind the binary search algorithm is to check the number of collision bits read, and if there are two or more collision bits the reader can not uniquely identify all the tags with- out querying the tags. The highest collision bit is set to 0 while all other collision bits are set to 1. For example if 0101 and 0011 is read with collision as 0XX1 the reader sets its query number to 0011 where the first X is 0 and the second is 1. The query is sent to the tags and all tags with an identification number less than or equal to the query reply with their identification number back to the reader. If no collision bits are returned one tag is identified and it is set to sleep. This process is repeated from the start until there are no responses from the initial query [10]. Figure 2.5 shows the binary search process identify- ing four tags with four bit identification number. All tags responds in the first query and several collisions are detected. The first collision bit is the first and the second query is thus 0111. Tags A with 0111 and tag with 0110 are equal or smaller than 0111 and they both respond with their number. Collision bit is detected at the fourth bit and the third query becomes 0110. A unique identification number is found and the corresponding tag is put to sleep, the query then resets to 1111 and the process is repeated. CHAPTER 2. BACKGROUND 9

Figure 2.5: Binary search algorithm

2.2.2.2 Dynamic binary search algorithm An alternative to the regular binary search algorithm is the dynamic binary search al- gorithm which helps with reducing the amount of data sent between the reader and tags. The regular binary search algorithm sends and receives data packets containing the same amount of bits as the whole identification numbers. For example if the iden- tification number is 4 bits the regular binary search algorithm sends 4 bits as the query. The dynamic binary search algorithm recognizes that this is not a necessity. Its main idea is the same as the regular binary search algorithm but instead of the reader sending the whole query it only sends the known bits from a query and receives the bits it does not know from the tags. The total amount of data sent is lowered using this version of the binary search algorithm [11]. Figure 2.6 shows the same scenario as the regular binary search but using the dynamic binary search algorithm. After the initial read the reader queries a 0 and receives 111 and 110, this means that tags with identification number 0111 and 0110 responded. The following query 0110 is sent because the first three bits 011 are shared between the two responding tags and therefore the first collision bit is the fourth. 10 CHAPTER 2. BACKGROUND

Figure 2.6: Dynamic binary search algorithm

2.2.2.3 Backtracking binary algorithm The backtracking binary algorithm is an algorithm based off of the binary search algo- rithm with a different identification process. When the reader uniquely identified a tag using the binary search algorithm it repeats the query process from the very start. The backtracking binary algorithm utilizes the fact that when a tag is identified the algorithm already has query results from previous queries. In order to capitalize on these results the backtracking binary algorithm restarts the query process by moving back just one step to the previous query result. This results in fewer queries than in a regular binary search algorithm [10]. As seen in Figure 2.7 the backtracking binary algorithm reduces the amount of queries even in small scale examples if compared to Figure 2.5. CHAPTER 2. BACKGROUND 11

Figure 2.7: Backtracking binary algorithm

2.2.2.4 Jumping and dynamic algorithm The jumping and dynamic algorithm is a combination of the dynamic binary search al- gorithm and the backtracking binary algorithm. By combining the decreased data flow in the dynamic binary search with the reduction of queries of the backtracking binary algo- rithm it makes a more complete and versatile algorithm [10].

2.2.2.5 Improved binary search algorithm Improved binary search algorithm is presented by Djeddou and Benssalah, and is based on the regular binary search algorithm. It is named improved because benchmarks showed an overall increase in performance compared to binary search and dynamic binary search. The idea in this algorithm is to use preset values on the first two collision bits and using a for each loop over these values, which will be 00, 01, 10 and 11. If there are fewer than two collision bits we can do a static check and identify the tags. If the number of colli- sion bits is two or more the preset loop will be run on the first two of these collision bits. This process is repeated in each branch until one or fewer collision bits are read [2]. Fig- ure 2.8 shows the flow of the algorithm when four tags are being identified by a reader. After the initial query where every tag sends a response three collision bits are detected. The two highest collision bits are subjects to the preset loop values and the first value is 0 and 0 in the two places. The third collision bit is set to 1. The first query of the preset 12 CHAPTER 2. BACKGROUND

loop gets no response from any tag. The next value in the preset loop is 0 and 1. This query gets a collision bit in its responses, which is fewer than 2, and a static check with a regular binary is used. The static check sets the new collision bit first to 0 and then to 1 in two queries and two tags are uniquely identified. The branch with 0 and 1 as its pre- set loop value is done and the original third collision bit is set to 1 and the loop values continues with 1 and 0. The last two preset values each uniquely identifies a tag and all tags have been found.

Figure 2.8: Improved binary search algorithm Chapter 3

Method

When measuring performance of anti collision algorithms two metrics are usually used, the number of requests sent by the reader and the amount of bits sent between the tags and the reader [2]. In this research a software created in Java 8 is used as a tool to simu- late the communication between the reader and tags. Real physical readers and tags are not needed when measuring performance with request and bit throughput. It does not matter on what system the experiment is run, since physical time is not measured. This section will explain the steps taken to produce a result answering the research question. It is meant to be clear, meaning that anyone could recreate said experiments.

3.1 Metrics

Various metrics can be used in these types of experiments. It is important to emphasize that time, in terms of seconds, will not be measured since the experiment is just an im- plementation of the algorithm, and not a representation of a real-life RFID reader. There- fore, the measured values will include the following:

• The total number of queries sent to resolve the collision.

• The total number of bits transmitted.

in form of average queries required for identifying one (1) tag.

T otalqueries average = tags | | • Transmitted bits in average for identifying one (1) tag.

T otalbits average = tags | | The reasoning between choosing to also measure the average values in addition to the total number of queries and bits sent is that it gives a more precise estimate, elimi- nating various abnormal fluctuations in the randomized input data. Average values also represent a more clear view of the actual efficiency of the algorithm, since the average performance for identifying a tag in a collision with for example 10 tags can be com- pared to a tag in a 10 000-tag collision. This approach is also used by others researching the same subject, for example Xiaolin Jia and Quanyuan Feng [12]. In Chapter 4, the results will be presented with these values in consideration.

13 14 CHAPTER 3. METHOD

3.2 Test data

Good and representative test data is important to be able to get accurate results from the benchmarks. Following is an explanation of the structure of the data and how it is gener- ated.

3.2.1 Structure The test data is represented by tags, where each tag uses a character array to represent its identification number. The array elements each carry the value of either 0 or 1 using ASCII values. An array was used due to the possibility of easy indexing, since the anti- collision algorithms are using the bit indexes of the tags to compare them and identify collisions. Due to the nature of array indexing in Java, the most significant bit in the string will be to the left and therefore have index 0. The least significant bit will be the right-most bit, which gives it index tag.length − 1. It is also worth mentioning that all tags in a group of test data will have the same bit length because they need to be comparable. They are also unique, meaning that no tag will be identical to another tag in the test group, which is also the case in real life.

3.2.2 Generating data Test data is generated though the class BenchEnvironment, see Appendix A for details, which is creating individual tags in the test group by creating instances of the class Tag. Two parameters need to be hard coded, the number of desired tags and the number of bits bits in each tag. It is worth noticing that a certain constraint has to be fulfilled: 2| | > |tags|. If the constraint is not met, it is impossible to generate that number of unique tags and fit in in the total number of tags, since all possible bit combinations already will be taken. The tags are generated randomly using Javas Random class. If a randomly chosen tag already exists in the test group, a new one will be generated until it can be added suc- cessfully. To get more accurate results, each implemented algorithm should be benchmarked with the exact same data. The test group is stored and saved in a text file, so that it can be used to analyze the results.

3.3 Implementation

The following is an explanation of how the code is structured and how the experiment was implemented and executed.

3.3.1 Code structure All of the code included in the experiment is written in Java. The code has been created solely by ourselves with standard Java libraries only. There is an abstract class called Reader, where shared functions among the different implemented algorithms are declared. Each algorithm implementation has its own class: BSAReader, BackTrackReader, DBSAReader, CHAPTER 3. METHOD 15

ImprovedReader and JumpAndDynamicReader and all of these classes are extending the Reader class. As previously mentioned in 3.2.2, the Tag class represents the test data. Lastly, the BenchEnvironment class generates the test data, and runs it on all algo- rithms. Some statistics, such as the number of bits and number of queries used, are printed for benchmarking purposes. Figure 3.1 shows an overview of the structure of the code in the form of a UML di- agram. A detailed and complete version of the code can be found in Appendix A. The code is thoroughly commented and should be easy to follow.

Figure 3.1: A UML diagram representing the class relations.

3.3.2 Experiment execution As briefly explained above in Section 3.2 and Section 3.3.1, the experiment is run with the BenchEnvironment class with hard coded values of total tags and the number of bits in them. The values of these parameters can be seen in Table 3.1 below. To get an accurate result, all five algorithms are run with identical test data in each test loop to avoid any fluctuations in the results due to inconsistent test data. The results will be recorded by saving them to a text file and are plotted in Excel. The results are presented in Chapter 4 and further analyzed in Chapter 5. 16 CHAPTER 3. METHOD

#Tags 50 50 200 200 1000 1000 5000 5000 #Bits 6 16 8 10 16 32 16 32

#Tags 10000 10000 20000 20000 40000 40000 60000 60000 80000 #Bits 16 32 16 32 16 32 16 32 32

Table 3.1: Hard coded test parameters Chapter 4

Results

This chapter presents the results from the experiment described in Chapter 3. The results consist of the algorithms performances with the test data provided. Results considered are the total and average number of queries and the total and average number of bits sent. The presentation is split in half between a low and a high number of tags to make the chart data more representative and to generate a better overview. The results are fur- ther analyzed and discussed in Chapter 5.

4.1 Benchmarks with a low number of tags

In this section, results with test data ranging from 50-5000 tags are presented. Below are four graphs that represent the statistics mentioned in Section 3.1. Figure 4.1 shows the total number of queries sent to solve the collision, Figure 4.2 shows the total number of bits transmitted, Figure 4.3 shows the average number of queries sent per tag and Figure 4.4 shows the average number of bits transmitted per tag. Each bar represents an individual algorithm, and the x-axis shows the number of queries and number of bits used as test data parameters. See Table 3.1 for more information on these parameters. A complete table with all results can be found in Appendix B. If the colors of the graph are not visible, the order of bars in each experiment corresponds to the order of the labels below the bars. It is worth noting that the values on the y-axis are growing logarithmically on all graphs except for Figure 4.3. Exponential growth was picked to make the visibility of the results more readable. The x-axis is not linear either which makes conclusions de- rived directly from the relation of experiments with different parameters unreliable. This means that graphs are best analysed by comparing algorithms in each experiment sepa- rately or only considering one specific identification number size at a time.. Figure 4.1 shows the number of queries required for the algorithms identify all tags where the number of tags are relatively small. In the two leftmost experiments the differ- ence between the amount of queries needed for each algorithm is small but the BSA and DBSA performs noticably worse than the rest. Looking further to the right in the graph, the same result shows but in a bigger difference with BSA and DBSA needing a lot more queries than the other three. The backtrack, jump and dynamic and improved algorithm performs about the same in all experiments with the improved sometimes having more queries and sometimes less queries.

17 18 CHAPTER 4. RESULTS

Figure 4.1: Total number of queries used.

Figure 4.2 below shows the total number of bits communicated when algorithms identify a set of tags. The experiments have the same parameter as the previous figure with the number of tags being relatively small. The figure shows that BSA and DBSA are transmitting considerably more bits than the rest of the algorithms. The difference between the backtrack, jump and dynamic and improved algorithms are smaller but im- proved algorithm shows the best overall performance with jump and dynamic algorithm in a close second. CHAPTER 4. RESULTS 19

Figure 4.2: Total number of bits used.

Figure 4.3 below shows the average number of queries per tag needed for each of the algorithms to identify all tags. The experiments are the same as in figure 4.1 but shows difference a bit more clearly. The backtrack and jump and dynamic algorithms shows a constant performance through all experiments which will be discussed in chapter 5.

Figure 4.3: Average number of queries used per tag.

In Figure 4.4 below the average number of bits per tag communicated between the reader and tags with the same experiments as figure 4.2. Worth noting is that higher 20 CHAPTER 4. RESULTS

density of the tags relative the size of the identification number data is causing a bigger gap between the two binary search algorithms and the other algorithms. For example, look at the 50/16 where only 50 tags out of 216 possible are read where BSA and DBSA required roughly ten times more bits per tag and then look at 5000/16 and the BSA and DBSA requires more than a hundred more bits per tag.

Figure 4.4: Average number of bits used per tag.

4.2 Benchmarks with a high number of tags

In this section, results with test data ranging from 10 000-60 000 tags are presented. Below are four graphs that represent the statistics mentioned in Section 3.1. Figure 4.5 shows the total number of queries sent to solve the collision, Figure 4.6 shows the total number of bits transmitted, Figure 4.7 shows the average number of queries sent per tag and Figure 4.8 shows the average number of bits transmitted per tag. Each bar represents an individual algorithm, and the x-axis shows the number of queries and number of bits used as test data parameters. See Table 3.1 for more information on these parameters. A complete table with all results can be found in Appendix B. The bars for each experiment are ordered in the same way the labels are. It is worth noting that the values on the y-axis are growing logarithmically on all graphs except for Figure 4.5 and 4.7. The x-axis again not linear and shifts between hav- ing identification number size 16 and 32 with the number of tags from 10 000 to 80 000. Note that all number of tags except 80 000 has one experiment with 16 bit identification number size because 80 000 does not fit in 16 bits. Figure 4.5 illustrates BSA and DBSA needing a lot more queries in order to identify all tags compared to the rest of the algorithms. Similar to the previous test with smaller CHAPTER 4. RESULTS 21

parameters the improved algorithm performs better when the number of tags approach the maximum number of tags possible for that size of identification number. Looking, for example, at 60000/16 the improved algorithm outperforms backtrack and jump and dynamic but at 60000/32 the backtrack and jump and dynamic sends fewer queries.

Figure 4.5: Total number of queries used.

In Figure 4.6, which the displays the number of bits needed for sets of tags to be identified, the BSA and DBSA sends hundreds times more bits than the rest of the al- gorithms considering. Interesting here is the fact that the improved algorithm steadily outperforms all other algorithms, albeit not with the same size of gap as between the bi- nary search algorithms and the other three. 22 CHAPTER 4. RESULTS

Figure 4.6: Total number of bits used.

Looking at the average number of queries per tag needed in figure 4.7, similar result as with smaller parameters in the previous section is shown with BSA and DBSA having far worse performance. Backtrack algorithm and jump and dynamic still has a constant performance with improved algorithms sometimes requiring more and sometimes fewer queries per tag BSA and DBSA are linear with an almost negligible factor. CHAPTER 4. RESULTS 23

Figure 4.7: Average number of queries used per tag.

In figure 4.8, which measures the average bits transmitted per tag, it is clear that the improved algorithm outperforms the rest of the algorithms with either requiring fewer bits than the rest or roughly the same as jump and dynamic.

Figure 4.8: Average number of bits used per tag. Chapter 5

Discussion

This chapter includes an analysis of the results presented in Chapter 4.

5.1 Result analysis

Looking at the comparison between regular algorithms versus their dynamic siblings, such as BSA versus DBSA and backtrack algorithm versus jump and dynamic, we can observe that the they have the same performance in the number of queries needed. This is an expected result since the queries and responses fill the same purpose. What can be seen, however, is the other expected result that the dynamic versions have a lower amount of communicated bits needed. This was also expected because the number of queries were the same but the size of queries and responses was smaller. The results of the experiments shows that the improved algorithm performs better than all the other algorithms when looking at the number of bits needed. The main point in the study by Djeddou and Benssalah was that the improved algorithm would per- form when looking at the bit usage. Comparing the improved algorithm with the BSA or DBSA shows a clear reduction of bits needed. But the difference between the improved algorithm and the backtrack and jump and dynamic is not as great. When studying the result with average queries per tag, one quickly observes that the performance of the backtrack and jump and dynamic algorithms are constant in the number of queries needed. This is due to the fact that by jumping back only one step when identifying a tag you only waste two queries; the one to identify that there is a col- lision and the one to identify the tag itself. This happens to all tags except for the last one which require only one query since there is no collision. Therefore the query com- plexity for the backtrack and jump and dynamic algorithms is 2n-1 where n is the num- ber of tags read. Looking from the problem statements point of view, the improved algorithm is proven to scale very well, even with a bigger number of colliding tags. One thing that is inter- esting is that the density affects the algorithm’s performance in a significant way. For example, the average queries per tag is lower at 60000/16 than on any other test data, even 50/6. The density for 60000/16 can be calculated by 60000/216 ≈ 92% which means that 92% of the possible test data is populated. As the density drops, the algorithm needs more queries per tag to resolve the collision. 40000/32 is a good example for this, which has a very low density of 40000/232  1%. The reason for the density’s impact on the improved algorithms performance regarding queries is the fact that it uses these preset

24 CHAPTER 5. DISCUSSION 25

values of 00, 01, 10, and 11 when the reader finds two collision bits. When the density of tags is approaching the max capacity the probability of there existing an identifica- tion number that has these exact values increases, meaning that there are fewer wasted queries where no tag responds. The reason the improved algorithm outperforms the backtrack and jump and dynamic algorithms is because the latter two use the jumpback technique with binary search elements which is more flexible but only handles one bit at a time. Since the improved algorithm starts by identifying tags with lower values it does not waste queries when several tags would respond, for example when two colli- sion bits are detected, using improved algorithm would try 00 first and those tags would be identified so they don’t respond when querying 01. Using backtrack and jump and dynamic algorithms would first try 01 and then both all tags with 01 and 00 in those places would respond. Therefore the preset value to loop over can sometimes be more efficient in queries when the number of tags approach maximum capacity. The resulting graphs show the pattern that the regular BSA and DBSA perform worse than the other algorithms in all experiments. They should therefore not be used in large scale environments when other algorithms are available. The backtracking, jump-dynamic and improved algorithms are all similar in scaling and performance, where the difference in is relatively small. The improved algorithm is superior compared to backtrack and jump-dynamic on high to medium dense tag data, but it is out-scaled by the other two when the density decreases into the lower percentage densities. In the study by Djed- dou and Benssalah they stated that they compared the improved algorithm to BSA and DBSA, which our study would definitely agree with the fact that the improved algo- rithm is an algorithm with improved performance. However, observed in their study is that their BSA and DBSA does not reset its queries to the very initial query and uti- lizes a backtrack mechanism. With this in mind it is hard to actually make a conclusion to whether or not the improved algorithm is superior to the backtrack or jump and dy- namic algorithms.

5.2 Method analysis

A software simulation in Java was used to gather information about the performance of different anti-collision algorithms. Many experiments use software simulations when calculating the required amount of queries and bits in order to identify all tags in the reader’s range. The reasoning behind not using actual RFID hardware is because it is not needed when calculation number of queries and bits. Experiments using some form of time measurement needs RFID hardware in order to properly measure real time. Time as a measurement is an important part of RFID anti-collision algorithm research since time needed to physically identify tags in the reader’s range is a large part of what the research is about. However, the number of queries and bits gives a sufficient indication of what algorithms are well suited for efficient communication between reader and tags. The test data used a random pattern between the identification number of different tags which represents a real life scenario where the tags read doesn’t necessarily follow a pattern. The size of the identification numbers ranged from 6 bits up to 32 bits to repre- sent many usages of RFID. The number of tags ranged from 50 to 80000 with most using either 16 or 32 bit identification number to represent many possible scenarios in which tag collision might become a problem. 26 CHAPTER 5. DISCUSSION

5.2.1 Source of errors RFID is a relatively new subject and different sources have different explanations of the algorithms. This leads to the fact that there might be some inconsistencies with other studies regarding the implementation of the algorithms. It was not fully explained how the improved algorithm would be implemented which led a few corner cases being inter- preted from their explanation.

5.3 Future research

The use of arrays to represent identification numbers was an easy way to manipulate different bits but turned out to be slow when measuring big sets of tags and large iden- tification numbers. Measuring bigger sets of tags and larger identification numbers than measured in this experiment is not recommended with the code used because of the time it will take for certain algorithms to present the resulting data. Especially the dynamic algorithms used a lot of time because of the extra overhead used in the code to calculate what request the reader needed to send and what response the tag should respond with. For further studies, code with integer comparisons and less overhead is recommended in order to measure large scale RFID environments with bigger sets of tags and larger iden- tification numbers. For analyzing the complexity of all algorithms as the parameters scale one should use linearly scaling parameters as it helps with discovering patterns. Chapter 6

Conclusion

The algorithm proposed by Djeddou’s and Benssalah’s performs much better than the regular binary search algorithms. It scales well with increased number of tags in a colli- sion and is a feasible algorithm to use in large scale RFID environments. Algorithms us- ing the backtrack mechanic has roughly the same performance as Djeddou’s and Benssalah’s algorithm and are therefore equally useful. However, Djeddou’s and Benssalah’s algo- rithm, proved to be more efficient when the number of tags in the collision approached the maximum amount possible for a given identification number size and is preferred when such circumstances appear. When choosing between algorithms in general, one should opt for an algorithm that does not reset its query to the very start like the regu- lar binary algorithm does. However, the difference between backtracking algorithms and Djeddou’s and Benssalah’s is not noticeable enough to declare one as being better than the other, thus both are feasible algorithms for practical use. Further studies should be made in the subject since it is likely that there are or will exist better performing algo- rithms. It is also likely that the technology will gain more and more popularity during the next couple of years. Contactless identification speeds up the process of identifying items in a significant way, and as proven in this report, there are good possibilities for opti- mizing the algorithms even more and perform at a high level of throughput. Since the technology is so versatile, the possibilities of implementation are practically unlimited.

27 Bibliography

[1] Raghu Das and Peter Harrop. RFID Forecasts, Players and Opportunities 2016-2026, volume 1. Research and Markets, 10 2015.

[2] Khelladi Djeddou and Benssalah. Improved rfid anti-collision algorithm. AEUE - International Journal of Electronics and Communications, 67(3):256–261, 2013.

[3] Matt Ward, Rob Van Kranenburg, and Gaynor Backhouse. Rfid: Frequency, stan- dards, adoption and innovation. JISC Technology and Standards Watch, 5, 2006.

[4] H. Landaluce, A. Perallos, L. Bengtsson, and I. J. G. Zuazola. Simplified computa- tion in memoryless anti-collision rfid identification protocols. Electronics Letters, 50 (17):1250–1252, 2014.

[5] Haifeng Wu and Yu Zeng. Bayesian tag estimate and optimal frame length for anti- collision aloha rfid system. In IEEE Transactions on Automation Science and Engineering, pages 963–969, 2010.

[6] Duanfeng Xia and Qi Li. A routing protocol for congestion control in rfid wireless sensor networks based on stackelberg game with sleep mechanism. In 2013 12th In- ternational Symposium on Distributed Computing and Applications to Business, Engineering & Science, pages 207–211, 2013.

[7] X. Huang and S. Le. Efficient dynamic framed slotted aloha for rfid passive tags. In The 9th International Conference on Advanced Communication Technology, volume 1, pages 94–97, Feb 2007.

[8] Y. Qian and X. Zhu. The design of coder and decoder based on iso18000 x2013;4. In 2012 2nd International Conference on Consumer Electronics, Communications and Networks (CECNet), pages 2150–2152, 2012.

[9] Weidong Wang, Yinghai Zhang, Yuan Sang, and Shoufeng Wang. Analysis of anti- collision algorithms in rfid system. In 2009 IEEE International Conference on Communi- cations Technology and Applications, pages 58–62, 2009.

[10] Y. Yongkang, . Chunsheng, Z. Tuanfeng, L. Xiang, and H. Liping. Improvement on rfid-based binary anti-collision algorithm. In 2012 International Conference on Computer Science and Service System, pages 515–518, 2012.

[11] Ziqiang Yu and Xianqiang Liu. Improvement of dynamic binary search algorithm used in rfid system. In Proceedings of 2011 Cross Strait Quad-Regional Radio Science and Wireless Technology Conference, volume 2, pages 1046–1049, 2011.

28 BIBLIOGRAPHY 29

[12] Xiaolin Jia and Quanyuan Feng. An efficient anti-collision protocol for rfid tag iden- tification. IEEE COMMUNICATIONS LETTERS, 14(11), 2010. Appendix A

Code

30 1 import java . u t i l . ; 2 ∗ 3 / The environment which creates the tags and readers and tests ∗ them / 4 public class∗ BenchEnvironment 5 int numberOfTags = 10000; { 6 int numberOfBitsInId = 32; // CONDITION: 2ˆnumberOfBitsInId > numberoftags 7 int s i z e O f I d ; 8 Random randomGenerator = new Random ( ) ; 9 10 TreeSet generatedUniqueIds ; 11 Tag [ ] t a g s ; 12 Reader b s a r e a d e r ; //using regular binary search 13 Reader dbsareader ; //using dynamic binary search 14 Reader backtrackreader; //using backtracking algorithm 15 Reader j n d r e a d e r ; //using jump and dynamic 16 Reader impreader ; //using the improved algorithm 17 18 public static void main(String [] args) 19 new BenchEnvironment() ; { 20 21 } 22 public BenchEnvironment() 23 { 24 runTests ( 5 0 , 6) ; 25 runTests ( 5 0 , 16) ; 26 runTests (200 , 8) ; 27 runTests (200 , 10) ; 28 runTests (1000 , 16) ; 29 runTests (1000 , 32) ; 30 runTests (5000 , 16) ; 31 runTests (5000 , 32) ; 32 runTests(10000, 16); 33 runTests(10000, 32); 34 runTests(20000, 16); 35 runTests(20000, 32); 36 runTests(40000, 16); 37 runTests(40000, 32); 38 runTests(60000, 16); 39 runTests(60000, 32); 40 runTests(80000, 32); 41 runTests(100000, 32); 42 43 44 } 45 / Runs all algorithms on this set of tags / 46 public∗ void runTests ( int numberOfTags , int ∗numberOfBitsInId) 47 //Set up the tags { 48 this .numberOfTags = numberOfTags; 49 this .numberOfBitsInId = numberOfBitsInId; 50 this .sizeOfId = (( int )Math.pow(2, numberOfBitsInId)) 1; 51 generatedUniqueIds = new TreeSet(); − 52 t a g s = new Tag[numberOfTags ]; 53 generateID ( ) ; 54 generateTags ( ) ; 55 56 System.out.println(” ”); 57 System.out.println(”Test with ” + numberOfTags + ” tags with ” + 58 numberOfBitsInId+”bitsinID”); 59 System.out.println(”Binary Search Algorithm: ”); 60 b s a r e a d e r = new BSAReader(tags , numberOfBitsInId) ; 61 bsareader.identifyTags(); 62 bsareader.calculateResults(); 63 a c t i v a t e T a g s ( ) ; 64 System.out.println(); 65 66 System.out.println(”Dynamic Binary Search Algorithm: ”); 67 dbsareader = new DBSAReader(tags , numberOfBitsInId) ; 68 dbsareader.identifyTags(); 69 dbsareader.calculateResults(); 70 a c t i v a t e T a g s ( ) ; 71 System.out.println(); 72 73 74 System.out.println(”Backtracking Algorithm: ”); 75 b a c k t r a c k r e a d e r = new BackTrackReader(tags , numberOfBitsInId) ; 76 backtrackreader.identifyTags(); 77 backtrackreader.calculateResults(); 78 a c t i v a t e T a g s ( ) ; 79 System.out.println(); 80 81 82 System.out.println(”Jump and Dynamic Algorithm: ”); 83 j n d r e a d e r = new JumpAndDynamicReader(tags , numberOfBitsInId ); 84 jndreader.identifyTags(); 85 jndreader.calculateResults(); 86 a c t i v a t e T a g s ( ) ; 87 System.out.println(); 88 89 90 System.out.println(”Improved Algorithm: ”); 91 impreader = new ImprovedReader(tags , numberOfBitsInId); 92 impreader.identifyTags(); 93 impreader.calculateResults(); 94 a c t i v a t e T a g s ( ) ; 95 System.out.println(); 96 97 98 99 } 100 public void activateTags() 101 for ( int i = 0 ; i < tags.length;{ i++) 102 t a g s [ i ] . a c t i v a t e ( ) ; { 103 104 } 105 } 106 / Generate this test’s unique ids 107 ∗ Random complexity (avoid with large set and many tags) / 108 public∗ void generateID() ∗ { 109 //TreeSet only takes unique values 110 while (generatedUniqueIds. size () < numberOfTags) 111 generatedUniqueIds.add(randomGenerator.nextInt(sizeOfId{ ) +1) ; 112 113 } 114 } 115 / Create a Tag for all unique ids / 116 public∗ void generateTags() ∗ 117 int count = 0 ; { 118 for ( int id : generatedUniqueIds) 119 t a g s [ count ] = new Tag(numberOfBitsInId{ , id); 120 count++; 121 122 } 123 } } 1 import java . u t i l . ; 2 public abstract class∗ Reader 3 Tag[] tags; { 4 int idLength ; 5 6 TreeSet currentCollisionBits ; //All bitindexes that differ from query 7 TreeSet currentNonCollisionBits ; //Used to check if more bits collide 8 9 //Algorithm helping variables 10 char [] responseToCompare; 11 int tagsFound = 0; 12 Tag lastRespondingTag; 13 14 //Result helping variables 15 long currentNumberOfBits = 0; 16 long currentNumberOfQueries = 0; 17 18 // RESULTING DATA 19 double averageNumberOfQueries = 0; 20 double averageNumberOfBits = 0; 21 22 / Identifies the set of tags with an RFID anti c o l l i s i o n ∗ a l g o r i t h m / − 23 public abstract∗ void identifyTags(); 24 25 / Average number of queries sent to identify one tag / 26 public∗ double getQueryAverage() ∗ 27 return averageNumberOfQueries{ ; 28 29 } 30 / Average number of bits required to identify one tag / 31 public∗ double getBitAverage() ∗ 32 return averageNumberOfBits{ ; 33 34 } 35 36 / Calculating the average result / 37 protected∗ void calculateResults() ∗ 38 System.out.println(”Total number{ of queries: t t ” + currentNumberOfQueries) ; \ \ 39 System.out.println(”Total number of bits: t t t ” + currentNumberOfBits) ; \ \ \ 40 averageNumberOfBits = currentNumberOfBits / (( double ) t a g s . l e n g t h ) ; 41 averageNumberOfQueries = currentNumberOfQueries / (( double ) tags.length); 42 System.out.println(”Average number of queries t t ” + averageNumberOfQueries) ; \ \ 43 System.out.println(”Average number of bits: t t ” + averageNumberOfBits) ; \ \ 44 45 } 46 47 / Resets or initiates collision bit sets / 48 protected∗ void resetCollisionBits() ∗ { 49 currentCollisionBits = new TreeSet(); 50 currentNonCollisionBits = new TreeSet(); 51 for ( int i = 0 ; i < idLength; i++) 52 currentNonCollisionBits.add(i);{ 53 54 } 55 } 56 / Sends the query to the cloud of tags / 57 public∗ int sendQuery ( char [ ] query ) ∗ 58 currentNumberOfBits += query.length;{ 59 currentNumberOfQueries++; //One query has succesfully been s e n t 60 //System.out.println(”Q ” + currentNumberOfQueries + ”: t ” + String.valueOf(query)); \ 61 62 boolean firstResponse = true ; 63 int numberOfReturns = 0; 64 char [] response; 65 for ( int i = 0 ; i < tags.length; i++) 66 response = getResponseFromTag(tags[i],{ query); 67 i f (response != null ) //null if no response 68 //System.out. println(”{ > t” + String.valueOf( response)); \ 69 //System.out.println(”RESPONSE: ” + tags[i ]) ; 70 lastRespondingTag=tags[i]; 71 i f (firstResponse) 72 //First response{ used for comparison with other responses 73 responseToCompare=response; 74 f i r s t R e s p o n s e = f a l s e ; 75 else 76 } //The{ rest used to ACTIVE TAGSfind collision 77 checkCollisionBits(response); 78 79} numberOfReturns++; 80 currentNumberOfBits+= response.length; //The bits returned 81 82 } 83 }return numberOfReturns ; 84 85 } 86 public abstract void checkCollisionBits( char [] response); 87 88 public abstract char [] getResponseFromTag(Tag tag , char [ ] query ) ; 89 } 1 import java . u t i l . ; 2 ∗ 3 / A reader using the regular Binary Search Algorithm / 4 public∗ class BSAReader extends Reader ∗ 5 { 6 7 public BSAReader(Tag[] tags , int numberOfBitsInId) 8 this .tags = tags; { 9 idLength = numberOfBitsInId; 10 responseToCompare = new char [idLength ]; 11 12 } 13 / Uses the binary search algorithm to identify 14 ∗ the tags in the tag array. First query will be a bunch of ’1’ ∗ s 15 An depending on collision bits in the responses the next ∗ query is formed 16 When only one tag responds the tag is identified / 17 ∗public void identifyTags() ∗ 18 char [ ] query = new char{ [idLength ]; 19 resetCollisionBits(); 20 while (tagsFound != tags.length) //While tags still responding { 21 Arrays.fill(query,’1’); //Reset query 22 while (sendQuery(query) > 1) //While more than one tag responds { 23 query=findNewQuery(query); //Update query according to collisions 24 resetCollisionBits(); 25 26 }//System.out.println(”Tag identified: ” + tagsFound + ” ” + lastRespondingTag.toString()); 27 lastRespondingTag.deactivate();− 28 tagsFound++; 29 30 } 31 } 32 33 34 35 36 / Uses a previous query and biggest collision bit to find new ∗ query / 37 / Fills the∗ next query with the same bits as previous query up ∗ u n t i l 38 the first collision bit which will be set to 0 and the rest ∗ of the collision 39 bits to 1 while the non collision bit stays the same as the ∗ responses / 40 private char []∗ findNewQuery( char [ ] query ) 41 for ( int i: currentNonCollisionBits) { 42 query[i] =responseToCompare[i];{ 43 44 } 45 boolean f i r s t = true ; 46 for ( int i: currentCollisionBits) 47 i f ( f i r s t ) { { 48 query [ i ] = ’ 0 ’ ; 49 f i r s t = f a l s e ; 50 else 51} query{ [ i ] = ’ 1 ’ ; 52 53 } 54 }return query ; 55 56 } 57 / Returns the appropriate response from the tag depending 58 ∗on which algorith is used / 59 ∗public char [] getResponseFromTag(Tag∗ tag , char [ ] query ) 60 return tag .respondBSAQuery(query) ; { 61 62 } 63 / Check from the current non collision bits which might ∗ c o l l i d e / 64 / First response∗ (responseToCompare) from a tag will be ∗ compared to all other ids. 65 Note that this works because they are strings of binaries which means t h a t 66 if two bits at one position index differs between two responses , then one of them also 67 differs from the response we compare with. 68 / 69 ∗public void checkCollisionBits( char [] response) 70 I t e r a t o r it = currentNonCollisionBits.iterator();{ 71 while (it .hasNext()) 72 int i = it.next();{ 73 i f (responseToCompare[ i ] != response[ i ]) 74 currentCollisionBits.add(i); //Bit{ collision 75 i t . remove ( ) ; 76 77 } 78 } 79 } 80 } 1 import java . u t i l . ; 2 ∗ 3 / A reader using the Dynamic Binary Search Algorithm / 4 public∗ class DBSAReader extends Reader ∗ 5 { 6 7 public DBSAReader(Tag[] tags , int numberOfBitsInId) 8 this .tags = tags; { 9 idLength = numberOfBitsInId; 10 responseToCompare = new char [idLength ]; 11 12 } 13 / Uses the dynamic binary search algorithm to identify all ∗ t a g s 14 First query and response is the same length of all tags. ∗ Depending on 15 the collision bits in responses the reader sends only the ∗ necessary 16 part of the query and recieves only the complenting necessary ∗ part 17 from the tags / 18 ∗public void identifyTags()∗ 19 char [ ] query = new char{ [idLength ]; 20 resetCollisionBits(); 21 while (tagsFound != tags.length) //While tags still responding { 22 query = new char [idLength ]; 23 Arrays.fill(query,’1’); //Reset query 24 while (sendQuery(query) > 1) //While more than one tag responds { 25 query=findNewQuery(query); //Update query according to collisions 26 resetCollisionBits(); 27 28 }//System.out.println(”Tag identified: ” + tagsFound + ” ” + lastRespondingTag.toString()); 29 lastRespondingTag.deactivate();− 30 tagsFound++; 31 32 } 33 } 34 35 36 / Uses a previous query and biggest collision bit to find new ∗ query / 37 / Fills the∗ next query with the same bits as previous query up ∗ u n t i l 38 the first collision bit which will be set to 0 and returns it ∗ . 39 Dynamic BSA does not need the query of the same length as id ∗ / 40 private∗ char [] findNewQuery( char [ ] query ) 41 i f (currentCollisionBits. size() < 1) { 42 System.out.println(”No collision{ bits when searching for new query”); 43 return null ; 44 } 45 char [] newQuery = new char [currentCollisionBits. first() + 1 ] ; 46 for ( int i = 0 ; i < newQuery. length 1; i ++) //up until the l a s t index − { 47 i f (responseToCompare. length == idLength) 48 //First query to scope the next query{ 49 newQuery[i] =responseToCompare[i]; 50 else i f ( i >= query.length) 51} newQuery[i] =responseToCompare[i{ query.length ]; 52 else − 53} newQuery[i]=query[i];{ 54 55 } 56 newQuery[newQuery.length} 1] = ’ 0 ’ ; 57 − 58 return newQuery ; 59 60 } 61 62 / Returns the appropriate response from the tag depending 63 ∗on which algorith is used / 64 ∗public char [] getResponseFromTag(Tag∗ tag , char [ ] query ) 65 return tag .respondDBSAQuery(query) ; { 66 67 } 68 / Check from the current non collision bits which might ∗ c o l l i d e / 69 / First response∗ (responseToCompare) from a tag will be ∗ compared to all other ids. 70 Note that this works because they are strings of binaries which means t h a t 71 if two bits at one position index differs between two responses , then one of them also 72 differs from the response we compare with. 73 / 74 ∗public void checkCollisionBits( char [] response) 75 int querySize = idLength response.length; { 76 for ( int i = 0 ; i < response.length;− i++) 77 i f (responseToCompare[ i ] != response[{ i ]) 78 currentCollisionBits.add(querySize+i);{ 79 currentNonCollisionBits.remove(querySize+i); 80 81 } 82 } 83 } 84 } 1 import java . u t i l . ; 2 ∗ 3 / A reader using the jumpback algorithm to identify tags / 4 public∗ class BackTrackReader extends Reader ∗ 5 { 6 TreeSet backTrackBits ; //Bit indexes where branches start 7 8 public BackTrackReader(Tag[] tags , int numberOfBitsInId) 9 this .tags = tags; { 10 idLength = numberOfBitsInId; 11 responseToCompare = new char [idLength ]; 12 backTrackBits = new TreeSet(); 13 14 } 15 / Using the backtrack method by not return to the very first ∗ query 16 that contains only ones. It instead jumps back to collision ∗ b i t s 17 where it still has not checked with all values. / 18 ∗public void identifyTags() ∗ 19 char [ ] query = new char{ [idLength ]; 20 resetCollisionBits(); 21 while (tagsFound != tags.length) //While tags still responding { 22 query=backTrack(query); //Jump back to last branch 23 while (sendQuery(query) > 1) //While more than one tag responds { 24 query=findNewQuery(query); //Update query according to collisions 25 resetCollisionBits(); 26 27 }//System.out.println(”Tag identified: ” + tagsFound + ” ” + lastRespondingTag.toString()); 28 lastRespondingTag.deactivate();− 29 tagsFound++; 30 31 } 32 } 33 / Returns a new query using backtracking to jump back to 34 ∗a branch in the search tree which has not been exhausted. 35 ∗ This is done by keeping track of the bit position of where ∗ the 36 branches start and changing the bit where the branch started. 37 ∗ Branches start with a 0, so 1 is placed at the branch start ∗ in order 38 to exhaust the other branch. Algorithm correctness is ∗ guaranteed by 39 also changing the rest of the branch bits to 1 for all tags ∗ to respond . 40 / 41 ∗public ∗ char [] backTrack( char [ ] query ) 42 char [] newQuery = query; { 43 i f (backTrackBits. size() == 0) 44 Arrays.fill(newQuery, ’1’);{ 45 else } { 46 int lastBackTrack = backTrackBits.pollLast(); 47 for ( int i = lastBackTrack; i < newQuery. length ; i++) 48 newQuery [ i ] = ’ 1 ’ ; { 49 50 } 51 }return newQuery ; 52 53 54 } 55 56 57 / Uses a previous query and biggest collision bit to find new ∗ query / 58 / Fills the∗ next query with the same bits as previous query up ∗ u n t i l 59 the first collision bit which will be set to 0 and the rest ∗ of the collision 60 bits to 1 while the non collision bit stays the same as the ∗ responses / 61 private char []∗ findNewQuery( char [ ] query ) 62 for ( int i: currentNonCollisionBits) { 63 query[i] =responseToCompare[i];{ 64 65 } 66 boolean f i r s t = true ; 67 for ( int i: currentCollisionBits) 68 i f ( f i r s t ) { 69 query{ [ i ] = ’ 0 ’ ; 70 backTrackBits.add(i); 71 f i r s t = f a l s e ; 72 else 73} query{ [ i ] = ’ 1 ’ ; 74 75 } 76 }return query ; 77 78 } 79 / Returns the appropriate response from the tag depending 80 ∗on which algorith is used / 81 ∗public char [] getResponseFromTag(Tag∗ tag , char [ ] query ) 82 return tag .respondBSAQuery(query) ; { 83 84 } 85 / Check from the current non collision bits which might ∗ c o l l i d e / 86 / First response∗ (responseToCompare) from a tag will be ∗ compared to all other ids. 87 Note that this works because they are strings of binaries which means t h a t 88 if two bits at one position index differs between two responses , then one of them also 89 differs from the response we compare with. 90 / 91 ∗public void checkCollisionBits( char [] response) 92 I t e r a t o r it = currentNonCollisionBits.iterator();{ 93 while (it .hasNext()) 94 int i = it.next();{ 95 i f (responseToCompare[ i ] != response[ i ]) 96 currentCollisionBits.add(i); //Bit{ collision 97 i t . remove ( ) ; 98 99 } 100 } 101 } 102 } 1 import java . u t i l . ; 2 ∗ 3 / A reader using the Jump and Dynamic algorithm / 4 public∗ class JumpAndDynamicReader extends Reader ∗ 5 { 6 TreeSet backTrackBits ; 7 8 public JumpAndDynamicReader(Tag[] tags , int numberOfBitsInId) 9 this .tags = tags; { 10 idLength = numberOfBitsInId; 11 responseToCompare = new char [idLength ]; 12 backTrackBits = new TreeSet(); 13 14 } 15 / Uses the Jump and Dynamic algorithm to identify all tags. 16 ∗ Using the backtrack method by not return to the very first ∗ query 17 that contains only ones. It instead jumps back to collision ∗ b i t s 18 where it still has not checked with all values. It also uses ∗ the 19 Dynamic BSA to not send whole queries and receive whole ∗ responses . / 20 public void identifyTags()∗ 21 char [ ] query = new char{ [idLength ]; 22 resetCollisionBits(); 23 while (tagsFound != tags.length) //While tags still responding { 24 query=backTrack(query); //Jump back to next branch 25 while (sendQuery(query) > 1) //While more than one tag responds { 26 query=findNewQuery(query); //Update query according to collisions 27 resetCollisionBits(); 28 29 }//System.out.println(”Tag identified: ” + tagsFound + ” ” + lastRespondingTag.toString()); 30 lastRespondingTag.deactivate();− 31 tagsFound++; 32 33 } 34 } 35 / 36 /∗ 37 ∗public char [] backTrack( char [ ] query ) 38 i f (backTrackBits. size() == 0) { 39 char [] newQuery = new char{ [idLength ]; 40 Arrays.fill(newQuery, ’1’); 41 return newQuery ; 42 43 }int lastBackTrack = backTrackBits.pollLast(); 44 char [] newQuery = new char [ lastBackTrack+1]; 45 for ( int i = 0 ; i < lastBackTrack; i++) 46 newQuery[i]=query[i]; { 47 48 newQuery[lastBackTrack]} = ’1’; 49 return newQuery ; 50 51 } 52 53 54 / Uses a previous query and biggest collision bit to find new ∗ query / 55 / Fills the∗ next query with the same bits as previous query up ∗ u n t i l 56 the first collision bit which will be set to 0 and returns it ∗ . 57 Dynamic BSA does not need the query of the same length as id ∗ / 58 private∗ char [] findNewQuery( char [ ] query ) 59 i f (currentCollisionBits. size() < 1) { 60 System.out.println(”No collision{ bits when searching for new query”); 61 return null ; 62 63 char} [] newQuery = new char [currentCollisionBits. first() + 1 ] ; 64 for ( int i = 0 ; i < newQuery. length 1; i ++) //up until the l a s t index − { 65 i f (responseToCompare. length == idLength) 66 //First query will return full length{ response 67 newQuery[i] =responseToCompare[i]; 68 else i f ( i >= query.length) 69 } //Fill new query with the{ non collision bits up u n t i l . 70 newQuery[i] =responseToCompare[i query.length ]; 71 else − 72 } //Start{ of query will the same as before 73 newQuery[i]=query[i]; 74 75 } 76 newQuery[newQuery.length} 1] = ’ 0 ’ ; 77 backTrackBits.add(newQuery.length− 1) ; 78 − 79 return newQuery ; 80 81 } 82 83 / Returns the appropriate response from the tag depending 84 ∗on which algorith is used / 85 ∗public char [] getResponseFromTag(Tag∗ tag , char [ ] query ) 86 return tag .respondDBSAQuery(query) ; { 87 88 } 89 / Check from the current non collision bits which might ∗ c o l l i d e / 90 / First response∗ (responseToCompare) from a tag will be ∗ compared to all other ids. 91 Note that this works because they are strings of binaries which means t h a t 92 if two bits at one position index differs between two responses , then one of them also 93 differs from the response we compare with. 94 / 95 ∗public void checkCollisionBits( char [] response) 96 int querySize = idLength response.length; { 97 for ( int i = 0 ; i < response.length;− i++) 98 i f (responseToCompare[ i ] != response[{ i ]) 99 currentCollisionBits.add(querySize+i);{ 100 currentNonCollisionBits.remove(querySize+i); 101 102 } 103 } 104 } 105 } 1 import java . u t i l . ; 2 ∗ 3 / A reader using the algorithm presented by Benssalah, Djeddou and ∗ Khelladi with 4 preset loops / 5 ∗public class ImprovedReader∗ extends Reader 6 { 7 8 public ImprovedReader(Tag[] tags , int numberOfBitsInId) 9 this .tags = tags; { 10 idLength = numberOfBitsInId; 11 responseToCompare = new char [idLength ]; 12 13 } 14 / Uses the algorithm with preset loops. When two or more ∗ collision bits 15 occur in responses, the reader creates a for loop with all ∗ p o s s i b l e 16 binary values in those to collision bits. This will hopefully ∗ reduce the 17 amount of tags that responds and will therefore decrease the ∗ t o t a l b i t s 18 f l o w . / 19 ∗public void∗ identifyTags() 20 char [ ] query = new char{ [idLength ]; 21 Arrays.fill(query,’1’); //Reset query 22 queryRepeater(query); 23 24 25 } 26 / Sends queries and handles the preset loops that defines the ∗∗ improved 27 anti collision algorithm. 28 ∗ Taking the two highest collision bits from a query and ∗ letting those 29 bits take values (0,0) (0,1) (1,0) (1,1), the lower bits ∗ after the second collision bit 30 sets as value 1 and then sending the query recursively and ∗ repeating the process 31 If there are zero or one collision bits the algorithm ∗ returns. One collision bit means 32 that we have found two tags that differ only at the ∗ collision bit index and zero collision 33 bits means that one tag is identified. If one collision bit ∗ is found the two tags will 34 be identified using regular binary search. 35 ∗/ 36 public∗ void queryRepeater( char [ ] query ) 37 resetCollisionBits(); { 38 int numberOfResults = sendQuery(query); 39 i f (numberOfResults == 0) 40 return ; { 41 42 } 43 int numberOfCollisionBits = currentCollisionBits. size(); 44 i f (numberOfCollisionBits == 0) 45 lastRespondingTag.deactivate();{ 46 tagsFound++; 47 return ; 48 else i f (numberOfCollisionBits == 1) 49 } int collisionBit = currentCollisionBits.{ first(); 50 query[collisionBit]=’0’; 51 sendQuery ( query ) ; 52 lastRespondingTag.deactivate(); 53 54 query[collisionBit]=’1’; 55 sendQuery ( query ) ; 56 lastRespondingTag.deactivate(); 57 tagsFound+=2; 58 return ; 59 else 60 } int{ firstCollisionBit = currentCollisionBits.pollFirst (); 61 int secondCollisionBit = currentCollisionBits.pollFirst (); 62 for ( char i = 0 ; i <= 1 ; i ++) 63 for ( char j = 0 ; j <= 1 ;{ j++) 64 for ( int k = 0 ; k < secondCollisionBit;{ k++) 65 query[k]=responseToCompare[k]; { 66 67} query[firstCollisionBit]=( char ) ( ’ 0 ’ + i ) ; // Ascii for 0 or 1 depending on i 68 query[secondCollisionBit]=( char ) ( ’ 0 ’ + j ) ; // Ascii for 0 or 1 depending on j 69 for ( int k = secondCollisionBit+1; k < query . l e n g t h ; k++) 70 query [ k ] = ’{ 1 ’ ; 71 72} queryRepeater(query); 73 74 } 75 } 76 } 77 } 78 79 80 81 / Uses a previous query and biggest collision bit to find new ∗ query / 82 / Fills the∗ next query with the same bits as previous query up ∗ u n t i l 83 the first collision bit which will be set to 0 and the rest ∗ of the collision 84 bits to 1 while the non collision bit stays the same as the ∗ responses / 85 private char []∗ findNewQuery( char [ ] query ) 86 for ( int i: currentNonCollisionBits) { 87 query[i] =responseToCompare[i];{ 88 89 } 90 boolean f i r s t = true ; 91 for ( int i: currentCollisionBits) 92 i f ( f i r s t ) { 93 query{ [ i ] = ’ 0 ’ ; 94 f i r s t = f a l s e ; 95 else 96} query{ [ i ] = ’ 1 ’ ; 97 98 } 99 }return query ; 100 101 } 102 103 / Returns the appropriate response from the tag depending 104 ∗on which algorith is used / 105 ∗public char [] getResponseFromTag(Tag∗ tag , char [ ] query ) 106 return tag .respondBSAQuery(query) ; { 107 108 } 109 / Check from the current non collision bits which might ∗ c o l l i d e / 110 / First response∗ (responseToCompare) from a tag will be ∗ compared to all other ids. 111 Note that this works because they are strings of binaries which means t h a t 112 if two bits at one position index differs between two responses , then one of them also 113 differs from the response we compare with. 114 / 115 ∗public void checkCollisionBits( char [] response) 116 I t e r a t o r it = currentNonCollisionBits.iterator();{ 117 while (it .hasNext()) 118 int i = it.next();{ 119 i f (responseToCompare[ i ] != response[ i ]) 120 currentCollisionBits.add(i); //Bit{ collision 121 i t . remove ( ) ; 122 123 } 124 } 125 } 126 } 1 2 / A tag that responds to queries from the reader / 3 public∗ class Tag ∗ 4 private boolean{ a c t i v e = true ; 5 char [ ] i d ; 6 7 public Tag ( int s i z e , long idNumber ) 8 createId(size,idNumber); { 9 10 } 11 / Sets up the id from a given long 12 ∗ Will prepend 0s if the number of bits doesn’t match / 13 public∗ void c r e a t e I d ( int s i z e , long idNumber ) ∗ 14 / We need to add 0s to the start of id if{ the idNumber ∗ doesn ’ t 15 fill the id array / 16 i d∗ = new char [ s i z e ] ; ∗ 17 S t r i n g B u i l d e r s = new StringBuilder(Long. toBinaryString( idNumber)) ; 18 int count = 0 ; 19 for ( int i = 0 ; i < id.length; i++) 20 i f ( i >= s i z e s.length()) { 21 id[i]=s.charAt(count);− { 22 count++; 23 else 24} i d{ [ i ] = ’ 0 ’ ; 25 26 } 27 } 28 } 29 / Responds a dynamic bsa call which is only the part of the id 30 ∗ which is the part of the id that complements the query if the 31 ∗ query would make up the top bits in the id. 32 ∗ Example: query(101) id([101]001) > reponse(001) / 33 ∗public char [] respondDBSAQuery( char−[] dynQuery) ∗ 34 i f (dynQuery.length != id.length) { 35 char [] bsaQuery = new char [id.length];{ 36 for ( int i = 0 ; i < bsaQuery.length; i++) 37 bsaQuery [ i ] = i < dynQuery.length ?{ dynQuery[i] : ’ 1 ’ ; 38 39 char} [] bsaResponse = respondBSAQuery(bsaQuery); 40 i f (bsaResponse == null ) 41 return null ; { 42 43 char} [] dynResponse = new char [ i d . l e n g t h dynQuery . l e n g t h ] ; − 44 for ( int i = 0 ; i < dynResponse.length; i++) 45 dynResponse[i] = bsaResponse[dynQuery.length{ + i]; 46 47 }return dynResponse ; 48 else 49 } return{ respondBSAQuery(dynQuery) ; 50 51 } 52 } 53 / Returns with whole id if the id is equal or less than id ∗ 54 returns null if not 55 ∗ If tag is inactive it won’t respond / 56 public∗ char [] respondBSAQuery( char [ ] query∗ ) 57 i f ( ! a c t i v e ) { 58 return{ null ; 59 60 }i f (query.length != id.length) 61 System.err.println(”Size{ of tag: ”+ id.length +” does not match ” + query.length); 62 return null ; 63 64 }int size = id.length; 65 66 for ( int i = 0 ; i < s i z e ; i ++) 67 //Check if it doesn’t match{ 68 i f (id[i] != query[i]) 69 // 0 < 1 even in{ ascii 70 i f ( i d [ i ] < query [ i ] ) 71 return i d ; { 72 else 73 } return{ null ; 74 75 } 76 } 77 }//All matched 78 return i d ; 79 80 } 81 @Override 82 public String toString() 83 return String.valueOf(id);{ 84 85 } 86 public void a c t i v a t e ( ) 87 a c t i v e = true ; { 88 89 } 90 public void deactivate() 91 a c t i v e = f a l s e ; { 92 93 } 94 public boolean i s A c t i v e ( ) 95 return a c t i v e ; { 96 97 } } Appendix B

Result data

51 #Tags Bits BSA #Queries #Bits Avg. Queries Avg. Bits 50/6 6 192,00 12858,00 3,84 257,16 50/16 16 195,00 35456,00 3,90 709,12 200/8 8 958,00 248152,00 4,79 1240,76 200/10 10 1013,00 326510,00 5,07 1632,55 1000/16 16 6186,00 12342368,00 6,19 12342,36 1000/32 32 6176,00 24379360,00 6,18 24379,36 5000/16 16 36421,00 298738144,00 7,28 59747,63 5000/32 32 36684,00 606486112,00 7,34 121297,22 10000/16 16 77851,00 1200363344,00 7,79 120036,33 10000/32 32 78090,00 2388141344,00 7,81 238814,13 20000/16 16 164763,00 4799638704,00 8,24 239981,94 20000/32 32 166219,00 9655689856,00 8,31 482784,49 40000/16 16 348896,00 19184094720,00 8,72 479602,37 40000/32 32 352720,00 38485963456,00 8,82 962149,09 60000/16 16 537266,00 43201124704,00 8,95 720018,75 60000/32 32 545155,00 86316624032,00 9,09 1438610,40 80000/32 32 745988,00 153759451360,00 9,32 1921993,14 #Tags Bits DBSA #Queries #Bits Avg. Queries Avg. Bits 50/6 6 192,00 11176,00 3,84 223,52 50/16 16 195,00 32108,00 3,90 642,16 200/8 8 958,00 225461,00 4,79 1127,31 200/10 10 1013,00 297858,00 5,07 1489,29 1000/16 16 6186,00 11746338,00 6,19 11746,34 1000/32 32 6176,00 23467339,00 6,18 23467,34 5000/16 16 36421,00 285932248,00 7,28 57186,45 5000/32 32 36684,00 586368259,00 7,34 117273,65 10000/16 16 77851,00 1149623232,00 7,79 114962,32 10000/32 32 78090,00 2312348277,00 7,81 231234,83 20000/16 16 164763,00 4598706826,00 8,24 229935,34 20000/32 32 166219,00 9347666563,00 8,31 467383,33 40000/16 16 348896,00 18380694909,00 8,72 459517,37 40000/32 32 352720,00 37271705619,00 8,82 931792,64 60000/16 16 537266,00 41397095994,00 8,95 689951,60 60000/32 32 545155,00 83612431948,00 9,09 1393540,53 80000/32 32 745988,00 148927516556,00 9,32 1861593,96 #Tags Bits Backtrack #Queries #Bits Avg. Queries Avg. Bits 50/6 6 99,00 2610,00 1,98 52,20 50/16 16 99,00 7088,00 1,98 141,76 200/8 8 399,00 17144,00 2,00 55,49 200/10 10 399,00 21810,00 2,00 109,05 1000/16 16 1999,00 212784,00 2,00 212,78 1000/32 32 1999,00 424768,00 2,00 424,77 5000/16 16 9999,00 1247728,00 2,00 249,55 5000/32 32 9999,00 2498464,00 2,00 499,69 10000/16 16 19999,00 2651760,00 2,00 265,18 10000/32 32 19999,00 5318240,00 2,00 531,82 20000/16 16 39999,00 5609680,00 2,00 280,48 20000/32 32 39999,00 11276000,00 2,00 563,80 40000/16 16 79999,00 11798512,00 2,00 294,96 40000/32 32 79999,00 23829568,00 2,00 595,74 60000/16 16 119999,00 18151968,00 2,00 302,53 60000/32 32 119999,00 36868992,00 2,00 614,48 80000/32 32 159999,00 50237984,00 2,00 627,97 #Tags Bits JumpDyn #Queries #Bits Avg. Queries Avg. Bits 50/6 6 99,00 1746,00 1,98 34,92 50/16 16 99,00 4966,00 1,98 99,32 200/8 8 399,00 11098,00 2,00 55,49 200/10 10 399,00 13836,00 2,00 69,18 1000/16 16 1999,00 140996,00 2,00 141,00 1000/32 32 1999,00 312636,00 2,00 312,64 5000/16 16 9999,00 779685,00 2,00 155,94 5000/32 32 9999,00 1809154,00 2,00 361,83 10000/16 16 19999,00 1612110,00 2,00 161,21 10000/32 32 19999,00 3812490,00 2,00 381,25 20000/16 16 39999,00 3344291,00 2,00 167,21 20000/32 32 39999,00 7992527,00 2,00 399,63 40000/16 16 79999,00 6980379,00 2,00 174,51 40000/32 32 79999,00 16679230,00 2,00 416,98 60000/16 16 119999,00 10827220,00 2,00 180,45 60000/32 32 119999,00 25601314,00 2,00 426,69 80000/32 32 159999,00 34676530,00 2,00 433,46 #Tags Bits Improved #Queries #Bits Avg. Queries Avg. Bits 50/6 6 83,00 1698,00 1,66 33,96 50/16 16 121,00 5504,00 2,42 110,08 200/8 8 331,00 10672,00 1,66 53,36 200/10 10 393,00 14650,00 1,97 73,25 1000/16 16 2257,00 142176,00 2,26 142,18 1000/32 32 2321,00 284512,00 2,32 284,51 5000/16 16 10519,00 787648,00 2,10 157,53 5000/32 32 11681,00 1615104,00 2,34 323,02 10000/16 16 20155,00 1635648,00 2,02 163,56 10000/32 32 23193,00 3383808,00 2,32 338,38 20000/16 16 37887,00 3376976,00 1,89 168,85 20000/32 32 46279,00 7077920,00 2,31 353,90 40000/16 16 69069,00 6840832,00 1,73 171,02 40000/32 32 92611,00 14799264,00 2,32 369,98 60000/16 16 86495,00 10024832,00 1,44 167,08 60000/32 32 139235,00 22777984,00 2,32 379,63 80000/32 32 185629,00 30918336,00 2,32 386,48 www.kth.se