
(A) The preprocessing step: generating an input for ACE. The input includes an evolutionary tree with tree edge weights as well as coevolutionary edges with corresponding weights (see more details in Methods). (B) The ACE algorithm has four main steps: (1) partitioning of the coevolutionary graph to smaller subgraphs, (2) finding the optimal ancestral states in these subgraph, (3) merging these subgraphs, (4) improving the solution greedily (see a detailed description in the Methods section and in Supplementary Note 1).











