文件名称:abc
介绍说明--下载内容均来自于网络,请自行研究使用
投掷六个骰子能投掷出多少种排列组合呢?
如1 2 3 4 5 6 和 6 5 4 3 2 1是同一种组合。
问题可以转化为:n个相同小球放入r个相异盒子中,允许空盒。
即求解不定方程 x1+x2+x3+ ... + xr = n 的非负整数解(x1, x2, x3, ..., xr),0<= Xi <= n
令yi=xi+1,转化为 y1+y2+..+yr = n+r 此时 1<= yi <=n+1
相当于 n+r 个小球分成 r 堆,有多少种分法的问题
即在这n+r-1个间隔中放置r-1个隔板,隔板之间的球的个数就相当于yi.
答案是 C(n+r-1,r-1)
本程序利用VC++语言解决本问题。-Throw six dice can throw out many permutations of it? As 123456 and 654321 is the same composition. Problem can be transformed into: n r identical balls into a different box, allowing the empty boxes. That solved indefinite equation x1+x2+x3+ ...+ xr = n of non-negative integer solutions (x1, x2, x3, ..., xr), 0 < = Xi < = n so yi = xi+1, into y1+y2+ ..+yr = n+r this case 1 < = yi < = n+1 equivalent n+r r balls into the heap, there are many kinds of issues of law that r-1 partition plates placed in this n+r-1 intervals, the ball separator between The number is equivalent to yi. answer is C (n+r-1, r-1) This procedure using VC++ solve the language problem.
如1 2 3 4 5 6 和 6 5 4 3 2 1是同一种组合。
问题可以转化为:n个相同小球放入r个相异盒子中,允许空盒。
即求解不定方程 x1+x2+x3+ ... + xr = n 的非负整数解(x1, x2, x3, ..., xr),0<= Xi <= n
令yi=xi+1,转化为 y1+y2+..+yr = n+r 此时 1<= yi <=n+1
相当于 n+r 个小球分成 r 堆,有多少种分法的问题
即在这n+r-1个间隔中放置r-1个隔板,隔板之间的球的个数就相当于yi.
答案是 C(n+r-1,r-1)
本程序利用VC++语言解决本问题。-Throw six dice can throw out many permutations of it? As 123456 and 654321 is the same composition. Problem can be transformed into: n r identical balls into a different box, allowing the empty boxes. That solved indefinite equation x1+x2+x3+ ...+ xr = n of non-negative integer solutions (x1, x2, x3, ..., xr), 0 < = Xi < = n so yi = xi+1, into y1+y2+ ..+yr = n+r this case 1 < = yi < = n+1 equivalent n+r r balls into the heap, there are many kinds of issues of law that r-1 partition plates placed in this n+r-1 intervals, the ball separator between The number is equivalent to yi. answer is C (n+r-1, r-1) This procedure using VC++ solve the language problem.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
6个骰子的所有组合问题\6个骰子的所有组合问题.cpp
.....................\6个骰子的所有组合问题.dsp
.....................\6个骰子的所有组合问题.dsw
.....................\6个骰子的所有组合问题.ncb
.....................\6个骰子的所有组合问题.opt
.....................\6个骰子的所有组合问题.plg
.....................\Debug\6个骰子的所有组合问题.exe
.....................\.....\6个骰子的所有组合问题.ilk
.....................\.....\6个骰子的所有组合问题.obj
.....................\.....\6个骰子的所有组合问题.pch
.....................\.....\6个骰子的所有组合问题.pdb
.....................\.....\StdAfx.obj
.....................\.....\vc60.idb
.....................\.....\vc60.pdb
.....................\ReadMe.txt
.....................\StdAfx.cpp
.....................\StdAfx.h
.....................\Debug
6个骰子的所有组合问题