You really need to fix your notation. So X is the set of all n-tuples mod 3?
Are a,b,c n-tuples? Please clarify.
From your description, I would guess this is something like the subset sum problem (or atleast easily has a polynomial time reduction to subset sum) and this is well studied with many optimized algorithms.