## 2 Related Work  
Diversity has been accepted as a method that plays a decisive role in network resilience [14; 15; 16]. Furthermore, it has been exploited as a mechanism to avoid fate sharing during correlated cyber-attacks, large-scale natural disasters, \"buggy\" software updates, etc. [PERSON] et al. provide in [14; 15] a framework for resilience in communication networks. They formally define the terms resilience, reliability, survivability, and disruption tolerance in communication networks, and present diversity as an important requirement to deal with attacks of intelligent adversaries. A diverse system ensures that, under a correlated attack, all its parts are unlikely to share the same fate. Consequently, they can maintain a partial system operation. In [16] a systematic approach is conceived to build a resilient network, taking actions in a control loop to respond to attacks and recover to normal operation. In such a framework, redundancy and diversity are exploited as defensive mechanisms to maintain reliability in the presence of software faults. Unlike in communication networks, diversity is a well-established concept for increasing reliability and robustness in software engineering. Pioneering research works such as [17; 18; 19; 20; 21] have developed concepts like N-version programming and data or instruction set randomization to introduce diversity. Regarding N-version programming, the term \"natural diversity\" was coined in [21] and described the existence of different pieces of either software or Operating Systems (OSs) with the same functionality, which appear spontaneously in the market and are supposed not exhibit common vulnerabilities. Examples of natural diversity can be found in web browsers, firewalls, virtual machines, routers, etc. In [22; 23], the research focus was to disclose which applications and OSs that are available in the market, offer mutually exclusive software risks. Remarkably, more than 50% of the analyzed OSs had, at most, one non-application common vulnerability that can be remotely exploited, while up to 98% of the analyzed software could be exchanged by one with the same functionality, yet with different not-common vulnerabilities. Also, from vulnerabilities disclosure websites, such as [24; 25; 26; 27; 28], it can be observed that from the extensive list of data routers available in the market, only a few of them share the same vulnerability risks. Some research works have been carried out to increase network robustness exploiting mutually exclusive software risks, [13; 29; 30; 31]. In these works, nodes belong to mutually exclusive risk classes and when a failure occurs at a node, all the nodes in the same class fail simultaneously. Thus, researchers develop algorithms aiming to increase the network connectivity based on node diversity and the way such nodes can connect to each other. In [29] a grid network is created and the number of network devices is divided evenly among the classes. Next, every node in each class is linked to nodes belonging to a different class. Thus, the graph partitioning algorithm creates a topology that maintains a connected network when a single class of nodes breaks down. [PERSON] et al. introduced two methods for increasing the network resilience against software defects, bugs, and vulnerabilities affecting network routers [30]. The methods aim to locate network nodes using graph clustering and graph partitioning. Routers were clustered according to their risk classes, and the network connectivity was maximized when any class was removed from the graph. We note that, since in both works node classes were considered to be homogeneous, the optimal class balance turned out to be a uniform distribution of nodes per class. This is a major difference to our work. In [31] the Diversity Assignment Problem is proposed: find the optimum assignment, from classes to network nodes, that maximizes the average connectivity among end-nodes.