Permutacijos skaičiuotuvas (nPr)
Skaičiuoti užsakytą tvarką r elementai pasirinkta iš n.
Rezultatai atnaujinti, kaip jums tipo.
Apie šį skaičiuoklę
A permutation counts how many ways you can arrange r items chosen from a set of n, where order matters — so first, second and third place are three different outcomes. This calculator returns the exact count and the formula it used, even for large n and r.
The formula is nPr = n! / (n − r)!, which is the same as multiplying the top r numbers counting down from n. For 10 items taken 3 at a time, that is 10 × 9 × 8 = 720. Choosing none gives nP0 = 1, and arranging all of them gives nPn = n!. You cannot choose more items than you have, so if r is greater than n the tool returns a dash.
Permutations answer "how many ordered sequences?" — the number of possible race finishes, seating orders, PIN codes or ranked shortlists. When order does not matter, use a combination instead, which is always the smaller count.
Dažnai užduodami klausimai
Koks skirtumas tarp permutacijos ir derinio?
Permutacijos tvarka klausimai (pirmas, antras, trečias yra skirtingi rezultatai); derinyje jis nėra. Visada yra bent tiek permutacijų, kaip deriniai.
Kas yra permutacijos formulė?
10 elementų, paimtų 3 vienu metu: 10 × 9 × 8 = 720.
Kada turėčiau naudoti permutaciją?
Kai užsakymas svarbus: reitingas finišo, užpildymas pirmas/seka/trečiąsias vietas, sėdinčių žmonių iš eilės arba užsakyto kodo statyba.
Kas nutiks, jei r bus didesnis nei n?
Jūs negalite organizuoti daugiau daiktų, nei turite, todėl rezultatas yra neapibrėžtas ir įrankis grįžta brūkšnys.
Kas yra nP0?
Tai yra 1 — yra lygiai vienas būdas organizuoti nieko, tuščias susitarimas.
Kas yra nPn?
Tai lygus n!, nes organizuojant visus n elementai, kad yra tas pats kaip ir visą faktorių. Pavyzdžiui 4P4 = 4! = 24.
API – naudoti šį skaičiuoklę iš kodo
Vadinkite šį skaičiuoklį kaip nemokamą JSON parametrą — nereikia rakto. Siųsti žemiau nurodytas lauko vertes kaip užklausos parametrus arba JSON. Viskas, ką praleidžiate naudoja tą patį numatytąjį šį puslapį yra užpildytas; nežinomas parametras yra 400, niekada tylus nulis. Skaityti visus API dokumentus →
Galutinis taškas
GET https://calculator.free/api/v1/permutation/
curl
curl "https://calculator.free/api/v1/permutation/?n=10&r=3"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/permutation/?" + new URLSearchParams({
"n": "10",
"r": "3"
}));
const data = await r.json();
console.log(data.results);
Rezultatai yra tik bendro pobūdžio, o ne finansinių, medicininių ar mokesčių konsultacijų įverčiai.