Constraint to generate an array of random numbers where a certain value is repeated fixed number of times

In reply to dave_59:

[quote]In reply to shahkavish77:

Hi dave,

i have a doubt

All you have to do is unroll the sum method
1)

 ( int'(arr[0] == i) + int'(arr[1] == i) + ... + int'(arr[99] == i) ) ==j;

 ( int'(arr[0]) + int'(arr[1]) + ... + int'(arr[99]) ) ==j;

Thank you