there are 12 persons stands in a line in how many ways we can choose 4 persons in case that no 2 of persons can be chosen that stands next to each other.(i tried a lot but i could not find anything)
i mean if there is ABCDEFGHIJKL and if we choose B we can not choose A or C next
One "brute-force" way, not very elegant, is to use inclusion-exclusion principle. Let's count the number of 4-tuples that should be excluded. Either the left-most two persons are next to each other (A), or the middle-two persons are next to each other (B), or the right-most two people are next to each other (C).
(A)-count = $11\choose 3$; consider the left-most item in a 11-elemt set to be a "pair", such as in (AB)FK))
Similarly, (B)-count and (C)-count is $11\choose 3$.
((A) and (B))-count = $10\choose 2$ (examples such as (BCD)H)
((B) and (C))-count = $10\choose 2$ (examples such as A(CDE))
((A) and (C))-count = $10\choose 2$ (examples such as (AB)(FG))
((A) and (B) and (C))-count = $9\choose 1$ (examples such as (CDEF))
This leaves as with ${12\choose 4} - 3\times {11\choose 3} + 3\times{10\choose 2} - {9\choose 1} = 126$.
But olala, just by chance, $9\choose 4$ = 126. Can you think of a more elegant solution, like choosing 4 items out of 9?