Use factorization criterion to determine a sufficient statistic bassed on a sample of size N, where each observation come frome a family of distributions of a random variable that can take a finite list of values $x_1,\cdots,x_n$ with probability $p_1,\cdots,p_n,$ respectively.
My attempt
The factorization theorem establish that for a random sample $\vec{x}=(x_1,\cdots,x_n)$, is possible write: $$f(\vec{x}|\theta)=g(T(\vec{x})|\theta)h(\vec{x}),\ \ \ \ \ \ \ \ \ \ \ \ \ (1)$$
where $f(\vec{x}|\theta)$ is the sample density, $g(T(\vec{x})|\theta)$ is a function that depends on theta and $h(\vec{x})$ does not depend on $\theta.$
One way to write the discrete density of given random variable is via indicator functions as follows
$$f(X=y_1|p_1,\cdots,p_n)=p_1{\bf 1}_{x_1}(y_1)+\cdots p_n{\bf 1}_{x_n}(y_1).$$
so I'm trying to write the sample distribution of an arbitrary sample $y_1,y_2,\cdots,y_N$:
\begin{eqnarray} f(y_1,\cdots,y_N|p_1,\cdots,p_n)&=&\displaystyle\Pi_{i=1}^Nf(y_i|p_1,\cdots,p_n)\\ &=&\displaystyle\Pi_{i=1}^N(\sum_{i=1}^n p_i{\bf{1}}_{x_i}(y_i)). \end{eqnarray}
It's possible to write the previous equation in the form of (1)?.