For a pattern graph $H$ on $k$ nodes, we consider the problems of finding and counting the number of (not necessarily induced) copies of $H$ in a given large graph $G$ on $n$ nodes, as well as finding minimum weight copies in both node-weighted and edge-weighted graphs. Our results include the following: 1. The number of copies of an $H$ with an independent set of size $s$ can be computed exactly in $O^*(2^s n^{k-s+3})$ time and $poly(n,k)+O(2^s n^2)$ space, or in $O^*(4^s n^{k-s+3})$ time and $poly(n,k)$ space. (The $O^*$ notation omits $poly(k)$ factors.) To obtain these algorithms we provide fast algorithms for computing the permanent of a $k \times n$ matrix over rings and semirings. 2. The number of copies of any $H$ having minimum (or maximum) node-weight (with arbitrary real weights on nodes) can be found in $O(n^{\omega k/3} + n^{2k/3+o(1)})$ time, where $\omega < 2.38$ is the matrix multiplication exponent and $k$ is divisible by $3$. Similar results hold for other values of $k$. Also, the number of copies having exactly a prescribed weight can be found within this time. These algorithms extend the technique of Czumaj and Lingas [in Proceedings of SODA 2007, ACM, New York, SIAM, Philadelphia, 2007, pp. 986--994] and give a new (algorithmic) application of multiparty communication complexity. 3. Finding an edge-weighted triangle of weight exactly $0$ in general graphs requires $\Omega(n^{3-\varepsilon})$ time for all $\varepsilon > 0$, unless the $3$SUM problem on $N$ numbers can be solved in $O(N^{2 - \varepsilon})$ time. This suggests that the edge-weighted problem is much harder than its node-weighted version.