  We present an efficient algorithm to compute permanents, mixed discriminants
and hyperdeterminants of structured matrices and multidimensional arrays
(tensors). We describe the sparsity structure of an array in terms of a graph,
and we assume that its treewidth, denoted as $\omega$, is small. Our algorithm
requires $O(n 2^\omega)$ arithmetic operations to compute permanents, and
$O(n^2 + n 3^\omega)$ for mixed discriminants and hyperdeterminants. We finally
show that mixed volume computation continues to be hard under bounded treewidth
assumptions.
