Question: Dynamic Programming. You ve been assigned to your company s Do - main Name System ( DNS ) team. DNS is a hierarchical decentralized naming

Dynamic Programming. Youve been assigned to your companys Do-
main Name System (DNS) team. DNS is a hierarchical decentralized naming system for
computers, services, or other resources connected to the Internet or a private network. It
associates various information with domain names assigned to each of the participating
entities. Most prominently, it translates more readily memorized domain names to the
numerical IP addresses needed for locating and identifying computer services and devices
with the underlying network protocols.
Your team lead has assigned you to the task of ensuring the DNS look-ups are as fast as
possible. After a lengthy discussion with your tech director, youve decided to store do-
mains names alphabetically in a binary search tree (BST) along with their IP addresses,
because look-ups are relatively fast. But to improve performance, you want to optimally
arrange the BST according to the probability a given domain name is looked up.
(a) Given a list of domain names and their associated IP addresses and the probability
of a look-up for that domain name, write a pseudo-code algorithm that creates an
optimally arranged BST.
(b) Apply your algorithm to these data:
web site google.com boisestate.edu irs.gov wikipedia.com cat-bounce.com
IP 74.125.28.100132.178.214.91166.123.218.220198.35.26.96205.186.179.214
prob. 0.150.050.20.10.5
CS 421- Fall 2024

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!