% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/member_cliques.R
\name{member_cliques}
\alias{member_cliques}
\alias{node_in_roulette}
\title{Memberships in maximally diverse cliques}
\usage{
node_in_roulette(.data, num_groups, group_size, times = NULL)
}
\arguments{
\item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar.
For more information on the standard coercion possible,
see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.}

\item{num_groups}{An integer indicating the number of groups desired.}

\item{group_size}{An integer indicating the desired size of most of the groups.
Note that if the number of nodes is not divisible into groups of equal size,
there may be some larger or smaller groups.}

\item{times}{An integer of the number of search iterations the algorithm should complete.
By default this is the number of nodes in the network multiplied by the number of groups.
This heuristic may be insufficient for small networks and numbers of groups,
and burdensome for large networks and numbers of groups, but can be overwritten.
At every 10th iteration, a stronger perturbation of a number of successive changes,
approximately the number of nodes divided by the number of groups,
will take place irrespective of whether it improves the objective function.}
}
\value{
A \code{node_member} character vector the length of the nodes in the network,
of group memberships "A", "B", etc for each node.
If the network is labelled,
then the assignments will be labelled with the nodes' names.
}
\description{
These functions create a vector of nodes' memberships in
cliques:
\itemize{
\item \code{node_in_roulette()} assigns nodes to maximally diverse groups.
}
}
\section{Maximally diverse grouping problem}{

This well known computational problem is a NP-hard problem
with a number of relevant applications,
including the formation of groups of students that have encountered
each other least or least recently.
Essentially, the aim is to return a membership of nodes in cliques
that minimises the sum of their previous (weighted) ties:

\deqn{\sum_{g=1}^{m} \sum_{i=1}^{n-1} \sum_{j=i+1}^{n} x_{ij} y_{ig} y_{jg}}

where \eqn{y_{ig} = 1} if node \eqn{i} is in group \eqn{g}, and 0 otherwise.

\eqn{x_{ij}} is the existing network data.
If this is an empty network, the function will just return cliques.
To run this repeatedly, one can join a clique network of the membership result
with the original network, using this as the network data for the next round.

A form of the Lai and Hao (2016) iterated maxima search (IMS) is used here.
This performs well for small and moderately sized networks.
It includes both weak and strong perturbations to an initial solution
to ensure that a robust solution from the broader state space is identified.
The user is referred to Lai and Hao (2016) and Lai et al (2021) for more details.
}

\references{
\subsection{On the maximally diverse grouping problem}{

Lai, Xiangjing, and Jin-Kao Hao. 2016.
“Iterated Maxima Search for the Maximally Diverse Grouping Problem.”
\emph{European Journal of Operational Research} 254(3):780–800.
\doi{10.1016/j.ejor.2016.05.018}.

Lai, Xiangjing, Jin-Kao Hao, Zhang-Hua Fu, and Dong Yue. 2021.
“Neighborhood Decomposition Based Variable Neighborhood Search and Tabu Search for Maximally Diverse Grouping.”
\emph{European Journal of Operational Research} 289(3):1067–86.
\doi{10.1016/j.ejor.2020.07.048}.
}
}
\seealso{
Other memberships:
\code{\link{member_brokerage}},
\code{\link{member_community}},
\code{\link{member_community_hier}},
\code{\link{member_community_non}},
\code{\link{member_components}},
\code{\link{member_core}},
\code{\link{member_diffusion}},
\code{\link{member_equivalence}}

Other nodal:
\code{\link{mark_core}},
\code{\link{mark_degree}},
\code{\link{mark_diff}},
\code{\link{mark_nodes}},
\code{\link{mark_select_node}},
\code{\link{measure_assort_node}},
\code{\link{measure_broker_node}},
\code{\link{measure_brokerage}},
\code{\link{measure_central_between}},
\code{\link{measure_central_close}},
\code{\link{measure_central_degree}},
\code{\link{measure_central_eigen}},
\code{\link{measure_closure_node}},
\code{\link{measure_core}},
\code{\link{measure_diffusion_node}},
\code{\link{measure_diverse_node}},
\code{\link{member_brokerage}},
\code{\link{member_community}},
\code{\link{member_community_hier}},
\code{\link{member_community_non}},
\code{\link{member_components}},
\code{\link{member_core}},
\code{\link{member_diffusion}},
\code{\link{member_equivalence}},
\code{\link{motif_brokerage_node}},
\code{\link{motif_exposure}},
\code{\link{motif_node}},
\code{\link{motif_path}}
}
\concept{memberships}
\concept{nodal}
