Real arrangement problems rarely ask for a plain n! or nPr — they add a constraint (some objects repeat, or must/must-not sit together, or are confined to particular positions). Four standard techniques handle these.
1. Repeated objects (Theorem 4.4). If among n objects, p1 are alike of one kind, p2 alike of a second kind, ..., pk alike of a kth kind (rest all different), the number of distinct arrangements is
p1!p2!⋯pk!n!,
since permuting the identical copies of any one kind among themselves produces no visibly new arrangement — so the naive n! must be divided by pi! for every repeated kind.
2. Objects that must stay together — the string/block method. Bundle the m objects that must stay adjacent into a single unit. This leaves (n−m+1) units to permute ((n−m+1)! ways); the m bundled objects also permute among themselves inside the bundle (m! ways). Total: m!×(n−m+1)!.
3. Objects that must never be adjacent — the gap method. Arrange the m=n−k unrestricted objects first (m! ways); this creates m+1 gaps (including both ends). Place the k restricted objects into these gaps, at most one per gap, in m+1Pk ways. Total: m!×m+1Pk. (The complementary count — total unrestricted permutations minus the "always together" count — is often a faster route to the never-together answer.) …