Artificial intelligent assistant

Why my idea is not right on this classical probability problem Sorry for my poor math, here is a classical probability problem > Suppose there are $n \ge 2$ books, all books are randomly allocated to John and Jack, what is the probability of both John and Jack get at least one book? My solution is since both John and Jack can get at least one book, suppose John gets a book, and then Jack gets another book to make sure at least both of them can get one book, and the rest $n-2$ book will be randomly allocated to John and Jack, so there are $n \times (n-1) \times 2^{n-2}$ possible events, and the probability is $$P=\frac{n \times (n-1) \times 2^{n-2}}{2^n}$$ But apparently, my solution is not right, the right solution is $$P=\frac{2^n-2}{2^n}$$ What is the right solution to directly solve this problem?

Each book can be given to two people, so there are $2^n$ ways of handing out the books. There is only one way that John can get no books and only one way that John can get no books, so there are $2^n-2$ ways that they can each get at least one book.

Your approach picks a book to give to John first (the factor $n$), then a book to give to Jack (the factor $n-1$), then hands out the rest. Note that for $n \gt 2$ your probability is greater than $1$, so it cannot be right. The problem is that you are overcounting. If John gets just two books, you count the configuration twice, once for each book being the first one.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy ec5bb7aaf049b4edd0fb4c18a54457c5