مطلب ارسالی کاربران
جایگشت و ترکیب
امروز میخوام جایگشت و ترکیب رو به طور مفهومی و مختصر توضیح بدم.
جایگشت:در واقع از همان اصل ضرب نشئت میگیرد و زمانی مورد استفاده قرار میگیرد که ترتیب مهم باشد و فقط با نوع اشیا کار نداشته باشیم چون اگر جایگاه کافی برای قرارگیری اشیا نداشته باشیم جایی برای ادامه ضرب نداریم از این فرمول استفاده میکنیم !n تقسیم بر (!n-r)
توجه*:n تعداد اشیا و r تعداد جایگاه است
مثال:رمزی از ۳ حرف تشکیل شده که باید به ترتیب مشخصی فشار داده شوند اگر صفحه کلید ۳۲ حرف فارسی داشته باشد چهقدر احتمال دارد شخص در اولین اقدام رمز را درست بزند؟ جواب: ۱ بر روی (۳۲و۳)p
اما زمانی که جایگاه یا ترتیب مهم نباشد از ترکیب استفاده میکنیم چون در ترکیب جا به جایی اشیا معنی ندارد !r را هم به مخرج اضافه میکنیم تا حالتهایی که در جا به جایی اضافه میشوند حذف شوند که میشود همان فرمول جایگشت تقسیم بر !r.