In this assignment you are required to implement the Bond Energy Algorithm of vertical fragmentation. Your code should contains two separate procedures AA Generator and CA Generator, where AA Generator takes the input of all attributes of a relation, a set of queries and their
access frequencies at different sites, and produces the output of an affinity matrix AA, and CA
Generator takes input of an affinity matrix AA and produces a clustered affinity matrix CA. For
description of the BEA algorithm, definitions of AA and CA, please see lecture slides/textbook.
In this assignment, the Attribute Affinity is measured by the extended Otsuka-Ochiai coefficient (https://en.wikipedia.org/wiki/Yanosuke Otsuka) instead of the traditional method described in the textbook. The following equations show the details of the computation, where n
is the number of attributes, and m is the number of sites, Aik is the number of times Attribute
is accessed by Query qk, considering of all sites. For the result of division, you must round
it up to the nearest integer.