  This paper presents a policy for service placement of fog applications
inspired on complex networks and graph theory. We propose a twofold partition
process based on communities for the partition of the fog devices and based on
transitive closures for the application services partition. The allocation of
the services is performed sequentially by, firstly, mapping applications to
device communities and, secondly, mapping service transitive closures to fog
devices in the community. The underlying idea is to place as many inter-related
services as possible in the most nearby devices to the users. The optimization
objectives are the availability of the applications and the Quality of Service
(QoS) of the system, measured as the number of requests that are executed
before the application deadlines. We compared our solution with an Integer
Linear Programming approach, and the simulation results showed that our
proposal obtains higher QoS and availability when fails in the nodes are
considered.
