Consider a set X = {x1,...,xn } where every xi is a positive integer and xi ≤ nf for some constant f . We represent xi a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Consider a set X = {x1,...,xn } where every xi is a positive integer and xi ≤ nf for some constant f . We represent xi a

Post by answerhappygod »

Consider a set X = {x1,...,xn } where every xi is a positiveinteger and xi ≤ nf for some constant f . We represent xi asstrings over an alphabet 0, 1, . . . , 2t − 1 (i.e., representingeach xi in base 2t) and store all xi from X in a compressed trie T.For every node u of T we keep an array A(u) of size 2t + 1. A(u)contains a pointer to the child ui of u such that the edge from uto ui is marked with i; A(u) = NULL if there is no such ui inT.
Specify all of the following in big-O in terms of f, n, and t(as necessary). What is the maximum height of T? What is the totalspace usage of T and all A(u)? What time is
needed to search for a key k in T ?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply