  A recent breakthrough in Edmonds' problem showed that the noncommutative rank
can be computed in deterministic polynomial time, and various algorithms for it
were devised. However, only quite complicated algorithms are known for finding
a so-called shrunk subspace, which acts as a dual certificate for the value of
the noncommutative rank. In particular, the operator Sinkhorn algorithm,
perhaps the simplest algorithm to compute the noncommutative rank with operator
scaling, does not find a shrunk subspace. Finding a shrunk subspace plays a key
role in applications, such as separation in the Brascamp-Lieb polytope,
one-parameter subgroups in the null-cone membership problem, and primal-dual
algorithms for matroid intersection and fractional matroid matching.
  In this paper, we provide a simple Sinkhorn-style algorithm to find the
smallest shrunk subspace over the complex field in deterministic polynomial
time. To this end, we introduce a generalization of the operator scaling
problem, where the spectra of the marginals must be majorized by specified
vectors. Then we design an efficient Sinkhorn-style algorithm for the
generalized operator scaling problem. Applying this to the shrunk subspace
problem, we show that a sufficiently long run of the algorithm also finds an
approximate shrunk subspace close to the minimum exact shrunk subspace.
Finally, we show that the approximate shrunk subspace can be rounded if it is
sufficiently close. Along the way, we also provide a simple randomized
algorithm to find the smallest shrunk subspace.
  As applications, we design a faster algorithm for fractional linear matroid
matching and efficient weak membership and optimization algorithms for the
rank-2 Brascamp-Lieb polytope.
