Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Possible Duplicate:
Solutions of $\prod_{i=1}^n x_i = c$ mod p

I guess it should be $3(p-2)+1$ modulo $n$ as there are $3$ possibilities for abc to be congruent to $2,\cdots ,p-1$ each and one solution for abc to be congruent to $1$.

share|improve this question

marked as duplicate by Arturo Magidin, Chris Eagle, sdcvvc, William, wentaway Sep 7 '12 at 12:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
What is $n$? Is $p$ prime? –  Mark Bennet Jul 17 '11 at 22:16
    
@Mark @Dylan Sorry for the typo. $n$ is $p$ and p is prime –  kuch nahi Jul 17 '11 at 22:17
1  
Good stuff. Are you counting rearrangements, or not? If you are, then I think this is $(p - 1)^2$. –  Dylan Moreland Jul 17 '11 at 22:24
2  
$p-1$ ways of picking $a$ (anything but zero modulo $p$); $p-1$ ways of picking $b$. This forces $c$. Total: $(p-1)^2$. If you want distinct sets (e.g., if $a=b=1$, $c=x$ is "the same" as $a=c=1$, $b=x$), then it gets more complicated. But your explanation above makes no sense to me at all. Why "3 possibilities for abc to be congruent to 2,...,p-1", and "one" for "1"? –  Arturo Magidin Jul 17 '11 at 22:30
    
@Aruto this question has a history of duplication, and is in fact based on your answer to the question you linked. See the question: math.stackexchange.com/questions/52036/… for an explanation of why I did that –  kuch nahi Jul 17 '11 at 22:32

1 Answer 1

up vote 2 down vote accepted

There are $p-1$ choices for $a$ and $p-1$ choices for $b$ since $a,b$ can be congruent to any nonzero numbers mod $p$. Once $a,b$ are chosen, we must have $c = x(ab)^{-1}$ mod $p$, so there is only one choice for $c$. Overall, there are $(p-1)(p-1)\cdot1 = (p-1)^2$ triples $(a,b,c)$ satisfying the given equation.

Your reasoning in your answer to Re: "can you give me a complete answer not just hint? " is not correct. For example, you claim that if $\prod x_i = 1$ mod $p$, then each $x_i$ must be congruent to $1$ mod $p$. But this is not true, e.g. $x_1x_2 = 1$ mod $3$ has two solutions, namely $(1,1)$ and $(2,2)$. So we could have that neither $x_1$ nor $x_2$ is $1$ mod $3$, yet their product is $1$ mod $3$. The other claims that $\prod x_i = 2$ implies that one of the $x$'s is congruent to $2$ mod $p$ and all others are congruent to $1$ mod $p$, and that $\prod x_i = p-1$ implies that one of the $x$'s is congruent to $p-1$ mod $p$ and all others are congruent to $1$ mod $p$ are also wrong. It looks like you treat $x_1,x_2,..,x_n$ as if they were positive integers, but they are not.

Anyway, as many people pointed out, the correct answer to your question is $(p-1)^2$ (unless you meant to ask something different).

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.