# Dictionary Encoding Based on Tagged Sentential Decision Diagrams
## 6 Conclusions  
In this paper, we have unified the definitions of semantics and syntax for SDDs, ZSDDs, and TSDDs based on Boolean functions, and our contributions are as follows: (1) We first propose an algorithm that encodes dictionaries into decision diagrams with the help of tries. To transform a dictionary into a decision diagram, we first transform the dictionary into a trie and then compress the trie, which can reduce the nodes of the trie. Then, we transform the trie into a decision diagram. Because we compress the trie, the number of operations on decision diagrams can be effectively reduced, which greatly accelerates the encoding speed. We have demonstrated through experiments that tries are of great help to our algorithm. (2) We then show that TSDDs are the decision diagrams that are more suitable for representing dictionaries. TSDDs had the smallest node count in our experiment when we encoded in a binary way and had a node count that was no more than 1.5 times that of the minimum node count among all decision diagrams in our experiments when we encoded in a one-hot way. In addition, the encoding time of TSDDs did not perform the best among all decision diagrams. However, we believe that it is worthwhile to exchange some encoding time for a smaller number of nodes. Hence, we believe that TSDDs are more suitable for representing dictionaries. (3) We also designed a decoding algorithm that transforms a decision diagram into the original dictionary. However, the decoding algorithm cannot decode decision diagrams encoded in a one-hot way.  
By using TSDDs to represent the dictionary, we can complete common operations used on a dictionary with some binary operations on TSDDs. Hence, encoding dictionaries into TSDDs is very meaningful. Our study proposes an algorithm that transforms dictionaries into decision diagrams. However, our algorithm can still be further improved. In the future,we can continue our research in the following three directions: (1) We can search for a more compact way to represent symbols and characters by Boolean functions so as to reduce the number of variables. In this way, we can make the node count of decision diagrams smaller. (2) We can further improve the algorithms for reducing the node count and encoding time. If the node count of decision diagrams can be made small enough and the encoding time can be made short enough, decision diagrams will play a vital role in representing dictionaries. For example, we can use less storage space to store data consisting of symbols and characters by transforming them into decision diagrams. (3) On the other hand, our decoding algorithm needs to be improved so that it can decode decision diagrams encoded in a one-hot way in a short time. We believe that studying how to encode decision diagrams into dictionaries more efficiently will be very valuable in the future.  
Conceptualization, D.Z. and L.F. methodology, D.Z. and L.F.; software, D.Z.; validation, L.F. and Q.G.; formal analysis, Q.G.; investigation, D.Z.; resources, Q.G.; data curation, Q.G.; writing--original draft preparation, D.Z. and L.F.; writing--review and editing, D.Z., L.F. and Q.G.; visualization, D.Z.; supervision, L.F.; project administration, D.Z.; funding acquisition, Q.G. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the Science and Technology Planning Project of Guangdong (2021B0101420003, 2020 ZDZX3013, 2023A0505030013, 2022A0505030025, 2023 ZZ03), the Science and Technology Planning Project of Guangzhou (202206030007), the Guangdong-Macao Advanced Intelligent Computing Joint Laboratory (2020B1212030003), and the Opening Project of Key Laboratory of Safety of Intelligent Robots for State Market Regulation (GQI-KFKT202205).  
Due to the involvement of our research data in another study, we will not provide details regarding where data supporting the reported results can be found.  
The authors declare no conflicts of interest.